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

[PATCH net-next 7/7] netlink: specs: tc: 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 tc indexed-arrays are mostly used for defining
the priority winin an array of actions, and when parsed by the
kernel they must be unique, and not exceed TCA_ACT_MAX_PRIO (32).

Therefore this patch only sets ignore-index on a single
attribute TCA_CAKE_STATS_TIN_STATS, which is only used for
dumping statistics, and never ingested by the kernel.

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━┓
┃                                  ┃ out/    ┃ input/ ┃ ignore ┃
┃ Attribute                        ┃ dump    ┃ parsed ┃ -index ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━┩
│ TCA_BASIC_ACT                    │ 1++ (2) │ yes(3) │ no     │
│ TCA_BPF_ACT                      │ 1++ (2) │ yes(3) │ no     │
│ TCA_CAKE_STATS_TIN_STATS         │ 1++ (4) │ -      │ yes    │
│ TCA_CGROUP_ACT                   │ 1++ (2) │ yes(3) │ no     │
│ TCA_FLOWER_ACT                   │ 1++ (2) │ yes(3) │ no     │
│ TCA_FW_ACT                       │ 1++ (2) │ yes(3) │ no     │
│ TCA_MATCHALL_ACT                 │ 1++ (2) │ yes(3) │ no     │
│ TCA_ROUTE4_ACT                   │ 1++ (2) │ yes(3) │ no     │
│ TCA_U32_ACT                      │ 1++ (2) │ yes(3) │ no     │
└──────────────────────────────────┴─────────┴────────┴────────┘

Where:
  1++) incrementing index starting from 1
  2)   All _ACT are dumped with tcf_exts_dump() calling tcf_action_dump().
  3)   Parsed in tcf_action_init().
  4)   Dumped in cake_dump_stats().

Signed-off-by: Asbjørn Sloth Tønnesen <redacted>
---
 Documentation/netlink/specs/tc.yaml | 1 +
 1 file changed, 1 insertion(+)
diff --git a/Documentation/netlink/specs/tc.yaml b/Documentation/netlink/specs/tc.yaml
index b398f7a46dae1..24866fccb7d15 100644
--- a/Documentation/netlink/specs/tc.yaml
+++ b/Documentation/netlink/specs/tc.yaml
@@ -2188,6 +2188,7 @@ attribute-sets:
         name: tin-stats
         type: indexed-array
         sub-type: nest
+        ignore-index: true
         nested-attributes: cake-tin-stats-attrs
       -
         name: deficit
-- 
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