[PATCH net-next 6/7] netlink: specs: rt-link: set ignore-index on indexed-arrays

Asbjørn Sloth Tønnesen posted 7 patches 3 months, 2 weeks ago
[PATCH net-next 6/7] netlink: specs: rt-link: set ignore-index on indexed-arrays
Posted by Asbjørn Sloth Tønnesen 3 months, 2 weeks ago
Most of the indexes in rt-link 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 two attributes.

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━┳━━━━━━━━┓
┃                                     ┃ out/ ┃ input/ ┃ ignore ┃
┃ Attribute                           ┃ dump ┃ parsed ┃ -index ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━╇━━━━━━━━┩
│ IFLA_BOND_ARP_IP_TARGET             │ 0++  │ yes(1) │ yes    │
│ IFLA_BOND_NS_IP6_TARGET             │ 0++  │ yes(1) │ yes    │
│ IFLA_OFFLOAD_XSTATS_HW_S_INFO       │ (2)  │ -      │ no     │
└─────────────────────────────────────┴──────┴────────┴────────┘

Where:
  0++) incrementing index starting from 0
  1)   When parsed the index is unused.
  2)   IFLA_OFFLOAD_XSTATS_L3_STATS is used as index in
       rtnl_offload_xstats_fill_hw_s_info().

Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
---
 Documentation/netlink/specs/rt-link.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/netlink/specs/rt-link.yaml b/Documentation/netlink/specs/rt-link.yaml
index 2a23e9699c0b6..d2aaacd29f9f9 100644
--- a/Documentation/netlink/specs/rt-link.yaml
+++ b/Documentation/netlink/specs/rt-link.yaml
@@ -1256,6 +1256,7 @@ attribute-sets:
         name: arp-ip-target
         type: indexed-array
         sub-type: u32
+        ignore-index: true
         byte-order: big-endian
         display-hint: ipv4
       -
@@ -1330,6 +1331,7 @@ attribute-sets:
         name: ns-ip6-target
         type: indexed-array
         sub-type: binary
+        ignore-index: true
         display-hint: ipv6
         checks:
           exact-len: 16
-- 
2.51.0