1.. SPDX-License-Identifier: GPL-2.0
2
3.. _netdev-FAQ:
4
5==========
6netdev FAQ
7==========
8
9What is netdev?
10---------------
11It 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
28How do the changes posted to netdev make their way into Linux?
29--------------------------------------------------------------
30There 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/netdev/net.git
38- https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
39
40How often do changes from these trees make it to the mainline Linus tree?
41-------------------------------------------------------------------------
42To 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
84So where are we now in this cycle?
85----------------------------------
86
87Load the mainline (Linus) page here:
88
89  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
90
91and note the top of the "tags" section.  If it is rc1, it is early in
92the dev cycle.  If it was tagged rc7 a week ago, then a release is
93probably imminent.
94
95How do I indicate which tree (net vs. net-next) my patch should be in?
96----------------------------------------------------------------------
97Firstly, think whether you have a bug fix or new "next-like" content.
98Then once decided, assuming that you use git, use the prefix flag, i.e.
99::
100
101  git format-patch --subject-prefix='PATCH net-next' start..finish
102
103Use ``net`` instead of ``net-next`` (always lower case) in the above for
104bug-fix ``net`` content.  If you don't use git, then note the only magic
105in the above is just the subject text of the outgoing e-mail, and you
106can manually change it yourself with whatever MUA you are comfortable
107with.
108
109I sent a patch and I'm wondering what happened to it - how can I tell whether it got merged?
110--------------------------------------------------------------------------------------------
111Start by looking at the main patchworks queue for netdev:
112
113  https://patchwork.kernel.org/project/netdevbpf/list/
114
115The "State" field will tell you exactly where things are at with your
116patch.
117
118The above only says "Under Review".  How can I find out more?
119-------------------------------------------------------------
120Generally 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
125I submitted multiple versions of the patch series. Should I directly update patchwork for the previous versions of these patch series?
126--------------------------------------------------------------------------------------------------------------------------------------
127No, please don't interfere with the patch status on patchwork, leave
128it to the maintainer to figure out what is the most recent and current
129version that should be applied. If there is any doubt, the maintainer
130will reply and ask what should be done.
131
132I made changes to only a few patches in a patch series should I resend only those changed?
133------------------------------------------------------------------------------------------
134No, please resend the entire patch series and make sure you do number your
135patches such that it is clear this is the latest and greatest set of patches
136that can be applied.
137
138I 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?
139----------------------------------------------------------------------------------------------------------------------------------------
140There is no revert possible, once it is pushed out, it stays like that.
141Please send incremental versions on top of what has been merged in order to fix
142the patches the way they would look like if your latest patch series was to be
143merged.
144
145Are there special rules regarding stable submissions on netdev?
146---------------------------------------------------------------
147While it used to be the case that netdev submissions were not supposed
148to carry explicit ``CC: stable@vger.kernel.org`` tags that is no longer
149the case today. Please follow the standard stable rules in
150:ref:`Documentation/process/stable-kernel-rules.rst <stable_kernel_rules>`,
151and make sure you include appropriate Fixes tags!
152
153Is the comment style convention different for the networking content?
154---------------------------------------------------------------------
155Yes, in a largely trivial way.  Instead of this::
156
157  /*
158   * foobar blah blah blah
159   * another line of text
160   */
161
162it is requested that you make it look like this::
163
164  /* foobar blah blah blah
165   * another line of text
166   */
167
168I am working in existing code that has the former comment style and not the latter. Should I submit new code in the former style or the latter?
169-----------------------------------------------------------------------------------------------------------------------------------------------
170Make it the latter style, so that eventually all code in the domain
171of netdev is of this format.
172
173I found a bug that might have possible security implications or similar. Should I mail the main netdev maintainer off-list?
174---------------------------------------------------------------------------------------------------------------------------
175No. The current netdev maintainer has consistently requested that
176people use the mailing lists and not reach out directly.  If you aren't
177OK with that, then perhaps consider mailing security@kernel.org or
178reading about http://oss-security.openwall.org/wiki/mailing-lists/distros
179as possible alternative mechanisms.
180
181What level of testing is expected before I submit my change?
182------------------------------------------------------------
183If your changes are against ``net-next``, the expectation is that you
184have tested by layering your changes on top of ``net-next``.  Ideally
185you will have done run-time testing specific to your change, but at a
186minimum, your changes should survive an ``allyesconfig`` and an
187``allmodconfig`` build without new warnings or failures.
188
189How do I post corresponding changes to user space components?
190-------------------------------------------------------------
191User space code exercising kernel features should be posted
192alongside kernel patches. This gives reviewers a chance to see
193how any new interface is used and how well it works.
194
195When user space tools reside in the kernel repo itself all changes
196should generally come as one series. If series becomes too large
197or the user space project is not reviewed on netdev include a link
198to a public repo where user space patches can be seen.
199
200In case user space tooling lives in a separate repository but is
201reviewed on netdev  (e.g. patches to `iproute2` tools) kernel and
202user space patches should form separate series (threads) when posted
203to the mailing list, e.g.::
204
205  [PATCH net-next 0/3] net: some feature cover letter
206   └─ [PATCH net-next 1/3] net: some feature prep
207   └─ [PATCH net-next 2/3] net: some feature do it
208   └─ [PATCH net-next 3/3] selftest: net: some feature
209
210  [PATCH iproute2-next] ip: add support for some feature
211
212Posting as one thread is discouraged because it confuses patchwork
213(as of patchwork 2.2.2).
214
215Can I reproduce the checks from patchwork on my local machine?
216--------------------------------------------------------------
217
218Checks in patchwork are mostly simple wrappers around existing kernel
219scripts, the sources are available at:
220
221https://github.com/kuba-moo/nipa/tree/master/tests
222
223Running all the builds and checks locally is a pain, can I post my patches and have the patchwork bot validate them?
224--------------------------------------------------------------------------------------------------------------------
225
226No, you must ensure that your patches are ready by testing them locally
227before posting to the mailing list. The patchwork build bot instance
228gets overloaded very easily and netdev@vger really doesn't need more
229traffic if we can help it.
230
231netdevsim is great, can I extend it for my out-of-tree tests?
232-------------------------------------------------------------
233
234No, `netdevsim` is a test vehicle solely for upstream tests.
235(Please add your tests under tools/testing/selftests/.)
236
237We also give no guarantees that `netdevsim` won't change in the future
238in a way which would break what would normally be considered uAPI.
239
240Is netdevsim considered a "user" of an API?
241-------------------------------------------
242
243Linux kernel has a long standing rule that no API should be added unless
244it has a real, in-tree user. Mock-ups and tests based on `netdevsim` are
245strongly encouraged when adding new APIs, but `netdevsim` in itself
246is **not** considered a use case/user.
247
248Any other tips to help ensure my net/net-next patch gets OK'd?
249--------------------------------------------------------------
250Attention to detail.  Re-read your own work as if you were the
251reviewer.  You can start with using ``checkpatch.pl``, perhaps even with
252the ``--strict`` flag.  But do not be mindlessly robotic in doing so.
253If your change is a bug fix, make sure your commit log indicates the
254end-user visible symptom, the underlying reason as to why it happens,
255and then if necessary, explain why the fix proposed is the best way to
256get things done.  Don't mangle whitespace, and as is common, don't
257mis-indent function arguments that span multiple lines.  If it is your
258first patch, mail it to yourself so you can test apply it to an
259unpatched tree to confirm infrastructure didn't mangle it.
260
261Finally, go back and read
262:ref:`Documentation/process/submitting-patches.rst <submittingpatches>`
263to be sure you are not repeating some common mistake documented there.
264