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

Asbjørn Sloth Tønnesen posted 7 patches 3 months, 2 weeks ago
[PATCH net-next 5/7] netlink: specs: nlctrl: set ignore-index on indexed-arrays
Posted by Asbjørn Sloth Tønnesen 3 months, 2 weeks ago
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 <ast@fiberby.net>
---
 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