Commit 4ede4575 authored by Hangbin Liu's avatar Hangbin Liu Committed by Jakub Kicinski

doc/netlink/specs: Add bond support to rt_link.yaml

Add bond support to rt_link.yaml. Here is an example output:

 $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_link.yaml \
   --do getlink --json '{"ifname": "bond0"}' --output-json | jq '.linkinfo'
 {
   "kind": "bond",
   "data": {
     "mode": 4,
     "miimon": 100,
     ...
     "arp-interval": 0,
     "arp-ip-target": [
       "192.168.1.1",
       "192.168.1.2"
     ],
     "arp-validate": 0,
     "arp-all-targets": 0,
     "ns-ip6-target": [
       "2001::1",
       "2001::2"
     ],
     "primary-reselect": 0,
     ...
     "missed-max": 2,
     "ad-info": {
       "aggregator": 1,
       "num-ports": 1,
       "actor-key": 0,
       "partner-key": 1,
       "partner-mac": "00:00:00:00:00:00"
     }
   }
 }

And here is the downlink info.

 $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/rt_link.yaml \
   --do getlink --json '{"ifname": "dummy0"}' --output-json | jq '.linkinfo'
 {
   "kind": "dummy",
   "slave-kind": "bond",
   "slave-data": {
     "state": 0,
     "mii-status": 0,
     "link-failure-count": 0,
     "perm-hwaddr": "f2:82:f7:cc:47:13",
     "queue-id": 0,
     "prio": 0
   }
 }
Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
Link: https://lore.kernel.org/r/20240409083504.3900877-1-liuhangbin@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 65f35aa7
......@@ -1035,6 +1035,165 @@ attribute-sets:
type: sub-message
sub-message: linkinfo-member-data-msg
selector: slave-kind
-
name: linkinfo-bond-attrs
name-prefix: ifla-bond-
attributes:
-
name: mode
type: u8
-
name: active-slave
type: u32
-
name: miimon
type: u32
-
name: updelay
type: u32
-
name: downdelay
type: u32
-
name: use-carrier
type: u8
-
name: arp-interval
type: u32
-
name: arp-ip-target
type: indexed-array
sub-type: u32
byte-order: big-endian
display-hint: ipv4
-
name: arp-validate
type: u32
-
name: arp-all-targets
type: u32
-
name: primary
type: u32
-
name: primary-reselect
type: u8
-
name: fail-over-mac
type: u8
-
name: xmit-hash-policy
type: u8
-
name: resend-igmp
type: u32
-
name: num-peer-notif
type: u8
-
name: all-slaves-active
type: u8
-
name: min-links
type: u32
-
name: lp-interval
type: u32
-
name: packets-per-slave
type: u32
-
name: ad-lacp-rate
type: u8
-
name: ad-select
type: u8
-
name: ad-info
type: nest
nested-attributes: bond-ad-info-attrs
-
name: ad-actor-sys-prio
type: u16
-
name: ad-user-port-key
type: u16
-
name: ad-actor-system
type: binary
display-hint: mac
-
name: tlb-dynamic-lb
type: u8
-
name: peer-notif-delay
type: u32
-
name: ad-lacp-active
type: u8
-
name: missed-max
type: u8
-
name: ns-ip6-target
type: indexed-array
sub-type: binary
display-hint: ipv6
-
name: coupled-control
type: u8
-
name: bond-ad-info-attrs
name-prefix: ifla-bond-ad-info-
attributes:
-
name: aggregator
type: u16
-
name: num-ports
type: u16
-
name: actor-key
type: u16
-
name: partner-key
type: u16
-
name: partner-mac
type: binary
display-hint: mac
-
name: bond-slave-attrs
name-prefix: ifla-bond-slave-
attributes:
-
name: state
type: u8
-
name: mii-status
type: u8
-
name: link-failure-count
type: u32
-
name: perm-hwaddr
type: binary
display-hint: mac
-
name: queue-id
type: u16
-
name: ad-aggregator-id
type: u16
-
name: ad-actor-oper-port-state
type: u8
-
name: ad-partner-oper-port-state
type: u16
-
name: prio
type: u32
-
name: linkinfo-bridge-attrs
name-prefix: ifla-br-
......@@ -1716,6 +1875,9 @@ sub-messages:
-
name: linkinfo-data-msg
formats:
-
value: bond
attribute-set: linkinfo-bond-attrs
-
value: bridge
attribute-set: linkinfo-bridge-attrs
......@@ -1754,6 +1916,7 @@ sub-messages:
attribute-set: linkinfo-brport-attrs
-
value: bond
attribute-set: bond-slave-attrs
operations:
enum-model: directional
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment