Skip to content

Commit ab35ebf

Browse files
idoschkuba-moo
authored andcommitted
netlink: specs: Add FIB rule port mask attributes
Add new port mask attributes to the spec. Example: # ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_rule.yaml \ --do newrule \ --json '{"family": 2, "sport-range": { "start": 12345, "end": 12345 }, "sport-mask": 65535, "action": 1, "table": 1}' None # ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_rule.yaml \ --do newrule \ --json '{"family": 2, "dport-range": { "start": 54321, "end": 54321 }, "dport-mask": 65535, "action": 1, "table": 2}' None $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_rule.yaml \ --dump getrule --json '{"family": 2}' --output-json | jq '.[]' [...] { "table": 2, "suppress-prefixlen": "0xffffffff", "protocol": 0, "priority": 32764, "dport-range": { "start": 54321, "end": 54321 }, "dport-mask": "0xffff", "family": 2, "dst-len": 0, "src-len": 0, "tos": 0, "action": "to-tbl", "flags": 0 } { "table": 1, "suppress-prefixlen": "0xffffffff", "protocol": 0, "priority": 32765, "sport-range": { "start": 12345, "end": 12345 }, "sport-mask": "0xffff", "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]> Reviewed-by: David Ahern <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 34e406a commit ab35ebf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Documentation/netlink/specs/rt_rule.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@ attribute-sets:
182182
type: u32
183183
byte-order: big-endian
184184
display-hint: hex
185+
-
186+
name: sport-mask
187+
type: u16
188+
display-hint: hex
189+
-
190+
name: dport-mask
191+
type: u16
192+
display-hint: hex
185193

186194
operations:
187195
enum-model: directional
@@ -215,6 +223,8 @@ operations:
215223
- dscp
216224
- flowlabel
217225
- flowlabel-mask
226+
- sport-mask
227+
- dport-mask
218228
-
219229
name: newrule-ntf
220230
doc: Notify a rule creation

0 commit comments

Comments
 (0)