xref: /openbmc/linux/Documentation/process/maintainer-netdev.rst (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
18df01363SJakub Kicinski.. SPDX-License-Identifier: GPL-2.0
28df01363SJakub Kicinski
38df01363SJakub Kicinski.. _netdev-FAQ:
48df01363SJakub Kicinski
5ff249be5SJakub Kicinski=============================
6ff249be5SJakub KicinskiNetworking subsystem (netdev)
7ff249be5SJakub Kicinski=============================
88df01363SJakub Kicinski
95d407ca7SJakub Kicinskitl;dr
105d407ca7SJakub Kicinski-----
115d407ca7SJakub Kicinski
125d407ca7SJakub Kicinski - designate your patch to a tree - ``[PATCH net]`` or ``[PATCH net-next]``
135d407ca7SJakub Kicinski - for fixes the ``Fixes:`` tag is required, regardless of the tree
145d407ca7SJakub Kicinski - don't post large series (> 15 patches), break them up
155d407ca7SJakub Kicinski - don't repost your patches within one 24h period
165d407ca7SJakub Kicinski - reverse xmas tree
175d407ca7SJakub Kicinski
18ff249be5SJakub Kicinskinetdev
19ff249be5SJakub Kicinski------
20ff249be5SJakub Kicinski
21ff249be5SJakub Kicinskinetdev is a mailing list for all network-related Linux stuff.  This
228df01363SJakub Kicinskiincludes anything found under net/ (i.e. core code like IPv6) and
238df01363SJakub Kicinskidrivers/net (i.e. hardware specific drivers) in the Linux source tree.
248df01363SJakub Kicinski
258df01363SJakub KicinskiNote that some subsystems (e.g. wireless drivers) which have a high
26ff249be5SJakub Kicinskivolume of traffic have their own specific mailing lists and trees.
278df01363SJakub Kicinski
288df01363SJakub KicinskiThe netdev list is managed (like many other Linux mailing lists) through
298df01363SJakub KicinskiVGER (http://vger.kernel.org/) with archives available at
308df01363SJakub Kicinskihttps://lore.kernel.org/netdev/
318df01363SJakub Kicinski
328df01363SJakub KicinskiAside from subsystems like those mentioned above, all network-related
338df01363SJakub KicinskiLinux development (i.e. RFC, review, comments, etc.) takes place on
348df01363SJakub Kicinskinetdev.
358df01363SJakub Kicinski
36ff249be5SJakub KicinskiDevelopment cycle
37ff249be5SJakub Kicinski-----------------
388df01363SJakub Kicinski
39ff249be5SJakub KicinskiHere is a bit of background information on
408df01363SJakub Kicinskithe cadence of Linux development.  Each new release starts off with a
418df01363SJakub Kicinskitwo week "merge window" where the main maintainers feed their new stuff
428df01363SJakub Kicinskito Linus for merging into the mainline tree.  After the two weeks, the
438df01363SJakub Kicinskimerge window is closed, and it is called/tagged ``-rc1``.  No new
448df01363SJakub Kicinskifeatures get mainlined after this -- only fixes to the rc1 content are
458df01363SJakub Kicinskiexpected.  After roughly a week of collecting fixes to the rc1 content,
468df01363SJakub Kicinskirc2 is released.  This repeats on a roughly weekly basis until rc7
478df01363SJakub Kicinski(typically; sometimes rc6 if things are quiet, or rc8 if things are in a
488df01363SJakub Kicinskistate of churn), and a week after the last vX.Y-rcN was done, the
498df01363SJakub Kicinskiofficial vX.Y is released.
508df01363SJakub Kicinski
51ff249be5SJakub KicinskiTo find out where we are now in the cycle - load the mainline (Linus)
52ff249be5SJakub Kicinskipage here:
53ff249be5SJakub Kicinski
54ff249be5SJakub Kicinski  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
55ff249be5SJakub Kicinski
56ff249be5SJakub Kicinskiand note the top of the "tags" section.  If it is rc1, it is early in
57ff249be5SJakub Kicinskithe dev cycle.  If it was tagged rc7 a week ago, then a release is
58ff249be5SJakub Kicinskiprobably imminent. If the most recent tag is a final release tag
59ff249be5SJakub Kicinski(without an ``-rcN`` suffix) - we are most likely in a merge window
60ff249be5SJakub Kicinskiand ``net-next`` is closed.
61ff249be5SJakub Kicinski
62ff249be5SJakub Kicinskigit trees and patch flow
63ff249be5SJakub Kicinski------------------------
64ff249be5SJakub Kicinski
65ff249be5SJakub KicinskiThere are two networking trees (git repositories) in play.  Both are
66ff249be5SJakub Kicinskidriven by David Miller, the main network maintainer.  There is the
67ff249be5SJakub Kicinski``net`` tree, and the ``net-next`` tree.  As you can probably guess from
68ff249be5SJakub Kicinskithe names, the ``net`` tree is for fixes to existing code already in the
69ff249be5SJakub Kicinskimainline tree from Linus, and ``net-next`` is where the new code goes
70ff249be5SJakub Kicinskifor the future release.  You can find the trees here:
71ff249be5SJakub Kicinski
72ff249be5SJakub Kicinski- https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
73ff249be5SJakub Kicinski- https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
74ff249be5SJakub Kicinski
75ff249be5SJakub KicinskiRelating that to kernel development: At the beginning of the 2-week
76ff249be5SJakub Kicinskimerge window, the ``net-next`` tree will be closed - no new changes/features.
77ff249be5SJakub KicinskiThe accumulated new content of the past ~10 weeks will be passed onto
788df01363SJakub Kicinskimainline/Linus via a pull request for vX.Y -- at the same time, the
798df01363SJakub Kicinski``net`` tree will start accumulating fixes for this pulled content
808df01363SJakub Kicinskirelating to vX.Y
818df01363SJakub Kicinski
828df01363SJakub KicinskiAn announcement indicating when ``net-next`` has been closed is usually
838df01363SJakub Kicinskisent to netdev, but knowing the above, you can predict that in advance.
848df01363SJakub Kicinski
858df01363SJakub Kicinski.. warning::
868df01363SJakub Kicinski  Do not send new ``net-next`` content to netdev during the
878df01363SJakub Kicinski  period during which ``net-next`` tree is closed.
888df01363SJakub Kicinski
898df01363SJakub KicinskiRFC patches sent for review only are obviously welcome at any time
908df01363SJakub Kicinski(use ``--subject-prefix='RFC net-next'`` with ``git format-patch``).
918df01363SJakub Kicinski
928df01363SJakub KicinskiShortly after the two weeks have passed (and vX.Y-rc1 is released), the
938df01363SJakub Kicinskitree for ``net-next`` reopens to collect content for the next (vX.Y+1)
948df01363SJakub Kicinskirelease.
958df01363SJakub Kicinski
968df01363SJakub KicinskiIf you aren't subscribed to netdev and/or are simply unsure if
978df01363SJakub Kicinski``net-next`` has re-opened yet, simply check the ``net-next`` git
988df01363SJakub Kicinskirepository link above for any new networking-related commits.  You may
998df01363SJakub Kicinskialso check the following website for the current status:
1008df01363SJakub Kicinski
101*52450087SJakub Kicinski  https://netdev.bots.linux.dev/net-next.html
1028df01363SJakub Kicinski
1038df01363SJakub KicinskiThe ``net`` tree continues to collect fixes for the vX.Y content, and is
1048df01363SJakub Kicinskifed back to Linus at regular (~weekly) intervals.  Meaning that the
1058df01363SJakub Kicinskifocus for ``net`` is on stabilization and bug fixes.
1068df01363SJakub Kicinski
1078df01363SJakub KicinskiFinally, the vX.Y gets released, and the whole cycle starts over.
1088df01363SJakub Kicinski
109ff249be5SJakub Kicinskinetdev patch review
110ff249be5SJakub Kicinski-------------------
1118df01363SJakub Kicinski
112e110ba65SJakub Kicinski.. _patch_status:
113e110ba65SJakub Kicinski
114ff249be5SJakub KicinskiPatch status
115ff249be5SJakub Kicinski~~~~~~~~~~~~
1168df01363SJakub Kicinski
117ff249be5SJakub KicinskiStatus of a patch can be checked by looking at the main patchwork
118ff249be5SJakub Kicinskiqueue for netdev:
1198df01363SJakub Kicinski
1208df01363SJakub Kicinski  https://patchwork.kernel.org/project/netdevbpf/list/
1218df01363SJakub Kicinski
1228df01363SJakub KicinskiThe "State" field will tell you exactly where things are at with your
123ee8ab74aSJakub Kicinskipatch:
124ee8ab74aSJakub Kicinski
125ee8ab74aSJakub Kicinski================== =============================================================
126ee8ab74aSJakub KicinskiPatch state        Description
127ee8ab74aSJakub Kicinski================== =============================================================
128ee8ab74aSJakub KicinskiNew, Under review  pending review, patch is in the maintainer’s queue for
129ee8ab74aSJakub Kicinski                   review; the two states are used interchangeably (depending on
130ee8ab74aSJakub Kicinski                   the exact co-maintainer handling patchwork at the time)
131ee8ab74aSJakub KicinskiAccepted           patch was applied to the appropriate networking tree, this is
132ee8ab74aSJakub Kicinski                   usually set automatically by the pw-bot
133ee8ab74aSJakub KicinskiNeeds ACK          waiting for an ack from an area expert or testing
134ee8ab74aSJakub KicinskiChanges requested  patch has not passed the review, new revision is expected
135ee8ab74aSJakub Kicinski                   with appropriate code and commit message changes
136ee8ab74aSJakub KicinskiRejected           patch has been rejected and new revision is not expected
137ee8ab74aSJakub KicinskiNot applicable     patch is expected to be applied outside of the networking
138ee8ab74aSJakub Kicinski                   subsystem
139ee8ab74aSJakub KicinskiAwaiting upstream  patch should be reviewed and handled by appropriate
140ee8ab74aSJakub Kicinski                   sub-maintainer, who will send it on to the networking trees;
141ee8ab74aSJakub Kicinski                   patches set to ``Awaiting upstream`` in netdev's patchwork
142ee8ab74aSJakub Kicinski                   will usually remain in this state, whether the sub-maintainer
143ee8ab74aSJakub Kicinski                   requested changes, accepted or rejected the patch
144ee8ab74aSJakub KicinskiDeferred           patch needs to be reposted later, usually due to dependency
145ee8ab74aSJakub Kicinski                   or because it was posted for a closed tree
146ee8ab74aSJakub KicinskiSuperseded         new version of the patch was posted, usually set by the
147ee8ab74aSJakub Kicinski                   pw-bot
148ee8ab74aSJakub KicinskiRFC                not to be applied, usually not in maintainer’s review queue,
149ee8ab74aSJakub Kicinski                   pw-bot can automatically set patches to this state based
150ee8ab74aSJakub Kicinski                   on subject tags
151ee8ab74aSJakub Kicinski================== =============================================================
152ee8ab74aSJakub Kicinski
153ee8ab74aSJakub KicinskiPatches are indexed by the ``Message-ID`` header of the emails
1548df01363SJakub Kicinskiwhich carried them so if you have trouble finding your patch append
1558df01363SJakub Kicinskithe value of ``Message-ID`` to the URL above.
1568df01363SJakub Kicinski
157ff249be5SJakub KicinskiUpdating patch status
158ff249be5SJakub Kicinski~~~~~~~~~~~~~~~~~~~~~
159ff249be5SJakub Kicinski
1607e7b3b09SJakub KicinskiContributors and reviewers do not have the permissions to update patch
1617e7b3b09SJakub Kicinskistate directly in patchwork. Patchwork doesn't expose much information
1627e7b3b09SJakub Kicinskiabout the history of the state of patches, therefore having multiple
1637e7b3b09SJakub Kicinskipeople update the state leads to confusion.
1647e7b3b09SJakub Kicinski
1657e7b3b09SJakub KicinskiInstead of delegating patchwork permissions netdev uses a simple mail
1667e7b3b09SJakub Kicinskibot which looks for special commands/lines within the emails sent to
1677e7b3b09SJakub Kicinskithe mailing list. For example to mark a series as Changes Requested
1687e7b3b09SJakub Kicinskione needs to send the following line anywhere in the email thread::
1697e7b3b09SJakub Kicinski
1707e7b3b09SJakub Kicinski  pw-bot: changes-requested
1717e7b3b09SJakub Kicinski
1727e7b3b09SJakub KicinskiAs a result the bot will set the entire series to Changes Requested.
1737e7b3b09SJakub KicinskiThis may be useful when author discovers a bug in their own series
1747e7b3b09SJakub Kicinskiand wants to prevent it from getting applied.
1757e7b3b09SJakub Kicinski
1767e7b3b09SJakub KicinskiThe use of the bot is entirely optional, if in doubt ignore its existence
1777e7b3b09SJakub Kicinskicompletely. Maintainers will classify and update the state of the patches
1787e7b3b09SJakub Kicinskithemselves. No email should ever be sent to the list with the main purpose
1797e7b3b09SJakub Kicinskiof communicating with the bot, the bot commands should be seen as metadata.
1807e7b3b09SJakub Kicinski
1817e7b3b09SJakub KicinskiThe use of the bot is restricted to authors of the patches (the ``From:``
182d5dc3945SJakub Kicinskiheader on patch submission and command must match!), maintainers of
183d5dc3945SJakub Kicinskithe modified code according to the MAINTAINERS file (again, ``From:``
184d5dc3945SJakub Kicinskimust match the MAINTAINERS entry) and a handful of senior reviewers.
185d5dc3945SJakub Kicinski
186d5dc3945SJakub KicinskiBot records its activity here:
1877e7b3b09SJakub Kicinski
188*52450087SJakub Kicinski  https://netdev.bots.linux.dev/pw-bot.html
1898df01363SJakub Kicinski
190ff249be5SJakub KicinskiReview timelines
191ff249be5SJakub Kicinski~~~~~~~~~~~~~~~~
192ff249be5SJakub Kicinski
193f4ef6811SJakub KicinskiGenerally speaking, the patches get triaged quickly (in less than
194f4ef6811SJakub Kicinski48h). But be patient, if your patch is active in patchwork (i.e. it's
195f4ef6811SJakub Kicinskilisted on the project's patch list) the chances it was missed are close to zero.
196f4ef6811SJakub KicinskiAsking the maintainer for status updates on your
197f4ef6811SJakub Kicinskipatch is a good way to ensure your patch is ignored or pushed to the
198f4ef6811SJakub Kicinskibottom of the priority list.
19902514a06SJakub Kicinski
20035b4b6d0SJakub Kicinski.. _Changes requested:
20135b4b6d0SJakub Kicinski
202e110ba65SJakub KicinskiChanges requested
203e110ba65SJakub Kicinski~~~~~~~~~~~~~~~~~
204e110ba65SJakub Kicinski
205e110ba65SJakub KicinskiPatches :ref:`marked<patch_status>` as ``Changes Requested`` need
206e110ba65SJakub Kicinskito be revised. The new version should come with a change log,
207e110ba65SJakub Kicinskipreferably including links to previous postings, for example::
208e110ba65SJakub Kicinski
209e110ba65SJakub Kicinski  [PATCH net-next v3] net: make cows go moo
210e110ba65SJakub Kicinski
211e110ba65SJakub Kicinski  Even users who don't drink milk appreciate hearing the cows go "moo".
212e110ba65SJakub Kicinski
213e110ba65SJakub Kicinski  The amount of mooing will depend on packet rate so should match
214e110ba65SJakub Kicinski  the diurnal cycle quite well.
215e110ba65SJakub Kicinski
216e110ba65SJakub Kicinski  Signed-of-by: Joe Defarmer <joe@barn.org>
217e110ba65SJakub Kicinski  ---
218e110ba65SJakub Kicinski  v3:
219e110ba65SJakub Kicinski    - add a note about time-of-day mooing fluctuation to the commit message
220e110ba65SJakub Kicinski  v2: https://lore.kernel.org/netdev/123themessageid@barn.org/
221e110ba65SJakub Kicinski    - fix missing argument in kernel doc for netif_is_bovine()
222e110ba65SJakub Kicinski    - fix memory leak in netdev_register_cow()
223e110ba65SJakub Kicinski  v1: https://lore.kernel.org/netdev/456getstheclicks@barn.org/
224e110ba65SJakub Kicinski
225e110ba65SJakub KicinskiThe commit message should be revised to answer any questions reviewers
226e110ba65SJakub Kicinskihad to ask in previous discussions. Occasionally the update of
227e110ba65SJakub Kicinskithe commit message will be the only change in the new version.
228e110ba65SJakub Kicinski
229ff249be5SJakub KicinskiPartial resends
230ff249be5SJakub Kicinski~~~~~~~~~~~~~~~
2318df01363SJakub Kicinski
232ff249be5SJakub KicinskiPlease always resend the entire patch series and make sure you do number your
233ff249be5SJakub Kicinskipatches such that it is clear this is the latest and greatest set of patches
234ff249be5SJakub Kicinskithat can be applied. Do not try to resend just the patches which changed.
235ff249be5SJakub Kicinski
236ff249be5SJakub KicinskiHandling misapplied patches
237ff249be5SJakub Kicinski~~~~~~~~~~~~~~~~~~~~~~~~~~~
238ff249be5SJakub Kicinski
239ff249be5SJakub KicinskiOccasionally a patch series gets applied before receiving critical feedback,
240ff249be5SJakub Kicinskior the wrong version of a series gets applied.
241e70f94c6SJakub Kicinski
242e70f94c6SJakub KicinskiMaking the patch disappear once it is pushed out is not possible, the commit
243e70f94c6SJakub Kicinskihistory in netdev trees is immutable.
2448df01363SJakub KicinskiPlease send incremental versions on top of what has been merged in order to fix
2458df01363SJakub Kicinskithe patches the way they would look like if your latest patch series was to be
2468df01363SJakub Kicinskimerged.
2478df01363SJakub Kicinski
248e70f94c6SJakub KicinskiIn cases where full revert is needed the revert has to be submitted
249e70f94c6SJakub Kicinskias a patch to the list with a commit message explaining the technical
250e70f94c6SJakub Kicinskiproblems with the reverted commit. Reverts should be used as a last resort,
251e70f94c6SJakub Kicinskiwhen original change is completely wrong; incremental fixes are preferred.
252e70f94c6SJakub Kicinski
253ff249be5SJakub KicinskiStable tree
254ff249be5SJakub Kicinski~~~~~~~~~~~
255ff249be5SJakub Kicinski
2568df01363SJakub KicinskiWhile it used to be the case that netdev submissions were not supposed
2578df01363SJakub Kicinskito carry explicit ``CC: stable@vger.kernel.org`` tags that is no longer
2588df01363SJakub Kicinskithe case today. Please follow the standard stable rules in
2598df01363SJakub Kicinski:ref:`Documentation/process/stable-kernel-rules.rst <stable_kernel_rules>`,
2608df01363SJakub Kicinskiand make sure you include appropriate Fixes tags!
2618df01363SJakub Kicinski
262ff249be5SJakub KicinskiSecurity fixes
263ff249be5SJakub Kicinski~~~~~~~~~~~~~~
264ff249be5SJakub Kicinski
265ff249be5SJakub KicinskiDo not email netdev maintainers directly if you think you discovered
266ff249be5SJakub Kicinskia bug that might have possible security implications.
267ff249be5SJakub KicinskiThe current netdev maintainer has consistently requested that
268f4ef6811SJakub Kicinskipeople use the mailing lists and not reach out directly.  If you aren't
269f4ef6811SJakub KicinskiOK with that, then perhaps consider mailing security@kernel.org or
270f4ef6811SJakub Kicinskireading about http://oss-security.openwall.org/wiki/mailing-lists/distros
271f4ef6811SJakub Kicinskias possible alternative mechanisms.
272f4ef6811SJakub Kicinski
273ff249be5SJakub Kicinski
274ff249be5SJakub KicinskiCo-posting changes to user space components
275ff249be5SJakub Kicinski~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
276ff249be5SJakub Kicinski
277f4ef6811SJakub KicinskiUser space code exercising kernel features should be posted
278f4ef6811SJakub Kicinskialongside kernel patches. This gives reviewers a chance to see
279f4ef6811SJakub Kicinskihow any new interface is used and how well it works.
280f4ef6811SJakub Kicinski
281f4ef6811SJakub KicinskiWhen user space tools reside in the kernel repo itself all changes
282f4ef6811SJakub Kicinskishould generally come as one series. If series becomes too large
283f4ef6811SJakub Kicinskior the user space project is not reviewed on netdev include a link
284f4ef6811SJakub Kicinskito a public repo where user space patches can be seen.
285f4ef6811SJakub Kicinski
286f4ef6811SJakub KicinskiIn case user space tooling lives in a separate repository but is
287f4ef6811SJakub Kicinskireviewed on netdev  (e.g. patches to ``iproute2`` tools) kernel and
288f4ef6811SJakub Kicinskiuser space patches should form separate series (threads) when posted
289f4ef6811SJakub Kicinskito the mailing list, e.g.::
290f4ef6811SJakub Kicinski
291f4ef6811SJakub Kicinski  [PATCH net-next 0/3] net: some feature cover letter
292f4ef6811SJakub Kicinski   └─ [PATCH net-next 1/3] net: some feature prep
293f4ef6811SJakub Kicinski   └─ [PATCH net-next 2/3] net: some feature do it
294f4ef6811SJakub Kicinski   └─ [PATCH net-next 3/3] selftest: net: some feature
295f4ef6811SJakub Kicinski
296f4ef6811SJakub Kicinski  [PATCH iproute2-next] ip: add support for some feature
297f4ef6811SJakub Kicinski
298f4ef6811SJakub KicinskiPosting as one thread is discouraged because it confuses patchwork
299f4ef6811SJakub Kicinski(as of patchwork 2.2.2).
300f4ef6811SJakub Kicinski
301ff249be5SJakub KicinskiPreparing changes
302ff249be5SJakub Kicinski-----------------
303ff249be5SJakub Kicinski
304ff249be5SJakub KicinskiAttention to detail is important.  Re-read your own work as if you were the
305f4ef6811SJakub Kicinskireviewer.  You can start with using ``checkpatch.pl``, perhaps even with
306f4ef6811SJakub Kicinskithe ``--strict`` flag.  But do not be mindlessly robotic in doing so.
307f4ef6811SJakub KicinskiIf your change is a bug fix, make sure your commit log indicates the
308f4ef6811SJakub Kicinskiend-user visible symptom, the underlying reason as to why it happens,
309f4ef6811SJakub Kicinskiand then if necessary, explain why the fix proposed is the best way to
310f4ef6811SJakub Kicinskiget things done.  Don't mangle whitespace, and as is common, don't
311f4ef6811SJakub Kicinskimis-indent function arguments that span multiple lines.  If it is your
312f4ef6811SJakub Kicinskifirst patch, mail it to yourself so you can test apply it to an
313f4ef6811SJakub Kicinskiunpatched tree to confirm infrastructure didn't mangle it.
314f4ef6811SJakub Kicinski
315f4ef6811SJakub KicinskiFinally, go back and read
316f4ef6811SJakub Kicinski:ref:`Documentation/process/submitting-patches.rst <submittingpatches>`
317f4ef6811SJakub Kicinskito be sure you are not repeating some common mistake documented there.
318f4ef6811SJakub Kicinski
319ff249be5SJakub KicinskiIndicating target tree
320ff249be5SJakub Kicinski~~~~~~~~~~~~~~~~~~~~~~
321ff249be5SJakub Kicinski
322f4ef6811SJakub KicinskiTo help maintainers and CI bots you should explicitly mark which tree
323f4ef6811SJakub Kicinskiyour patch is targeting. Assuming that you use git, use the prefix
324f4ef6811SJakub Kicinskiflag::
325f4ef6811SJakub Kicinski
326f4ef6811SJakub Kicinski  git format-patch --subject-prefix='PATCH net-next' start..finish
327f4ef6811SJakub Kicinski
328f4ef6811SJakub KicinskiUse ``net`` instead of ``net-next`` (always lower case) in the above for
329f4ef6811SJakub Kicinskibug-fix ``net`` content.
330f4ef6811SJakub Kicinski
331ff249be5SJakub KicinskiDividing work into patches
332ff249be5SJakub Kicinski~~~~~~~~~~~~~~~~~~~~~~~~~~
333f4ef6811SJakub Kicinski
334f4ef6811SJakub KicinskiPut yourself in the shoes of the reviewer. Each patch is read separately
335f4ef6811SJakub Kicinskiand therefore should constitute a comprehensible step towards your stated
336f4ef6811SJakub Kicinskigoal.
337f4ef6811SJakub Kicinski
338f4ef6811SJakub KicinskiAvoid sending series longer than 15 patches. Larger series takes longer
339f4ef6811SJakub Kicinskito review as reviewers will defer looking at it until they find a large
340f4ef6811SJakub Kicinskichunk of time. A small series can be reviewed in a short time, so Maintainers
341f4ef6811SJakub Kicinskijust do it. As a result, a sequence of smaller series gets merged quicker and
342f4ef6811SJakub Kicinskiwith better review coverage. Re-posting large series also increases the mailing
343f4ef6811SJakub Kicinskilist traffic.
344f4ef6811SJakub Kicinski
345ff249be5SJakub KicinskiMulti-line comments
346ff249be5SJakub Kicinski~~~~~~~~~~~~~~~~~~~
347ff249be5SJakub Kicinski
348ff249be5SJakub KicinskiComment style convention is slightly different for networking and most of
349ff249be5SJakub Kicinskithe tree.  Instead of this::
3508df01363SJakub Kicinski
3518df01363SJakub Kicinski  /*
3528df01363SJakub Kicinski   * foobar blah blah blah
3538df01363SJakub Kicinski   * another line of text
3548df01363SJakub Kicinski   */
3558df01363SJakub Kicinski
3568df01363SJakub Kicinskiit is requested that you make it look like this::
3578df01363SJakub Kicinski
3588df01363SJakub Kicinski  /* foobar blah blah blah
3598df01363SJakub Kicinski   * another line of text
3608df01363SJakub Kicinski   */
3618df01363SJakub Kicinski
362ff249be5SJakub KicinskiLocal variable ordering ("reverse xmas tree", "RCS")
363ff249be5SJakub Kicinski~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
364a2487564SJakub Kicinski
365a2487564SJakub KicinskiNetdev has a convention for ordering local variables in functions.
366a2487564SJakub KicinskiOrder the variable declaration lines longest to shortest, e.g.::
367a2487564SJakub Kicinski
368a2487564SJakub Kicinski  struct scatterlist *sg;
369a2487564SJakub Kicinski  struct sk_buff *skb;
370a2487564SJakub Kicinski  int err, i;
371a2487564SJakub Kicinski
372a2487564SJakub KicinskiIf there are dependencies between the variables preventing the ordering
373a2487564SJakub Kicinskimove the initialization out of line.
374a2487564SJakub Kicinski
375ff249be5SJakub KicinskiFormat precedence
376ff249be5SJakub Kicinski~~~~~~~~~~~~~~~~~
377ff249be5SJakub Kicinski
378ff249be5SJakub KicinskiWhen working in existing code which uses nonstandard formatting make
379ff249be5SJakub Kicinskiyour code follow the most recent guidelines, so that eventually all code
3808df01363SJakub Kicinskiin the domain of netdev is in the preferred format.
3818df01363SJakub Kicinski
382ff249be5SJakub KicinskiResending after review
383ff249be5SJakub Kicinski~~~~~~~~~~~~~~~~~~~~~~
384ff249be5SJakub Kicinski
385f4ef6811SJakub KicinskiAllow at least 24 hours to pass between postings. This will ensure reviewers
386f4ef6811SJakub Kicinskifrom all geographical locations have a chance to chime in. Do not wait
387f4ef6811SJakub Kicinskitoo long (weeks) between postings either as it will make it harder for reviewers
388f4ef6811SJakub Kicinskito recall all the context.
389f4ef6811SJakub Kicinski
390f4ef6811SJakub KicinskiMake sure you address all the feedback in your new posting. Do not post a new
391f4ef6811SJakub Kicinskiversion of the code if the discussion about the previous version is still
392f4ef6811SJakub Kicinskiongoing, unless directly instructed by a reviewer.
3938df01363SJakub Kicinski
39435b4b6d0SJakub KicinskiThe new version of patches should be posted as a separate thread,
39535b4b6d0SJakub Kicinskinot as a reply to the previous posting. Change log should include a link
39635b4b6d0SJakub Kicinskito the previous posting (see :ref:`Changes requested`).
39735b4b6d0SJakub Kicinski
398ff249be5SJakub KicinskiTesting
399ff249be5SJakub Kicinski-------
400ff249be5SJakub Kicinski
401ff249be5SJakub KicinskiExpected level of testing
402ff249be5SJakub Kicinski~~~~~~~~~~~~~~~~~~~~~~~~~
403ff249be5SJakub Kicinski
4048df01363SJakub KicinskiAt the very minimum your changes must survive an ``allyesconfig`` and an
4058df01363SJakub Kicinski``allmodconfig`` build with ``W=1`` set without new warnings or failures.
4068df01363SJakub Kicinski
4078df01363SJakub KicinskiIdeally you will have done run-time testing specific to your change,
4088df01363SJakub Kicinskiand the patch series contains a set of kernel selftest for
4098df01363SJakub Kicinski``tools/testing/selftests/net`` or using the KUnit framework.
4108df01363SJakub Kicinski
4118df01363SJakub KicinskiYou are expected to test your changes on top of the relevant networking
4128df01363SJakub Kicinskitree (``net`` or ``net-next``) and not e.g. a stable tree or ``linux-next``.
4138df01363SJakub Kicinski
414ff249be5SJakub Kicinskipatchwork checks
415ff249be5SJakub Kicinski~~~~~~~~~~~~~~~~
4168df01363SJakub Kicinski
4178df01363SJakub KicinskiChecks in patchwork are mostly simple wrappers around existing kernel
4188df01363SJakub Kicinskiscripts, the sources are available at:
4198df01363SJakub Kicinski
4208df01363SJakub Kicinskihttps://github.com/kuba-moo/nipa/tree/master/tests
4218df01363SJakub Kicinski
422ff249be5SJakub Kicinski**Do not** post your patches just to run them through the checks.
423ff249be5SJakub KicinskiYou must ensure that your patches are ready by testing them locally
4248df01363SJakub Kicinskibefore posting to the mailing list. The patchwork build bot instance
4258df01363SJakub Kicinskigets overloaded very easily and netdev@vger really doesn't need more
4268df01363SJakub Kicinskitraffic if we can help it.
4278df01363SJakub Kicinski
428ff249be5SJakub Kicinskinetdevsim
429ff249be5SJakub Kicinski~~~~~~~~~
4308df01363SJakub Kicinski
431ff249be5SJakub Kicinski``netdevsim`` is a test driver which can be used to exercise driver
432ff249be5SJakub Kicinskiconfiguration APIs without requiring capable hardware.
433ff249be5SJakub KicinskiMock-ups and tests based on ``netdevsim`` are strongly encouraged when
434ff249be5SJakub Kicinskiadding new APIs, but ``netdevsim`` in itself is **not** considered
435ff249be5SJakub Kicinskia use case/user. You must also implement the new APIs in a real driver.
4368df01363SJakub Kicinski
437ff249be5SJakub KicinskiWe give no guarantees that ``netdevsim`` won't change in the future
4388df01363SJakub Kicinskiin a way which would break what would normally be considered uAPI.
4398df01363SJakub Kicinski
440ff249be5SJakub Kicinski``netdevsim`` is reserved for use by upstream tests only, so any
441ff249be5SJakub Kicinskinew ``netdevsim`` features must be accompanied by selftests under
442ff249be5SJakub Kicinski``tools/testing/selftests/``.
4438df01363SJakub Kicinski
444ff249be5SJakub KicinskiTestimonials / feedback
445ff249be5SJakub Kicinski-----------------------
4468df01363SJakub Kicinski
447ff249be5SJakub KicinskiSome companies use peer feedback in employee performance reviews.
448ff249be5SJakub KicinskiPlease feel free to request feedback from netdev maintainers,
449ff249be5SJakub Kicinskiespecially if you spend significant amount of time reviewing code
450c5884ef4SJakub Kicinskiand go out of your way to improve shared infrastructure.
451c5884ef4SJakub Kicinski
452c5884ef4SJakub KicinskiThe feedback must be requested by you, the contributor, and will always
453c5884ef4SJakub Kicinskibe shared with you (even if you request for it to be submitted to your
454c5884ef4SJakub Kicinskimanager).
455