1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun 3*4882a593Smuzhiyun.. _netdev-FAQ: 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun========== 6*4882a593Smuzhiyunnetdev FAQ 7*4882a593Smuzhiyun========== 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunQ: What is netdev? 10*4882a593Smuzhiyun------------------ 11*4882a593SmuzhiyunA: It is a mailing list for all network-related Linux stuff. This 12*4882a593Smuzhiyunincludes anything found under net/ (i.e. core code like IPv6) and 13*4882a593Smuzhiyundrivers/net (i.e. hardware specific drivers) in the Linux source tree. 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunNote that some subsystems (e.g. wireless drivers) which have a high 16*4882a593Smuzhiyunvolume of traffic have their own specific mailing lists. 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunThe netdev list is managed (like many other Linux mailing lists) through 19*4882a593SmuzhiyunVGER (http://vger.kernel.org/) and archives can be found below: 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun- http://marc.info/?l=linux-netdev 22*4882a593Smuzhiyun- http://www.spinics.net/lists/netdev/ 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunAside from subsystems like that mentioned above, all network-related 25*4882a593SmuzhiyunLinux development (i.e. RFC, review, comments, etc.) takes place on 26*4882a593Smuzhiyunnetdev. 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunQ: How do the changes posted to netdev make their way into Linux? 29*4882a593Smuzhiyun----------------------------------------------------------------- 30*4882a593SmuzhiyunA: There are always two trees (git repositories) in play. Both are 31*4882a593Smuzhiyundriven by David Miller, the main network maintainer. There is the 32*4882a593Smuzhiyun``net`` tree, and the ``net-next`` tree. As you can probably guess from 33*4882a593Smuzhiyunthe names, the ``net`` tree is for fixes to existing code already in the 34*4882a593Smuzhiyunmainline tree from Linus, and ``net-next`` is where the new code goes 35*4882a593Smuzhiyunfor the future release. You can find the trees here: 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun- https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git 38*4882a593Smuzhiyun- https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunQ: How often do changes from these trees make it to the mainline Linus tree? 41*4882a593Smuzhiyun---------------------------------------------------------------------------- 42*4882a593SmuzhiyunA: To understand this, you need to know a bit of background information on 43*4882a593Smuzhiyunthe cadence of Linux development. Each new release starts off with a 44*4882a593Smuzhiyuntwo week "merge window" where the main maintainers feed their new stuff 45*4882a593Smuzhiyunto Linus for merging into the mainline tree. After the two weeks, the 46*4882a593Smuzhiyunmerge window is closed, and it is called/tagged ``-rc1``. No new 47*4882a593Smuzhiyunfeatures get mainlined after this -- only fixes to the rc1 content are 48*4882a593Smuzhiyunexpected. After roughly a week of collecting fixes to the rc1 content, 49*4882a593Smuzhiyunrc2 is released. This repeats on a roughly weekly basis until rc7 50*4882a593Smuzhiyun(typically; sometimes rc6 if things are quiet, or rc8 if things are in a 51*4882a593Smuzhiyunstate of churn), and a week after the last vX.Y-rcN was done, the 52*4882a593Smuzhiyunofficial vX.Y is released. 53*4882a593Smuzhiyun 54*4882a593SmuzhiyunRelating that to netdev: At the beginning of the 2-week merge window, 55*4882a593Smuzhiyunthe ``net-next`` tree will be closed - no new changes/features. The 56*4882a593Smuzhiyunaccumulated new content of the past ~10 weeks will be passed onto 57*4882a593Smuzhiyunmainline/Linus via a pull request for vX.Y -- at the same time, the 58*4882a593Smuzhiyun``net`` tree will start accumulating fixes for this pulled content 59*4882a593Smuzhiyunrelating to vX.Y 60*4882a593Smuzhiyun 61*4882a593SmuzhiyunAn announcement indicating when ``net-next`` has been closed is usually 62*4882a593Smuzhiyunsent to netdev, but knowing the above, you can predict that in advance. 63*4882a593Smuzhiyun 64*4882a593SmuzhiyunIMPORTANT: Do not send new ``net-next`` content to netdev during the 65*4882a593Smuzhiyunperiod during which ``net-next`` tree is closed. 66*4882a593Smuzhiyun 67*4882a593SmuzhiyunShortly after the two weeks have passed (and vX.Y-rc1 is released), the 68*4882a593Smuzhiyuntree for ``net-next`` reopens to collect content for the next (vX.Y+1) 69*4882a593Smuzhiyunrelease. 70*4882a593Smuzhiyun 71*4882a593SmuzhiyunIf you aren't subscribed to netdev and/or are simply unsure if 72*4882a593Smuzhiyun``net-next`` has re-opened yet, simply check the ``net-next`` git 73*4882a593Smuzhiyunrepository link above for any new networking-related commits. You may 74*4882a593Smuzhiyunalso check the following website for the current status: 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun http://vger.kernel.org/~davem/net-next.html 77*4882a593Smuzhiyun 78*4882a593SmuzhiyunThe ``net`` tree continues to collect fixes for the vX.Y content, and is 79*4882a593Smuzhiyunfed back to Linus at regular (~weekly) intervals. Meaning that the 80*4882a593Smuzhiyunfocus for ``net`` is on stabilization and bug fixes. 81*4882a593Smuzhiyun 82*4882a593SmuzhiyunFinally, the vX.Y gets released, and the whole cycle starts over. 83*4882a593Smuzhiyun 84*4882a593SmuzhiyunQ: So where are we now in this cycle? 85*4882a593Smuzhiyun 86*4882a593SmuzhiyunLoad the mainline (Linus) page here: 87*4882a593Smuzhiyun 88*4882a593Smuzhiyun https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 89*4882a593Smuzhiyun 90*4882a593Smuzhiyunand note the top of the "tags" section. If it is rc1, it is early in 91*4882a593Smuzhiyunthe dev cycle. If it was tagged rc7 a week ago, then a release is 92*4882a593Smuzhiyunprobably imminent. 93*4882a593Smuzhiyun 94*4882a593SmuzhiyunQ: How do I indicate which tree (net vs. net-next) my patch should be in? 95*4882a593Smuzhiyun------------------------------------------------------------------------- 96*4882a593SmuzhiyunA: Firstly, think whether you have a bug fix or new "next-like" content. 97*4882a593SmuzhiyunThen once decided, assuming that you use git, use the prefix flag, i.e. 98*4882a593Smuzhiyun:: 99*4882a593Smuzhiyun 100*4882a593Smuzhiyun git format-patch --subject-prefix='PATCH net-next' start..finish 101*4882a593Smuzhiyun 102*4882a593SmuzhiyunUse ``net`` instead of ``net-next`` (always lower case) in the above for 103*4882a593Smuzhiyunbug-fix ``net`` content. If you don't use git, then note the only magic 104*4882a593Smuzhiyunin the above is just the subject text of the outgoing e-mail, and you 105*4882a593Smuzhiyuncan manually change it yourself with whatever MUA you are comfortable 106*4882a593Smuzhiyunwith. 107*4882a593Smuzhiyun 108*4882a593SmuzhiyunQ: I sent a patch and I'm wondering what happened to it? 109*4882a593Smuzhiyun-------------------------------------------------------- 110*4882a593SmuzhiyunQ: How can I tell whether it got merged? 111*4882a593SmuzhiyunA: Start by looking at the main patchworks queue for netdev: 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun https://patchwork.kernel.org/project/netdevbpf/list/ 114*4882a593Smuzhiyun 115*4882a593SmuzhiyunThe "State" field will tell you exactly where things are at with your 116*4882a593Smuzhiyunpatch. 117*4882a593Smuzhiyun 118*4882a593SmuzhiyunQ: The above only says "Under Review". How can I find out more? 119*4882a593Smuzhiyun---------------------------------------------------------------- 120*4882a593SmuzhiyunA: Generally speaking, the patches get triaged quickly (in less than 121*4882a593Smuzhiyun48h). So be patient. Asking the maintainer for status updates on your 122*4882a593Smuzhiyunpatch is a good way to ensure your patch is ignored or pushed to the 123*4882a593Smuzhiyunbottom of the priority list. 124*4882a593Smuzhiyun 125*4882a593SmuzhiyunQ: I submitted multiple versions of the patch series 126*4882a593Smuzhiyun---------------------------------------------------- 127*4882a593SmuzhiyunQ: should I directly update patchwork for the previous versions of these 128*4882a593Smuzhiyunpatch series? 129*4882a593SmuzhiyunA: No, please don't interfere with the patch status on patchwork, leave 130*4882a593Smuzhiyunit to the maintainer to figure out what is the most recent and current 131*4882a593Smuzhiyunversion that should be applied. If there is any doubt, the maintainer 132*4882a593Smuzhiyunwill reply and ask what should be done. 133*4882a593Smuzhiyun 134*4882a593SmuzhiyunQ: I made changes to only a few patches in a patch series should I resend only those changed? 135*4882a593Smuzhiyun--------------------------------------------------------------------------------------------- 136*4882a593SmuzhiyunA: No, please resend the entire patch series and make sure you do number your 137*4882a593Smuzhiyunpatches such that it is clear this is the latest and greatest set of patches 138*4882a593Smuzhiyunthat can be applied. 139*4882a593Smuzhiyun 140*4882a593SmuzhiyunQ: I submitted multiple versions of a patch series and it looks like a version other than the last one has been accepted, what should I do? 141*4882a593Smuzhiyun------------------------------------------------------------------------------------------------------------------------------------------- 142*4882a593SmuzhiyunA: There is no revert possible, once it is pushed out, it stays like that. 143*4882a593SmuzhiyunPlease send incremental versions on top of what has been merged in order to fix 144*4882a593Smuzhiyunthe patches the way they would look like if your latest patch series was to be 145*4882a593Smuzhiyunmerged. 146*4882a593Smuzhiyun 147*4882a593SmuzhiyunQ: Are there special rules regarding stable submissions on netdev? 148*4882a593Smuzhiyun--------------------------------------------------------------- 149*4882a593SmuzhiyunWhile it used to be the case that netdev submissions were not supposed 150*4882a593Smuzhiyunto carry explicit ``CC: stable@vger.kernel.org`` tags that is no longer 151*4882a593Smuzhiyunthe case today. Please follow the standard stable rules in 152*4882a593Smuzhiyun:ref:`Documentation/process/stable-kernel-rules.rst <stable_kernel_rules>`, 153*4882a593Smuzhiyunand make sure you include appropriate Fixes tags! 154*4882a593Smuzhiyun 155*4882a593SmuzhiyunQ: Is the comment style convention different for the networking content? 156*4882a593Smuzhiyun------------------------------------------------------------------------ 157*4882a593SmuzhiyunA: Yes, in a largely trivial way. Instead of this:: 158*4882a593Smuzhiyun 159*4882a593Smuzhiyun /* 160*4882a593Smuzhiyun * foobar blah blah blah 161*4882a593Smuzhiyun * another line of text 162*4882a593Smuzhiyun */ 163*4882a593Smuzhiyun 164*4882a593Smuzhiyunit is requested that you make it look like this:: 165*4882a593Smuzhiyun 166*4882a593Smuzhiyun /* foobar blah blah blah 167*4882a593Smuzhiyun * another line of text 168*4882a593Smuzhiyun */ 169*4882a593Smuzhiyun 170*4882a593SmuzhiyunQ: I am working in existing code that has the former comment style and not the latter. 171*4882a593Smuzhiyun-------------------------------------------------------------------------------------- 172*4882a593SmuzhiyunQ: Should I submit new code in the former style or the latter? 173*4882a593SmuzhiyunA: Make it the latter style, so that eventually all code in the domain 174*4882a593Smuzhiyunof netdev is of this format. 175*4882a593Smuzhiyun 176*4882a593SmuzhiyunQ: I found a bug that might have possible security implications or similar. 177*4882a593Smuzhiyun--------------------------------------------------------------------------- 178*4882a593SmuzhiyunQ: Should I mail the main netdev maintainer off-list?** 179*4882a593SmuzhiyunA: No. The current netdev maintainer has consistently requested that 180*4882a593Smuzhiyunpeople use the mailing lists and not reach out directly. If you aren't 181*4882a593SmuzhiyunOK with that, then perhaps consider mailing security@kernel.org or 182*4882a593Smuzhiyunreading about http://oss-security.openwall.org/wiki/mailing-lists/distros 183*4882a593Smuzhiyunas possible alternative mechanisms. 184*4882a593Smuzhiyun 185*4882a593SmuzhiyunQ: What level of testing is expected before I submit my change? 186*4882a593Smuzhiyun--------------------------------------------------------------- 187*4882a593SmuzhiyunA: If your changes are against ``net-next``, the expectation is that you 188*4882a593Smuzhiyunhave tested by layering your changes on top of ``net-next``. Ideally 189*4882a593Smuzhiyunyou will have done run-time testing specific to your change, but at a 190*4882a593Smuzhiyunminimum, your changes should survive an ``allyesconfig`` and an 191*4882a593Smuzhiyun``allmodconfig`` build without new warnings or failures. 192*4882a593Smuzhiyun 193*4882a593SmuzhiyunQ: How do I post corresponding changes to user space components? 194*4882a593Smuzhiyun---------------------------------------------------------------- 195*4882a593SmuzhiyunA: User space code exercising kernel features should be posted 196*4882a593Smuzhiyunalongside kernel patches. This gives reviewers a chance to see 197*4882a593Smuzhiyunhow any new interface is used and how well it works. 198*4882a593Smuzhiyun 199*4882a593SmuzhiyunWhen user space tools reside in the kernel repo itself all changes 200*4882a593Smuzhiyunshould generally come as one series. If series becomes too large 201*4882a593Smuzhiyunor the user space project is not reviewed on netdev include a link 202*4882a593Smuzhiyunto a public repo where user space patches can be seen. 203*4882a593Smuzhiyun 204*4882a593SmuzhiyunIn case user space tooling lives in a separate repository but is 205*4882a593Smuzhiyunreviewed on netdev (e.g. patches to `iproute2` tools) kernel and 206*4882a593Smuzhiyunuser space patches should form separate series (threads) when posted 207*4882a593Smuzhiyunto the mailing list, e.g.:: 208*4882a593Smuzhiyun 209*4882a593Smuzhiyun [PATCH net-next 0/3] net: some feature cover letter 210*4882a593Smuzhiyun └─ [PATCH net-next 1/3] net: some feature prep 211*4882a593Smuzhiyun └─ [PATCH net-next 2/3] net: some feature do it 212*4882a593Smuzhiyun └─ [PATCH net-next 3/3] selftest: net: some feature 213*4882a593Smuzhiyun 214*4882a593Smuzhiyun [PATCH iproute2-next] ip: add support for some feature 215*4882a593Smuzhiyun 216*4882a593SmuzhiyunPosting as one thread is discouraged because it confuses patchwork 217*4882a593Smuzhiyun(as of patchwork 2.2.2). 218*4882a593Smuzhiyun 219*4882a593SmuzhiyunQ: Any other tips to help ensure my net/net-next patch gets OK'd? 220*4882a593Smuzhiyun----------------------------------------------------------------- 221*4882a593SmuzhiyunA: Attention to detail. Re-read your own work as if you were the 222*4882a593Smuzhiyunreviewer. You can start with using ``checkpatch.pl``, perhaps even with 223*4882a593Smuzhiyunthe ``--strict`` flag. But do not be mindlessly robotic in doing so. 224*4882a593SmuzhiyunIf your change is a bug fix, make sure your commit log indicates the 225*4882a593Smuzhiyunend-user visible symptom, the underlying reason as to why it happens, 226*4882a593Smuzhiyunand then if necessary, explain why the fix proposed is the best way to 227*4882a593Smuzhiyunget things done. Don't mangle whitespace, and as is common, don't 228*4882a593Smuzhiyunmis-indent function arguments that span multiple lines. If it is your 229*4882a593Smuzhiyunfirst patch, mail it to yourself so you can test apply it to an 230*4882a593Smuzhiyununpatched tree to confirm infrastructure didn't mangle it. 231*4882a593Smuzhiyun 232*4882a593SmuzhiyunFinally, go back and read 233*4882a593Smuzhiyun:ref:`Documentation/process/submitting-patches.rst <submittingpatches>` 234*4882a593Smuzhiyunto be sure you are not repeating some common mistake documented there. 235