Skip to content

Commit 782c108

Browse files
liuhangbinkuba-moo
authored andcommitted
doc/netlink/specs: Add vlan attr in rt_link spec
With command: # ./tools/net/ynl/cli.py \ --spec Documentation/netlink/specs/rt_link.yaml \ --do getlink --json '{"ifname": "eno1.2"}' --output-json | \ jq -C '.linkinfo' Before: Exception: No message format for 'vlan' in sub-message spec 'linkinfo-data-msg' After: { "kind": "vlan", "data": { "protocol": "8021q", "id": 2, "flag": { "flags": [ "reorder-hdr" ], "mask": "0xffffffff" }, "egress-qos": { "mapping": [ { "from": 1, "to": 2 }, { "from": 4, "to": 4 } ] } } } Signed-off-by: Hangbin Liu <[email protected]> Reviewed-by: Donald Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b334f5e commit 782c108

File tree

1 file changed

+78
-2
lines changed

1 file changed

+78
-2
lines changed

Documentation/netlink/specs/rt_link.yaml

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,16 @@ definitions:
5050
name: dormant
5151
-
5252
name: echo
53-
53+
-
54+
name: vlan-protocols
55+
type: enum
56+
entries:
57+
-
58+
name: 8021q
59+
value: 33024
60+
-
61+
name: 8021ad
62+
value: 34984
5463
-
5564
name: rtgenmsg
5665
type: struct
@@ -729,7 +738,38 @@ definitions:
729738
-
730739
name: filter-mask
731740
type: u32
732-
741+
-
742+
name: ifla-vlan-flags
743+
type: struct
744+
members:
745+
-
746+
name: flags
747+
type: u32
748+
enum: vlan-flags
749+
enum-as-flags: true
750+
-
751+
name: mask
752+
type: u32
753+
display-hint: hex
754+
-
755+
name: vlan-flags
756+
type: flags
757+
entries:
758+
- reorder-hdr
759+
- gvrp
760+
- loose-binding
761+
- mvrp
762+
- bridge-binding
763+
-
764+
name: ifla-vlan-qos-mapping
765+
type: struct
766+
members:
767+
-
768+
name: from
769+
type: u32
770+
-
771+
name: to
772+
type: u32
733773

734774
attribute-sets:
735775
-
@@ -1507,6 +1547,39 @@ attribute-sets:
15071547
-
15081548
name: num-disabled-queues
15091549
type: u32
1550+
-
1551+
name: linkinfo-vlan-attrs
1552+
name-prefix: ifla-vlan-
1553+
attributes:
1554+
-
1555+
name: id
1556+
type: u16
1557+
-
1558+
name: flag
1559+
type: binary
1560+
struct: ifla-vlan-flags
1561+
-
1562+
name: egress-qos
1563+
type: nest
1564+
nested-attributes: ifla-vlan-qos
1565+
-
1566+
name: ingress-qos
1567+
type: nest
1568+
nested-attributes: ifla-vlan-qos
1569+
-
1570+
name: protocol
1571+
type: u16
1572+
enum: vlan-protocols
1573+
byte-order: big-endian
1574+
-
1575+
name: ifla-vlan-qos
1576+
name-prefix: ifla-vlan-qos
1577+
attributes:
1578+
-
1579+
name: mapping
1580+
type: binary
1581+
multi-attr: true
1582+
struct: ifla-vlan-qos-mapping
15101583
-
15111584
name: linkinfo-vrf-attrs
15121585
name-prefix: ifla-vrf-
@@ -1666,6 +1739,9 @@ sub-messages:
16661739
-
16671740
value: tun
16681741
attribute-set: linkinfo-tun-attrs
1742+
-
1743+
value: vlan
1744+
attribute-set: linkinfo-vlan-attrs
16691745
-
16701746
value: vrf
16711747
attribute-set: linkinfo-vrf-attrs

0 commit comments

Comments
 (0)