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