Thread (13 messages) 13 messages, 2 authors, 2025-10-24
STALE236d

[PATCH net-next 5/7] netlink: specs: nlctrl: set ignore-index on indexed-arrays

From: Asbjørn Sloth Tønnesen <hidden>
Date: 2025-10-22 18:27:17
Also in: linux-doc, lkml
Subsystem: networking [general], the rest, yaml netlink (ynl) · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds, Donald Hunter

The indexes in nlctrl indexed-arrays have no special meaning,
they are just written with an iterator index, which refers to
the order in which they have been packed into the netlink message.

Thus this patch sets ignore-index on these attributes.

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━┳━━━━━━━━┓
┃                                     ┃ out/ ┃ input/ ┃ ignore ┃
┃ Attribute                           ┃ dump ┃ parsed ┃ -index ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━╇━━━━━━━━┩
│ CTRL_ATTR_OPS                       │ 1++  │ -      │ yes    │
│ CTRL_ATTR_MCAST_GROUPS              │ 1++  │ -      │ yes    │
└─────────────────────────────────────┴──────┴────────┴────────┘

Where:
  1++) incrementing index starting from 1

Signed-off-by: Asbjørn Sloth Tønnesen <redacted>
---
 Documentation/netlink/specs/nlctrl.yaml | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/Documentation/netlink/specs/nlctrl.yaml b/Documentation/netlink/specs/nlctrl.yaml
index 8b4472a6aa36a..753cf1b48c252 100644
--- a/Documentation/netlink/specs/nlctrl.yaml
+++ b/Documentation/netlink/specs/nlctrl.yaml
@@ -67,11 +67,13 @@ attribute-sets:
         name: ops
         type: indexed-array
         sub-type: nest
+        ignore-index: true
         nested-attributes: op-attrs
       -
         name: mcast-groups
         type: indexed-array
         sub-type: nest
+        ignore-index: true
         nested-attributes: mcast-group-attrs
       -
         name: policy
-- 
2.51.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help