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