22
33 .. _netdev-FAQ :
44
5- ==========
6- netdev FAQ
7- ==========
5+ =============================
6+ Networking subsystem (netdev)
7+ =============================
88
99tl;dr
1010-----
@@ -15,14 +15,15 @@ tl;dr
1515 - don't repost your patches within one 24h period
1616 - reverse xmas tree
1717
18- What is netdev?
19- ---------------
20- It is a mailing list for all network-related Linux stuff. This
18+ netdev
19+ ------
20+
21+ netdev is a mailing list for all network-related Linux stuff. This
2122includes anything found under net/ (i.e. core code like IPv6) and
2223drivers/net (i.e. hardware specific drivers) in the Linux source tree.
2324
2425Note that some subsystems (e.g. wireless drivers) which have a high
25- volume of traffic have their own specific mailing lists.
26+ volume of traffic have their own specific mailing lists and trees .
2627
2728The netdev list is managed (like many other Linux mailing lists) through
2829VGER (http://vger.kernel.org/) with archives available at
@@ -32,21 +33,10 @@ Aside from subsystems like those mentioned above, all network-related
3233Linux development (i.e. RFC, review, comments, etc.) takes place on
3334netdev.
3435
35- How do the changes posted to netdev make their way into Linux?
36- --------------------------------------------------------------
37- There are always two trees (git repositories) in play. Both are
38- driven by David Miller, the main network maintainer. There is the
39- ``net `` tree, and the ``net-next `` tree. As you can probably guess from
40- the names, the ``net `` tree is for fixes to existing code already in the
41- mainline tree from Linus, and ``net-next `` is where the new code goes
42- for the future release. You can find the trees here:
43-
44- - https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
45- - https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
36+ Development cycle
37+ -----------------
4638
47- How often do changes from these trees make it to the mainline Linus tree?
48- -------------------------------------------------------------------------
49- To understand this, you need to know a bit of background information on
39+ Here is a bit of background information on
5040the cadence of Linux development. Each new release starts off with a
5141two week "merge window" where the main maintainers feed their new stuff
5242to Linus for merging into the mainline tree. After the two weeks, the
@@ -58,9 +48,33 @@ rc2 is released. This repeats on a roughly weekly basis until rc7
5848state of churn), and a week after the last vX.Y-rcN was done, the
5949official vX.Y is released.
6050
61- Relating that to netdev: At the beginning of the 2-week merge window,
62- the ``net-next `` tree will be closed - no new changes/features. The
63- accumulated new content of the past ~10 weeks will be passed onto
51+ To find out where we are now in the cycle - load the mainline (Linus)
52+ page here:
53+
54+ https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
55+
56+ and note the top of the "tags" section. If it is rc1, it is early in
57+ the dev cycle. If it was tagged rc7 a week ago, then a release is
58+ probably imminent. If the most recent tag is a final release tag
59+ (without an ``-rcN `` suffix) - we are most likely in a merge window
60+ and ``net-next `` is closed.
61+
62+ git trees and patch flow
63+ ------------------------
64+
65+ There are two networking trees (git repositories) in play. Both are
66+ driven by David Miller, the main network maintainer. There is the
67+ ``net `` tree, and the ``net-next `` tree. As you can probably guess from
68+ the names, the ``net `` tree is for fixes to existing code already in the
69+ mainline tree from Linus, and ``net-next `` is where the new code goes
70+ for the future release. You can find the trees here:
71+
72+ - https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
73+ - https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
74+
75+ Relating that to kernel development: At the beginning of the 2-week
76+ merge window, the ``net-next `` tree will be closed - no new changes/features.
77+ The accumulated new content of the past ~10 weeks will be passed onto
6478mainline/Linus via a pull request for vX.Y -- at the same time, the
6579``net `` tree will start accumulating fixes for this pulled content
6680relating to vX.Y
@@ -92,22 +106,14 @@ focus for ``net`` is on stabilization and bug fixes.
92106
93107Finally, the vX.Y gets released, and the whole cycle starts over.
94108
95- So where are we now in this cycle?
96- ----------------------------------
109+ netdev patch review
110+ -------------------
97111
98- Load the mainline (Linus) page here:
112+ Patch status
113+ ~~~~~~~~~~~~
99114
100- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
101-
102- and note the top of the "tags" section. If it is rc1, it is early in
103- the dev cycle. If it was tagged rc7 a week ago, then a release is
104- probably imminent. If the most recent tag is a final release tag
105- (without an ``-rcN `` suffix) - we are most likely in a merge window
106- and ``net-next `` is closed.
107-
108- How can I tell the status of a patch I've sent?
109- -----------------------------------------------
110- Start by looking at the main patchworks queue for netdev:
115+ Status of a patch can be checked by looking at the main patchwork
116+ queue for netdev:
111117
112118 https://patchwork.kernel.org/project/netdevbpf/list/
113119
@@ -116,55 +122,68 @@ patch. Patches are indexed by the ``Message-ID`` header of the emails
116122which carried them so if you have trouble finding your patch append
117123the value of ``Message-ID `` to the URL above.
118124
119- Should I directly update patchwork state of my own patches?
120- -----------------------------------------------------------
125+ Updating patch status
126+ ~~~~~~~~~~~~~~~~~~~~~
127+
121128It may be tempting to help the maintainers and update the state of your
122- own patches when you post a new version or spot a bug. Please do not do that.
129+ own patches when you post a new version or spot a bug. Please **do not **
130+ do that.
123131Interfering with the patch status on patchwork will only cause confusion. Leave
124132it to the maintainer to figure out what is the most recent and current
125133version that should be applied. If there is any doubt, the maintainer
126134will reply and ask what should be done.
127135
128- How long before my patch is accepted?
129- -------------------------------------
136+ Review timelines
137+ ~~~~~~~~~~~~~~~~
138+
130139Generally speaking, the patches get triaged quickly (in less than
13114048h). But be patient, if your patch is active in patchwork (i.e. it's
132141listed on the project's patch list) the chances it was missed are close to zero.
133142Asking the maintainer for status updates on your
134143patch is a good way to ensure your patch is ignored or pushed to the
135144bottom of the priority list.
136145
137- I made changes to only a few patches in a patch series should I resend only those changed?
138- ------------------------------------------------------------------------------------------
139- No, please resend the entire patch series and make sure you do number your
146+ Partial resends
147+ ~~~~~~~~~~~~~~~
148+
149+ Please always resend the entire patch series and make sure you do number your
140150patches such that it is clear this is the latest and greatest set of patches
141- that can be applied.
151+ that can be applied. Do not try to resend just the patches which changed.
152+
153+ Handling misapplied patches
154+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
142155
143- 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?
144- ----------------------------------------------------------------------------------------------------------------------------------------
156+ Occasionally a patch series gets applied before receiving critical feedback,
157+ or the wrong version of a series gets applied.
145158There is no revert possible, once it is pushed out, it stays like that.
146159Please send incremental versions on top of what has been merged in order to fix
147160the patches the way they would look like if your latest patch series was to be
148161merged.
149162
150- Are there special rules regarding stable submissions on netdev?
151- ---------------------------------------------------------------
163+ Stable tree
164+ ~~~~~~~~~~~
165+
152166While it used to be the case that netdev submissions were not supposed
153167to carry explicit ``
CC: [email protected] `` tags that is no longer
154168the case today. Please follow the standard stable rules in
155169:ref: `Documentation/process/stable-kernel-rules.rst <stable_kernel_rules >`,
156170and make sure you include appropriate Fixes tags!
157171
158- I found a bug that might have possible security implications or similar. Should I mail the main netdev maintainer off-list?
159- ---------------------------------------------------------------------------------------------------------------------------
160- No. The current netdev maintainer has consistently requested that
172+ Security fixes
173+ ~~~~~~~~~~~~~~
174+
175+ Do not email netdev maintainers directly if you think you discovered
176+ a bug that might have possible security implications.
177+ The current netdev maintainer has consistently requested that
161178people use the mailing lists and not reach out directly. If you aren't
162179OK with that, then perhaps consider mailing
[email protected] or
163180reading about http://oss-security.openwall.org/wiki/mailing-lists/distros
164181as possible alternative mechanisms.
165182
166- How do I post corresponding changes to user space components?
167- -------------------------------------------------------------
183+
184+ Co-posting changes to user space components
185+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
186+
168187User space code exercising kernel features should be posted
169188alongside kernel patches. This gives reviewers a chance to see
170189how any new interface is used and how well it works.
@@ -189,9 +208,10 @@ to the mailing list, e.g.::
189208Posting as one thread is discouraged because it confuses patchwork
190209(as of patchwork 2.2.2).
191210
192- Any other tips to help ensure my net/net-next patch gets OK'd?
193- --------------------------------------------------------------
194- Attention to detail. Re-read your own work as if you were the
211+ Preparing changes
212+ -----------------
213+
214+ Attention to detail is important. Re-read your own work as if you were the
195215reviewer. You can start with using ``checkpatch.pl ``, perhaps even with
196216the ``--strict `` flag. But do not be mindlessly robotic in doing so.
197217If your change is a bug fix, make sure your commit log indicates the
@@ -206,8 +226,9 @@ Finally, go back and read
206226:ref: `Documentation/process/submitting-patches.rst <submittingpatches >`
207227to be sure you are not repeating some common mistake documented there.
208228
209- How do I indicate which tree (net vs. net-next) my patch should be in?
210- ----------------------------------------------------------------------
229+ Indicating target tree
230+ ~~~~~~~~~~~~~~~~~~~~~~
231+
211232To help maintainers and CI bots you should explicitly mark which tree
212233your patch is targeting. Assuming that you use git, use the prefix
213234flag::
@@ -217,8 +238,8 @@ flag::
217238Use ``net `` instead of ``net-next `` (always lower case) in the above for
218239bug-fix ``net `` content.
219240
220- How do I divide my work into patches?
221- -------------------------------------
241+ Dividing work into patches
242+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
222243
223244Put yourself in the shoes of the reviewer. Each patch is read separately
224245and therefore should constitute a comprehensible step towards your stated
@@ -231,9 +252,11 @@ just do it. As a result, a sequence of smaller series gets merged quicker and
231252with better review coverage. Re-posting large series also increases the mailing
232253list traffic.
233254
234- Is the comment style convention different for the networking content?
235- ---------------------------------------------------------------------
236- Yes, in a largely trivial way. Instead of this::
255+ Multi-line comments
256+ ~~~~~~~~~~~~~~~~~~~
257+
258+ Comment style convention is slightly different for networking and most of
259+ the tree. Instead of this::
237260
238261 /*
239262 * foobar blah blah blah
@@ -246,8 +269,8 @@ it is requested that you make it look like this::
246269 * another line of text
247270 */
248271
249- What is "reverse xmas tree"?
250- ----------------------------
272+ Local variable ordering ( "reverse xmas tree", "RCS")
273+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
251274
252275Netdev has a convention for ordering local variables in functions.
253276Order the variable declaration lines longest to shortest, e.g.::
@@ -259,13 +282,16 @@ Order the variable declaration lines longest to shortest, e.g.::
259282If there are dependencies between the variables preventing the ordering
260283move the initialization out of line.
261284
262- I am working in existing code which uses non-standard formatting. Which formatting should I use?
263- ------------------------------------------------------------------------------------------------
264- Make your code follow the most recent guidelines, so that eventually all code
285+ Format precedence
286+ ~~~~~~~~~~~~~~~~~
287+
288+ When working in existing code which uses nonstandard formatting make
289+ your code follow the most recent guidelines, so that eventually all code
265290in the domain of netdev is in the preferred format.
266291
267- I have received review feedback, when should I post a revised version of the patches?
268- -------------------------------------------------------------------------------------
292+ Resending after review
293+ ~~~~~~~~~~~~~~~~~~~~~~
294+
269295Allow at least 24 hours to pass between postings. This will ensure reviewers
270296from all geographical locations have a chance to chime in. Do not wait
271297too long (weeks) between postings either as it will make it harder for reviewers
@@ -275,8 +301,12 @@ Make sure you address all the feedback in your new posting. Do not post a new
275301version of the code if the discussion about the previous version is still
276302ongoing, unless directly instructed by a reviewer.
277303
278- What level of testing is expected before I submit my change?
279- ------------------------------------------------------------
304+ Testing
305+ -------
306+
307+ Expected level of testing
308+ ~~~~~~~~~~~~~~~~~~~~~~~~~
309+
280310At the very minimum your changes must survive an ``allyesconfig `` and an
281311``allmodconfig `` build with ``W=1 `` set without new warnings or failures.
282312
@@ -287,43 +317,42 @@ and the patch series contains a set of kernel selftest for
287317You are expected to test your changes on top of the relevant networking
288318tree (``net `` or ``net-next ``) and not e.g. a stable tree or ``linux-next ``.
289319
290- Can I reproduce the checks from patchwork on my local machine?
291- --------------------------------------------------------------
320+ patchwork checks
321+ ~~~~~~~~~~~~~~~~
292322
293323Checks in patchwork are mostly simple wrappers around existing kernel
294324scripts, the sources are available at:
295325
296326https://github.com/kuba-moo/nipa/tree/master/tests
297327
298- Running all the builds and checks locally is a pain, can I post my patches and have the patchwork bot validate them?
299- --------------------------------------------------------------------------------------------------------------------
300-
301- No, you must ensure that your patches are ready by testing them locally
328+ **Do not ** post your patches just to run them through the checks.
329+ You must ensure that your patches are ready by testing them locally
302330before posting to the mailing list. The patchwork build bot instance
303331gets overloaded very easily and netdev@vger really doesn't need more
304332traffic if we can help it.
305333
306- netdevsim is great, can I extend it for my out-of-tree tests?
307- -------------------------------------------------------------
334+ netdevsim
335+ ~~~~~~~~~
308336
309- No, ``netdevsim `` is a test vehicle solely for upstream tests.
310- (Please add your tests under ``tools/testing/selftests/ ``.)
337+ ``netdevsim `` is a test driver which can be used to exercise driver
338+ configuration APIs without requiring capable hardware.
339+ Mock-ups and tests based on ``netdevsim `` are strongly encouraged when
340+ adding new APIs, but ``netdevsim `` in itself is **not ** considered
341+ a use case/user. You must also implement the new APIs in a real driver.
311342
312- We also give no guarantees that ``netdevsim `` won't change in the future
343+ We give no guarantees that ``netdevsim `` won't change in the future
313344in a way which would break what would normally be considered uAPI.
314345
315- Is netdevsim considered a "user" of an API?
316- -------------------------------------------
317-
318- Linux kernel has a long standing rule that no API should be added unless
319- it has a real, in-tree user. Mock-ups and tests based on ``netdevsim `` are
320- strongly encouraged when adding new APIs, but ``netdevsim `` in itself
321- is **not ** considered a use case/user.
346+ ``netdevsim `` is reserved for use by upstream tests only, so any
347+ new ``netdevsim `` features must be accompanied by selftests under
348+ ``tools/testing/selftests/ ``.
322349
323- My company uses peer feedback in employee performance reviews. Can I ask netdev maintainers for feedback?
324- ---------------------------------------------------------------------------------------------------------
350+ Testimonials / feedback
351+ -----------------------
325352
326- Yes, especially if you spend significant amount of time reviewing code
353+ Some companies use peer feedback in employee performance reviews.
354+ Please feel free to request feedback from netdev maintainers,
355+ especially if you spend significant amount of time reviewing code
327356and go out of your way to improve shared infrastructure.
328357
329358The feedback must be requested by you, the contributor, and will always
0 commit comments