Skip to content

Commit 7d70ed9

Browse files
NikAleksandrovkuba-moo
authored andcommitted
doc/netlink/specs: add netkit support to rt_link.yaml
Add netkit support to rt_link.yaml. Only forward(PASS) and blackhole(DROP) policies are allowed to be set by user-space so I've added only them to the yaml to avoid confusion. Example: $ ./tools/net/ynl/cli.py \ --spec Documentation/netlink/specs/rt_link.yaml \ --do getlink --json '{"ifname": "netkit0"}' --output-json | jq ... "linkinfo": { "kind": "netkit", "data": { "primary": 1, "policy": "blackhole", "mode": "l2", "peer-policy": "forward" } }, ... Signed-off-by: Nikolay Aleksandrov <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 93b828c commit 7d70ed9

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

Documentation/netlink/specs/rt_link.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,22 @@ definitions:
903903
- cfm-config
904904
- cfm-status
905905
- mst
906+
-
907+
name: netkit-policy
908+
type: enum
909+
entries:
910+
-
911+
name: forward
912+
value: 0
913+
-
914+
name: blackhole
915+
value: 2
916+
-
917+
name: netkit-mode
918+
type: enum
919+
entries:
920+
- name: l2
921+
- name: l3
906922

907923
attribute-sets:
908924
-
@@ -2109,6 +2125,28 @@ attribute-sets:
21092125
-
21102126
name: id
21112127
type: u32
2128+
-
2129+
name: linkinfo-netkit-attrs
2130+
name-prefix: ifla-netkit-
2131+
attributes:
2132+
-
2133+
name: peer-info
2134+
type: binary
2135+
-
2136+
name: primary
2137+
type: u8
2138+
-
2139+
name: policy
2140+
type: u32
2141+
enum: netkit-policy
2142+
-
2143+
name: peer-policy
2144+
type: u32
2145+
enum: netkit-policy
2146+
-
2147+
name: mode
2148+
type: u32
2149+
enum: netkit-mode
21122150

21132151
sub-messages:
21142152
-
@@ -2147,6 +2185,9 @@ sub-messages:
21472185
-
21482186
value: vrf
21492187
attribute-set: linkinfo-vrf-attrs
2188+
-
2189+
value: netkit
2190+
attribute-set: linkinfo-netkit-attrs
21502191
-
21512192
name: linkinfo-member-data-msg
21522193
formats:

0 commit comments

Comments
 (0)