diff options
author | Hangbin Liu <liuhangbin@gmail.com> | 2024-03-27 15:31:29 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-03-29 04:07:08 +0300 |
commit | 782c1084b9fa5bc96c7c1ab5b770dec30834517b (patch) | |
tree | 4aed00c80637ea1e69c84d3c5ba785b1bc535cb2 /Documentation/netlink | |
parent | b334f5ed3d914d46652db2b8aad7d135ad4a50ad (diff) | |
download | linux-782c1084b9fa5bc96c7c1ab5b770dec30834517b.tar.xz |
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 <liuhangbin@gmail.com>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://lore.kernel.org/r/20240327123130.1322921-3-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'Documentation/netlink')
-rw-r--r-- | Documentation/netlink/specs/rt_link.yaml | 80 |
1 files changed, 78 insertions, 2 deletions
diff --git a/Documentation/netlink/specs/rt_link.yaml b/Documentation/netlink/specs/rt_link.yaml index 8e4d19adee8c..81a5a3d1b04d 100644 --- a/Documentation/netlink/specs/rt_link.yaml +++ b/Documentation/netlink/specs/rt_link.yaml @@ -50,7 +50,16 @@ definitions: name: dormant - name: echo - + - + name: vlan-protocols + type: enum + entries: + - + name: 8021q + value: 33024 + - + name: 8021ad + value: 34984 - name: rtgenmsg type: struct @@ -729,7 +738,38 @@ definitions: - name: filter-mask type: u32 - + - + name: ifla-vlan-flags + type: struct + members: + - + name: flags + type: u32 + enum: vlan-flags + enum-as-flags: true + - + name: mask + type: u32 + display-hint: hex + - + name: vlan-flags + type: flags + entries: + - reorder-hdr + - gvrp + - loose-binding + - mvrp + - bridge-binding + - + name: ifla-vlan-qos-mapping + type: struct + members: + - + name: from + type: u32 + - + name: to + type: u32 attribute-sets: - @@ -1508,6 +1548,39 @@ attribute-sets: name: num-disabled-queues type: u32 - + name: linkinfo-vlan-attrs + name-prefix: ifla-vlan- + attributes: + - + name: id + type: u16 + - + name: flag + type: binary + struct: ifla-vlan-flags + - + name: egress-qos + type: nest + nested-attributes: ifla-vlan-qos + - + name: ingress-qos + type: nest + nested-attributes: ifla-vlan-qos + - + name: protocol + type: u16 + enum: vlan-protocols + byte-order: big-endian + - + name: ifla-vlan-qos + name-prefix: ifla-vlan-qos + attributes: + - + name: mapping + type: binary + multi-attr: true + struct: ifla-vlan-qos-mapping + - name: linkinfo-vrf-attrs name-prefix: ifla-vrf- attributes: @@ -1667,6 +1740,9 @@ sub-messages: value: tun attribute-set: linkinfo-tun-attrs - + value: vlan + attribute-set: linkinfo-vlan-attrs + - value: vrf attribute-set: linkinfo-vrf-attrs - |