netdev-FAQ.rst 12 KB

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