diff options
author | Hangbin Liu | 2024-04-09 16:35:04 +0800 |
---|---|---|
committer | Jakub Kicinski | 2024-04-10 19:35:10 -0700 |
commit | 4ede457542a615b08b1f25a25cb514402d033968 (patch) | |
tree | b356c7f7f39c74b8d9ac33ca05166ceee63d52b9 /Documentation/netlink | |
parent | 65f35aa76c0e21b0243fd734e513fd2263f22a18 (diff) |
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: Hangbin Liu <liuhangbin@gmail.com>
Link: https://lore.kernel.org/r/20240409083504.3900877-1-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 | 163 |
1 files changed, 163 insertions, 0 deletions
diff --git a/Documentation/netlink/specs/rt_link.yaml b/Documentation/netlink/specs/rt_link.yaml index e5dcb2cf1724..113ecd17c880 100644 --- a/Documentation/netlink/specs/rt_link.yaml +++ b/Documentation/netlink/specs/rt_link.yaml @@ -1036,6 +1036,165 @@ attribute-sets: 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- attributes: @@ -1717,6 +1876,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 |