Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Ido Schimmel and committed by
Paolo Abeni
d26b8267 ba413803

+7
+7
Documentation/netlink/specs/rt_route.yaml
··· 177 177 - 178 178 name: rta-nh-id 179 179 type: u32 180 + - 181 + name: rta-flowlabel 182 + type: u32 183 + byte-order: big-endian 184 + display-hint: hex 180 185 - 181 186 name: rta-metrics 182 187 attributes: ··· 265 260 - rta-dport 266 261 - rta-mark 267 262 - rta-uid 263 + - rta-flowlabel 268 264 reply: 269 265 value: 24 270 266 attributes: &all-route-attrs ··· 305 299 - rta-sport 306 300 - rta-dport 307 301 - rta-nh-id 302 + - rta-flowlabel 308 303 dump: 309 304 request: 310 305 value: 26