[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241216171201.274644-8-idosch@nvidia.com>
Date: Mon, 16 Dec 2024 19:11:59 +0200
From: Ido Schimmel <idosch@...dia.com>
To: <netdev@...r.kernel.org>
CC: <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
<edumazet@...gle.com>, <dsahern@...nel.org>, <donald.hunter@...il.com>,
<horms@...nel.org>, <gnault@...hat.com>, <rostedt@...dmis.org>,
<mhiramat@...nel.org>, <mathieu.desnoyers@...icios.com>, <petrm@...dia.com>,
Ido Schimmel <idosch@...dia.com>
Subject: [PATCH net-next 7/9] netlink: specs: Add route flow label attribute
Add the new flow label attribute to the spec. Example:
# ip link add name dummy1 up type dummy
# ip -6 route add default table 254 dev dummy1
# ip -6 route add default table 10 dev dummy1
# ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_rule.yaml \
--do newrule \
--json '{"family": 10, "priority": 1, "flowlabel": 10, "flowlabel-mask": 255, "action": 1, "table": 10}'
None
$ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_route.yaml \
--do getroute \
--json '{"rtm-family": 10, "rta-flowlabel": 1}' --output-json \
| jq '.["rta-table"]'
254
$ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_route.yaml \
--do getroute \
--json '{"rtm-family": 10, "rta-flowlabel": 10}' --output-json \
| jq '.["rta-table"]'
10
Reviewed-by: Petr Machata <petrm@...dia.com>
Signed-off-by: Ido Schimmel <idosch@...dia.com>
---
Documentation/netlink/specs/rt_route.yaml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/netlink/specs/rt_route.yaml b/Documentation/netlink/specs/rt_route.yaml
index f4368be0caed..a674103e5bc4 100644
--- a/Documentation/netlink/specs/rt_route.yaml
+++ b/Documentation/netlink/specs/rt_route.yaml
@@ -177,6 +177,11 @@ attribute-sets:
-
name: rta-nh-id
type: u32
+ -
+ name: rta-flowlabel
+ type: u32
+ byte-order: big-endian
+ display-hint: hex
-
name: rta-metrics
attributes:
@@ -260,6 +265,7 @@ operations:
- rta-dport
- rta-mark
- rta-uid
+ - rta-flowlabel
reply:
value: 24
attributes: &all-route-attrs
@@ -299,6 +305,7 @@ operations:
- rta-sport
- rta-dport
- rta-nh-id
+ - rta-flowlabel
dump:
request:
value: 26
--
2.47.1
Powered by blists - more mailing lists