Merge tag 'drm-misc-fixes-2022-07-07-1' of ssh://git.freedesktop.org/git/drm/drm...
[linux-2.6-microblaze.git] / Documentation / process / maintainer-netdev.rst
1 .. SPDX-License-Identifier: GPL-2.0
2
3 .. _netdev-FAQ:
4
5 ==========
6 netdev FAQ
7 ==========
8
9 tl;dr
10 -----
11
12  - designate your patch to a tree - ``[PATCH net]`` or ``[PATCH net-next]``
13  - for fixes the ``Fixes:`` tag is required, regardless of the tree
14  - don't post large series (> 15 patches), break them up
15  - don't repost your patches within one 24h period
16  - reverse xmas tree
17
18 What is netdev?
19 ---------------
20 It is a mailing list for all network-related Linux stuff.  This
21 includes anything found under net/ (i.e. core code like IPv6) and
22 drivers/net (i.e. hardware specific drivers) in the Linux source tree.
23
24 Note that some subsystems (e.g. wireless drivers) which have a high
25 volume of traffic have their own specific mailing lists.
26
27 The netdev list is managed (like many other Linux mailing lists) through
28 VGER (http://vger.kernel.org/) with archives available at
29 https://lore.kernel.org/netdev/
30
31 Aside from subsystems like those mentioned above, all network-related
32 Linux development (i.e. RFC, review, comments, etc.) takes place on
33 netdev.
34
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
46
47 How do I indicate which tree (net vs. net-next) my patch should be in?
48 ----------------------------------------------------------------------
49 To help maintainers and CI bots you should explicitly mark which tree
50 your patch is targeting. Assuming that you use git, use the prefix
51 flag::
52
53   git format-patch --subject-prefix='PATCH net-next' start..finish
54
55 Use ``net`` instead of ``net-next`` (always lower case) in the above for
56 bug-fix ``net`` content.
57
58 How often do changes from these trees make it to the mainline Linus tree?
59 -------------------------------------------------------------------------
60 To understand this, you need to know a bit of background information on
61 the cadence of Linux development.  Each new release starts off with a
62 two week "merge window" where the main maintainers feed their new stuff
63 to Linus for merging into the mainline tree.  After the two weeks, the
64 merge window is closed, and it is called/tagged ``-rc1``.  No new
65 features get mainlined after this -- only fixes to the rc1 content are
66 expected.  After roughly a week of collecting fixes to the rc1 content,
67 rc2 is released.  This repeats on a roughly weekly basis until rc7
68 (typically; sometimes rc6 if things are quiet, or rc8 if things are in a
69 state of churn), and a week after the last vX.Y-rcN was done, the
70 official vX.Y is released.
71
72 Relating that to netdev: At the beginning of the 2-week merge window,
73 the ``net-next`` tree will be closed - no new changes/features.  The
74 accumulated new content of the past ~10 weeks will be passed onto
75 mainline/Linus via a pull request for vX.Y -- at the same time, the
76 ``net`` tree will start accumulating fixes for this pulled content
77 relating to vX.Y
78
79 An announcement indicating when ``net-next`` has been closed is usually
80 sent to netdev, but knowing the above, you can predict that in advance.
81
82 .. warning::
83   Do not send new ``net-next`` content to netdev during the
84   period during which ``net-next`` tree is closed.
85
86 RFC patches sent for review only are obviously welcome at any time
87 (use ``--subject-prefix='RFC net-next'`` with ``git format-patch``).
88
89 Shortly after the two weeks have passed (and vX.Y-rc1 is released), the
90 tree for ``net-next`` reopens to collect content for the next (vX.Y+1)
91 release.
92
93 If you aren't subscribed to netdev and/or are simply unsure if
94 ``net-next`` has re-opened yet, simply check the ``net-next`` git
95 repository link above for any new networking-related commits.  You may
96 also check the following website for the current status:
97
98   http://vger.kernel.org/~davem/net-next.html
99
100 The ``net`` tree continues to collect fixes for the vX.Y content, and is
101 fed back to Linus at regular (~weekly) intervals.  Meaning that the
102 focus for ``net`` is on stabilization and bug fixes.
103
104 Finally, the vX.Y gets released, and the whole cycle starts over.
105
106 So where are we now in this cycle?
107 ----------------------------------
108
109 Load the mainline (Linus) page here:
110
111   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
112
113 and note the top of the "tags" section.  If it is rc1, it is early in
114 the dev cycle.  If it was tagged rc7 a week ago, then a release is
115 probably imminent. If the most recent tag is a final release tag
116 (without an ``-rcN`` suffix) - we are most likely in a merge window
117 and ``net-next`` is closed.
118
119 How can I tell the status of a patch I've sent?
120 -----------------------------------------------
121 Start by looking at the main patchworks queue for netdev:
122
123   https://patchwork.kernel.org/project/netdevbpf/list/
124
125 The "State" field will tell you exactly where things are at with your
126 patch. Patches are indexed by the ``Message-ID`` header of the emails
127 which carried them so if you have trouble finding your patch append
128 the value of ``Message-ID`` to the URL above.
129
130 How long before my patch is accepted?
131 -------------------------------------
132 Generally speaking, the patches get triaged quickly (in less than
133 48h). But be patient, if your patch is active in patchwork (i.e. it's
134 listed on the project's patch list) the chances it was missed are close to zero.
135 Asking the maintainer for status updates on your
136 patch is a good way to ensure your patch is ignored or pushed to the
137 bottom of the priority list.
138
139 Should I directly update patchwork state of my own patches?
140 -----------------------------------------------------------
141 It may be tempting to help the maintainers and update the state of your
142 own patches when you post a new version or spot a bug. Please do not do that.
143 Interfering with the patch status on patchwork will only cause confusion. Leave
144 it to the maintainer to figure out what is the most recent and current
145 version that should be applied. If there is any doubt, the maintainer
146 will reply and ask what should be done.
147
148 How do I divide my work into patches?
149 -------------------------------------
150
151 Put yourself in the shoes of the reviewer. Each patch is read separately
152 and therefore should constitute a comprehensible step towards your stated
153 goal.
154
155 Avoid sending series longer than 15 patches. Larger series takes longer
156 to review as reviewers will defer looking at it until they find a large
157 chunk of time. A small series can be reviewed in a short time, so Maintainers
158 just do it. As a result, a sequence of smaller series gets merged quicker and
159 with better review coverage. Re-posting large series also increases the mailing
160 list traffic.
161
162 I made changes to only a few patches in a patch series should I resend only those changed?
163 ------------------------------------------------------------------------------------------
164 No, please resend the entire patch series and make sure you do number your
165 patches such that it is clear this is the latest and greatest set of patches
166 that can be applied.
167
168 I have received review feedback, when should I post a revised version of the patches?
169 -------------------------------------------------------------------------------------
170 Allow at least 24 hours to pass between postings. This will ensure reviewers
171 from all geographical locations have a chance to chime in. Do not wait
172 too long (weeks) between postings either as it will make it harder for reviewers
173 to recall all the context.
174
175 Make sure you address all the feedback in your new posting. Do not post a new
176 version of the code if the discussion about the previous version is still
177 ongoing, unless directly instructed by a reviewer.
178
179 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?
180 ----------------------------------------------------------------------------------------------------------------------------------------
181 There is no revert possible, once it is pushed out, it stays like that.
182 Please send incremental versions on top of what has been merged in order to fix
183 the patches the way they would look like if your latest patch series was to be
184 merged.
185
186 Are there special rules regarding stable submissions on netdev?
187 ---------------------------------------------------------------
188 While it used to be the case that netdev submissions were not supposed
189 to carry explicit ``CC: stable@vger.kernel.org`` tags that is no longer
190 the case today. Please follow the standard stable rules in
191 :ref:`Documentation/process/stable-kernel-rules.rst <stable_kernel_rules>`,
192 and make sure you include appropriate Fixes tags!
193
194 Is the comment style convention different for the networking content?
195 ---------------------------------------------------------------------
196 Yes, in a largely trivial way.  Instead of this::
197
198   /*
199    * foobar blah blah blah
200    * another line of text
201    */
202
203 it is requested that you make it look like this::
204
205   /* foobar blah blah blah
206    * another line of text
207    */
208
209 What is "reverse xmas tree"?
210 ----------------------------
211
212 Netdev has a convention for ordering local variables in functions.
213 Order the variable declaration lines longest to shortest, e.g.::
214
215   struct scatterlist *sg;
216   struct sk_buff *skb;
217   int err, i;
218
219 If there are dependencies between the variables preventing the ordering
220 move the initialization out of line.
221
222 I am working in existing code which uses non-standard formatting. Which formatting should I use?
223 ------------------------------------------------------------------------------------------------
224 Make your code follow the most recent guidelines, so that eventually all code
225 in the domain of netdev is in the preferred format.
226
227 I found a bug that might have possible security implications or similar. Should I mail the main netdev maintainer off-list?
228 ---------------------------------------------------------------------------------------------------------------------------
229 No. The current netdev maintainer has consistently requested that
230 people use the mailing lists and not reach out directly.  If you aren't
231 OK with that, then perhaps consider mailing security@kernel.org or
232 reading about http://oss-security.openwall.org/wiki/mailing-lists/distros
233 as possible alternative mechanisms.
234
235 What level of testing is expected before I submit my change?
236 ------------------------------------------------------------
237 At the very minimum your changes must survive an ``allyesconfig`` and an
238 ``allmodconfig`` build with ``W=1`` set without new warnings or failures.
239
240 Ideally you will have done run-time testing specific to your change,
241 and the patch series contains a set of kernel selftest for
242 ``tools/testing/selftests/net`` or using the KUnit framework.
243
244 You are expected to test your changes on top of the relevant networking
245 tree (``net`` or ``net-next``) and not e.g. a stable tree or ``linux-next``.
246
247 How do I post corresponding changes to user space components?
248 -------------------------------------------------------------
249 User space code exercising kernel features should be posted
250 alongside kernel patches. This gives reviewers a chance to see
251 how any new interface is used and how well it works.
252
253 When user space tools reside in the kernel repo itself all changes
254 should generally come as one series. If series becomes too large
255 or the user space project is not reviewed on netdev include a link
256 to a public repo where user space patches can be seen.
257
258 In case user space tooling lives in a separate repository but is
259 reviewed on netdev  (e.g. patches to ``iproute2`` tools) kernel and
260 user space patches should form separate series (threads) when posted
261 to the mailing list, e.g.::
262
263   [PATCH net-next 0/3] net: some feature cover letter
264    └─ [PATCH net-next 1/3] net: some feature prep
265    └─ [PATCH net-next 2/3] net: some feature do it
266    └─ [PATCH net-next 3/3] selftest: net: some feature
267
268   [PATCH iproute2-next] ip: add support for some feature
269
270 Posting as one thread is discouraged because it confuses patchwork
271 (as of patchwork 2.2.2).
272
273 Can I reproduce the checks from patchwork on my local machine?
274 --------------------------------------------------------------
275
276 Checks in patchwork are mostly simple wrappers around existing kernel
277 scripts, the sources are available at:
278
279 https://github.com/kuba-moo/nipa/tree/master/tests
280
281 Running all the builds and checks locally is a pain, can I post my patches and have the patchwork bot validate them?
282 --------------------------------------------------------------------------------------------------------------------
283
284 No, you must ensure that your patches are ready by testing them locally
285 before posting to the mailing list. The patchwork build bot instance
286 gets overloaded very easily and netdev@vger really doesn't need more
287 traffic if we can help it.
288
289 netdevsim is great, can I extend it for my out-of-tree tests?
290 -------------------------------------------------------------
291
292 No, ``netdevsim`` is a test vehicle solely for upstream tests.
293 (Please add your tests under ``tools/testing/selftests/``.)
294
295 We also give no guarantees that ``netdevsim`` won't change in the future
296 in a way which would break what would normally be considered uAPI.
297
298 Is netdevsim considered a "user" of an API?
299 -------------------------------------------
300
301 Linux kernel has a long standing rule that no API should be added unless
302 it has a real, in-tree user. Mock-ups and tests based on ``netdevsim`` are
303 strongly encouraged when adding new APIs, but ``netdevsim`` in itself
304 is **not** considered a use case/user.
305
306 Any other tips to help ensure my net/net-next patch gets OK'd?
307 --------------------------------------------------------------
308 Attention to detail.  Re-read your own work as if you were the
309 reviewer.  You can start with using ``checkpatch.pl``, perhaps even with
310 the ``--strict`` flag.  But do not be mindlessly robotic in doing so.
311 If your change is a bug fix, make sure your commit log indicates the
312 end-user visible symptom, the underlying reason as to why it happens,
313 and then if necessary, explain why the fix proposed is the best way to
314 get things done.  Don't mangle whitespace, and as is common, don't
315 mis-indent function arguments that span multiple lines.  If it is your
316 first patch, mail it to yourself so you can test apply it to an
317 unpatched tree to confirm infrastructure didn't mangle it.
318
319 Finally, go back and read
320 :ref:`Documentation/process/submitting-patches.rst <submittingpatches>`
321 to be sure you are not repeating some common mistake documented there.