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

netlink: specs: Add FIB rule flow label attributes

Add the new flow label attributes to the spec. Example:

# ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_rule.yaml \
--do newrule \
--json '{"family": 10, "flowlabel": 1, "flowlabel-mask": 1, "action": 1, "table": 1}'
None
$ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_rule.yaml \
--dump getrule --json '{"family": 10}' --output-json \
| jq '.[] | select(.flowlabel == "0x1")'
{
"table": 1,
"suppress-prefixlen": "0xffffffff",
"protocol": 0,
"priority": 32765,
"flowlabel": "0x1",
"flowlabel-mask": "0x1",
"family": 10,
"dst-len": 0,
"src-len": 0,
"tos": 0,
"action": "to-tbl",
"flags": 0
}

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
c72004aa 4c25f3f0

+12
+12
Documentation/netlink/specs/rt_rule.yaml
··· 172 172 - 173 173 name: dscp 174 174 type: u8 175 + - 176 + name: flowlabel 177 + type: u32 178 + byte-order: big-endian 179 + display-hint: hex 180 + - 181 + name: flowlabel-mask 182 + type: u32 183 + byte-order: big-endian 184 + display-hint: hex 175 185 176 186 operations: 177 187 enum-model: directional ··· 213 203 - sport-range 214 204 - dport-range 215 205 - dscp 206 + - flowlabel 207 + - flowlabel-mask 216 208 - 217 209 name: newrule-ntf 218 210 doc: Notify a rule creation