doc/netlink/specs: Add vlan attr in rt_link spec
authorHangbin Liu <liuhangbin@gmail.com>
Wed, 27 Mar 2024 12:31:29 +0000 (20:31 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Mar 2024 01:07:08 +0000 (18:07 -0700)
commit782c1084b9fa5bc96c7c1ab5b770dec30834517b
tree4aed00c80637ea1e69c84d3c5ba785b1bc535cb2
parentb334f5ed3d914d46652db2b8aad7d135ad4a50ad
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>
Documentation/netlink/specs/rt_link.yaml