netdev-FAQ.txt 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. Information you need to know about netdev
  2. -----------------------------------------
  3. Q: What is netdev?
  4. A: It is a mailing list for all network-related Linux stuff. This includes
  5. anything found under net/ (i.e. core code like IPv6) and drivers/net
  6. (i.e. hardware specific drivers) in the Linux source tree.
  7. Note that some subsystems (e.g. wireless drivers) which have a high volume
  8. of traffic have their own specific mailing lists.
  9. The netdev list is managed (like many other Linux mailing lists) through
  10. VGER ( http://vger.kernel.org/ ) and archives can be found below:
  11. http://marc.info/?l=linux-netdev
  12. http://www.spinics.net/lists/netdev/
  13. Aside from subsystems like that mentioned above, all network-related Linux
  14. development (i.e. RFC, review, comments, etc.) takes place on netdev.
  15. Q: How do the changes posted to netdev make their way into Linux?
  16. A: There are always two trees (git repositories) in play. Both are driven
  17. by David Miller, the main network maintainer. There is the "net" tree,
  18. and the "net-next" tree. As you can probably guess from the names, the
  19. net tree is for fixes to existing code already in the mainline tree from
  20. Linus, and net-next is where the new code goes for the future release.
  21. You can find the trees here:
  22. http://git.kernel.org/?p=linux/kernel/git/davem/net.git
  23. http://git.kernel.org/?p=linux/kernel/git/davem/net-next.git
  24. Q: How often do changes from these trees make it to the mainline Linus tree?
  25. A: To understand this, you need to know a bit of background information
  26. on the cadence of Linux development. Each new release starts off with
  27. a two week "merge window" where the main maintainers feed their new
  28. stuff to Linus for merging into the mainline tree. After the two weeks,
  29. the merge window is closed, and it is called/tagged "-rc1". No new
  30. features get mainlined after this -- only fixes to the rc1 content
  31. are expected. After roughly a week of collecting fixes to the rc1
  32. content, rc2 is released. This repeats on a roughly weekly basis
  33. until rc7 (typically; sometimes rc6 if things are quiet, or rc8 if
  34. things are in a state of churn), and a week after the last vX.Y-rcN
  35. was done, the official "vX.Y" is released.
  36. Relating that to netdev: At the beginning of the 2-week merge window,
  37. the net-next tree will be closed - no new changes/features. The
  38. accumulated new content of the past ~10 weeks will be passed onto
  39. mainline/Linus via a pull request for vX.Y -- at the same time,
  40. the "net" tree will start accumulating fixes for this pulled content
  41. relating to vX.Y
  42. An announcement indicating when net-next has been closed is usually
  43. sent to netdev, but knowing the above, you can predict that in advance.
  44. IMPORTANT: Do not send new net-next content to netdev during the
  45. period during which net-next tree is closed.
  46. Shortly after the two weeks have passed (and vX.Y-rc1 is released), the
  47. tree for net-next reopens to collect content for the next (vX.Y+1) release.
  48. If you aren't subscribed to netdev and/or are simply unsure if net-next
  49. has re-opened yet, simply check the net-next git repository link above for
  50. any new networking-related commits.
  51. The "net" tree continues to collect fixes for the vX.Y content, and
  52. is fed back to Linus at regular (~weekly) intervals. Meaning that the
  53. focus for "net" is on stabilization and bugfixes.
  54. Finally, the vX.Y gets released, and the whole cycle starts over.
  55. Q: So where are we now in this cycle?
  56. A: Load the mainline (Linus) page here:
  57. http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git
  58. and note the top of the "tags" section. If it is rc1, it is early
  59. in the dev cycle. If it was tagged rc7 a week ago, then a release
  60. is probably imminent.
  61. Q: How do I indicate which tree (net vs. net-next) my patch should be in?
  62. A: Firstly, think whether you have a bug fix or new "next-like" content.
  63. Then once decided, assuming that you use git, use the prefix flag, i.e.
  64. git format-patch --subject-prefix='PATCH net-next' start..finish
  65. Use "net" instead of "net-next" (always lower case) in the above for
  66. bug-fix net content. If you don't use git, then note the only magic in
  67. the above is just the subject text of the outgoing e-mail, and you can
  68. manually change it yourself with whatever MUA you are comfortable with.
  69. Q: I sent a patch and I'm wondering what happened to it. How can I tell
  70. whether it got merged?
  71. A: Start by looking at the main patchworks queue for netdev:
  72. http://patchwork.ozlabs.org/project/netdev/list/
  73. The "State" field will tell you exactly where things are at with
  74. your patch.
  75. Q: The above only says "Under Review". How can I find out more?
  76. A: Generally speaking, the patches get triaged quickly (in less than 48h).
  77. So be patient. Asking the maintainer for status updates on your
  78. patch is a good way to ensure your patch is ignored or pushed to
  79. the bottom of the priority list.
  80. Q: How can I tell what patches are queued up for backporting to the
  81. various stable releases?
  82. A: Normally Greg Kroah-Hartman collects stable commits himself, but
  83. for networking, Dave collects up patches he deems critical for the
  84. networking subsystem, and then hands them off to Greg.
  85. There is a patchworks queue that you can see here:
  86. http://patchwork.ozlabs.org/bundle/davem/stable/?state=*
  87. It contains the patches which Dave has selected, but not yet handed
  88. off to Greg. If Greg already has the patch, then it will be here:
  89. http://git.kernel.org/cgit/linux/kernel/git/stable/stable-queue.git
  90. A quick way to find whether the patch is in this stable-queue is
  91. to simply clone the repo, and then git grep the mainline commit ID, e.g.
  92. stable-queue$ git grep -l 284041ef21fdf2e
  93. releases/3.0.84/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
  94. releases/3.4.51/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
  95. releases/3.9.8/ipv6-fix-possible-crashes-in-ip6_cork_release.patch
  96. stable/stable-queue$
  97. Q: I see a network patch and I think it should be backported to stable.
  98. Should I request it via "stable@vger.kernel.org" like the references in
  99. the kernel's Documentation/stable_kernel_rules.txt file say?
  100. A: No, not for networking. Check the stable queues as per above 1st to see
  101. if it is already queued. If not, then send a mail to netdev, listing
  102. the upstream commit ID and why you think it should be a stable candidate.
  103. Before you jump to go do the above, do note that the normal stable rules
  104. in Documentation/stable_kernel_rules.txt still apply. So you need to
  105. explicitly indicate why it is a critical fix and exactly what users are
  106. impacted. In addition, you need to convince yourself that you _really_
  107. think it has been overlooked, vs. having been considered and rejected.
  108. Generally speaking, the longer it has had a chance to "soak" in mainline,
  109. the better the odds that it is an OK candidate for stable. So scrambling
  110. to request a commit be added the day after it appears should be avoided.
  111. Q: I have created a network patch and I think it should be backported to
  112. stable. Should I add a "Cc: stable@vger.kernel.org" like the references
  113. in the kernel's Documentation/ directory say?
  114. A: No. See above answer. In short, if you think it really belongs in
  115. stable, then ensure you write a decent commit log that describes who
  116. gets impacted by the bugfix and how it manifests itself, and when the
  117. bug was introduced. If you do that properly, then the commit will
  118. get handled appropriately and most likely get put in the patchworks
  119. stable queue if it really warrants it.
  120. If you think there is some valid information relating to it being in
  121. stable that does _not_ belong in the commit log, then use the three
  122. dash marker line as described in Documentation/SubmittingPatches to
  123. temporarily embed that information into the patch that you send.
  124. Q: Are all networking bug fixes backported to all stable releases?
  125. A: Due to capacity, Dave could only take care of the backports for the last
  126. 2 stable releases. For earlier stable releases, each stable branch maintainer
  127. is supposed to take care of them. If you find any patch is missing from an
  128. earlier stable branch, please notify stable@vger.kernel.org with either a
  129. commit ID or a formal patch backported, and CC Dave and other relevant
  130. networking developers.
  131. Q: Someone said that the comment style and coding convention is different
  132. for the networking content. Is this true?
  133. A: Yes, in a largely trivial way. Instead of this:
  134. /*
  135. * foobar blah blah blah
  136. * another line of text
  137. */
  138. it is requested that you make it look like this:
  139. /* foobar blah blah blah
  140. * another line of text
  141. */
  142. Q: I am working in existing code that has the former comment style and not the
  143. latter. Should I submit new code in the former style or the latter?
  144. A: Make it the latter style, so that eventually all code in the domain of
  145. netdev is of this format.
  146. Q: I found a bug that might have possible security implications or similar.
  147. Should I mail the main netdev maintainer off-list?
  148. A: No. The current netdev maintainer has consistently requested that people
  149. use the mailing lists and not reach out directly. If you aren't OK with
  150. that, then perhaps consider mailing "security@kernel.org" or reading about
  151. http://oss-security.openwall.org/wiki/mailing-lists/distros
  152. as possible alternative mechanisms.
  153. Q: What level of testing is expected before I submit my change?
  154. A: If your changes are against net-next, the expectation is that you
  155. have tested by layering your changes on top of net-next. Ideally you
  156. will have done run-time testing specific to your change, but at a
  157. minimum, your changes should survive an "allyesconfig" and an
  158. "allmodconfig" build without new warnings or failures.
  159. Q: Any other tips to help ensure my net/net-next patch gets OK'd?
  160. A: Attention to detail. Re-read your own work as if you were the
  161. reviewer. You can start with using checkpatch.pl, perhaps even
  162. with the "--strict" flag. But do not be mindlessly robotic in
  163. doing so. If your change is a bug-fix, make sure your commit log
  164. indicates the end-user visible symptom, the underlying reason as
  165. to why it happens, and then if necessary, explain why the fix proposed
  166. is the best way to get things done. Don't mangle whitespace, and as
  167. is common, don't mis-indent function arguments that span multiple lines.
  168. If it is your first patch, mail it to yourself so you can test apply
  169. it to an unpatched tree to confirm infrastructure didn't mangle it.
  170. Finally, go back and read Documentation/SubmittingPatches to be
  171. sure you are not repeating some common mistake documented there.