Skip to contentSkip to conversation

docs: netdev: document more of our rules

PATCH Superseded Jakub Kicinski 2 participants 6 messages Jun 30, 2022 – Jul 1, 2022

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

cover docs: netdev: document more of our rules

The patch series length limit and reverse xmas tree are not documented. Add those, and a tl;dr section summarizing how we differ.

Jakub Kicinski (3):
docs: netdev: document that patch series length limit
docs: netdev: document reverse xmas tree
docs: netdev: add a cheat sheet for the rules

 Documentation/process/maintainer-netdev.rst | 30 +++++++++++++++++++++
 1 file changed, 30 insertions(+)
Signature · 1 line
2.36.1
author maintainer
#1 lore raw

PATCH 1/3 docs: netdev: document that patch series length limit

We had been asking people to avoid massive patch series but it does not appear in the FAQ.

---
 Documentation/process/maintainer-netdev.rst | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/process/maintainer-netdev.rst +8 -0
index c456b5225d66..862b6508fc22 100644
@@ -136,6 +136,14 @@ it to the maintainer to figure out what is the most recent and current
 version that should be applied. If there is any doubt, the maintainer
 will reply and ask what should be done.
 
+How do I divide my work into patches?
+-------------------------------------
+
+Put yourself in the shoes of the reviewer. Each patch is read separately
+and therefore should constitute a comprehensible step towards your stated
+goal. Avoid sending series longer than 15 patches, they clog review queue
+and increase mailing list traffic when re-posted.
+
 I made changes to only a few patches in a patch series should I resend only those changed?
 ------------------------------------------------------------------------------------------
 No, please resend the entire patch series and make sure you do number your
Signature · 1 line
2.36.1
author maintainer
#4 lore raw

PATCH 2/3 docs: netdev: document reverse xmas tree

In reply to Jakub Kicinski

Similarly to the 15 patch rule the reverse xmas tree is not documented.

---
 Documentation/process/maintainer-netdev.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)
Documentation/process/maintainer-netdev.rst +13 -0
index 862b6508fc22..7fb5100d195d 100644
@@ -191,6 +191,19 @@ Is the comment style convention different for the networking content?
    * another line of text
    */
 
+What is "reverse xmas tree"?
+----------------------------
+
+Netdev has a convention for ordering local variables in functions.
+Order the variable declaration lines longest to shortest, e.g.::
+
+  struct scatterlist *sg;
+  struct sk_buff *skb;
+  int err, i;
+
+If there are dependencies between the variables preventing the ordering
+move the initialization out of line.
+
 I am working in existing code which uses non-standard formatting. Which formatting should I use?
 ------------------------------------------------------------------------------------------------
 Make your code follow the most recent guidelines, so that eventually all code
Signature · 1 line
2.36.1
author maintainer
#5 lore raw

PATCH 3/3 docs: netdev: add a cheat sheet for the rules

In reply to Jakub Kicinski

Summarize the rules we see broken most often and which may be less familiar to kernel devs who are used to working outside of netdev.

---
 Documentation/process/maintainer-netdev.rst | 9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/process/maintainer-netdev.rst +9 -0
index 7fb5100d195d..e57eb5bd3692 100644
@@ -6,6 +6,15 @@
 netdev FAQ
 ==========
 
+tl;dr
+-----
+
+ - designate your patch to a tree - ``[PATCH net]`` or ``[PATCH net-next]``
+ - for fixes the ``Fixes:`` tag is required, regardless of the tree
+ - don't post large series (> 15 patches), break them up
+ - don't repost your patches within one 24h period
+ - reverse xmas tree
+
 What is netdev?
 ---------------
 It is a mailing list for all network-related Linux stuff.  This
Signature · 1 line
2.36.1
#2 lore raw

Re: [PATCH net 1/3] docs: netdev: document that patch series length limit

In reply to Jakub Kicinski
Quoted 14 lines · Jakub Kicinski

We had been asking people to avoid massive patch series but it does not appear in the FAQ.

---
 Documentation/process/maintainer-netdev.rst | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/process/maintainer-netdev.rst +0 -0
index c456b5225d66..862b6508fc22 100644
@@ -136,6 +136,14 @@ it to the maintainer to figure out what is the most recent and current
 version that should be applied. If there is any doubt, the maintainer

Documentation/process/maintainer-netdev.rst it to the maintainer to figure out what is the most recent and current · line 146

Quoted 10 lines
Documentation/process/maintainer-netdev.rst +8 -0
 will reply and ask what should be done.
 
+How do I divide my work into patches?
+-------------------------------------
+
+Put yourself in the shoes of the reviewer. Each patch is read separately
+and therefore should constitute a comprehensible step towards your stated
+goal. Avoid sending series longer than 15 patches, they clog review queue
+and increase mailing list traffic when re-posted.
+

Hi Jakub

I think a key concept is, big patch series takes longer to review, so needs a bigger junk of time allocated to it, so often gets differed until late. As a result, it will take longer to merge. A small series can be reviewed in a short time, so Maintainers just do it, allowing for quicker merging.

Andrew

author maintainer
#3 lore raw

Re: [PATCH net 1/3] docs: netdev: document that patch series length limit

Quoted 10 lines · On Fri, 1 Jul 2022 09:48:30 +0200 Andrew Lunn wrote:

Documentation/process/maintainer-netdev.rst it to the maintainer to figure out what is the most recent and current · line 145

Quoted 4 lines
Documentation/process/maintainer-netdev.rst +4 -0
+Put yourself in the shoes of the reviewer. Each patch is read separately
+and therefore should constitute a comprehensible step towards your stated
+goal. Avoid sending series longer than 15 patches, they clog review queue
+and increase mailing list traffic when re-posted.

I think a key concept is, big patch series takes longer to review, so needs a bigger junk of time allocated to it, so often gets differed until late. As a result, it will take longer to merge. A small series can be reviewed in a short time, so Maintainers just do it, allowing for quicker merging.

Good point, let me fold that in.