doc/netlink/specs: add netkit support to rt_link.yaml

JIRA: https://issues.redhat.com/browse/RHEL-57756

Upstream commit(s):
commit 7d70ed9f9c6a9537379ff645d6befea4c203aa98
Author: Nikolay Aleksandrov <razor@blackwall.org>
Date:   Tue Aug 6 13:45:31 2024 +0300

    doc/netlink/specs: add netkit support to rt_link.yaml

    Add netkit support to rt_link.yaml. Only forward(PASS) and
    blackhole(DROP) policies are allowed to be set by user-space so I've
    added only them to the yaml to avoid confusion.

    Example:
      $ ./tools/net/ynl/cli.py \
         --spec Documentation/netlink/specs/rt_link.yaml \
         --do getlink --json '{"ifname": "netkit0"}' --output-json | jq
      ...
      "linkinfo": {
        "kind": "netkit",
        "data": {
          "primary": 1,
          "policy": "blackhole",
          "mode": "l2",
          "peer-policy": "forward"
        }
      },
      ...

    Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
    Link: https://patch.msgid.link/20240806104531.3296718-1-razor@blackwall.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Petr Oros <poros@redhat.com>
This commit is contained in:
Petr Oros 2024-11-25 10:55:10 +01:00
parent 606c8e999c
commit b533ec6993
1 changed files with 41 additions and 0 deletions

View File

@ -903,6 +903,22 @@ definitions:
- cfm-config
- cfm-status
- mst
-
name: netkit-policy
type: enum
entries:
-
name: forward
value: 0
-
name: blackhole
value: 2
-
name: netkit-mode
type: enum
entries:
- name: l2
- name: l3
attribute-sets:
-
@ -2109,6 +2125,28 @@ attribute-sets:
-
name: id
type: u32
-
name: linkinfo-netkit-attrs
name-prefix: ifla-netkit-
attributes:
-
name: peer-info
type: binary
-
name: primary
type: u8
-
name: policy
type: u32
enum: netkit-policy
-
name: peer-policy
type: u32
enum: netkit-policy
-
name: mode
type: u32
enum: netkit-mode
sub-messages:
-
@ -2147,6 +2185,9 @@ sub-messages:
-
value: vrf
attribute-set: linkinfo-vrf-attrs
-
value: netkit
attribute-set: linkinfo-netkit-attrs
-
name: linkinfo-member-data-msg
formats: