Skip to content

Commit

Permalink
netlink: specs: Add FIB rule DSCP mask attribute
Browse files Browse the repository at this point in the history
Add new DSCP mask attribute to the spec. Example:

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

Reviewed-by: Petr Machata <[email protected]>
Signed-off-by: Ido Schimmel <[email protected]>
Reviewed-by: Guillaume Nault <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
idosch authored and kuba-moo committed Feb 22, 2025
1 parent ea8af1a commit 0df1328
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Documentation/netlink/specs/rt_rule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ attribute-sets:
name: dport-mask
type: u16
display-hint: hex
-
name: dscp-mask
type: u8
display-hint: hex

operations:
enum-model: directional
Expand Down Expand Up @@ -225,6 +229,7 @@ operations:
- flowlabel-mask
- sport-mask
- dport-mask
- dscp-mask
-
name: newrule-ntf
doc: Notify a rule creation
Expand Down

0 comments on commit 0df1328

Please sign in to comment.