OSDN Git Service

doc/netlink: Add spec for rt link messages
authorDonald Hunter <donald.hunter@gmail.com>
Fri, 25 Aug 2023 12:27:54 +0000 (13:27 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 28 Aug 2023 00:17:11 +0000 (17:17 -0700)
commitb2f63d904e7254de447e6e809fc6ebd98323aa39
tree304d4dbfda95857938b02c1a737f3cab5cc9e128
parentdfb0f7d9d979567ad7b1194093e649c7a0d42f90
doc/netlink: Add spec for rt link messages

Add schema for rt link with support for newlink, dellink, getlink,
setlink and getstats.

A dummy link can be created like this:

sudo ./tools/net/ynl/cli.py \
    --spec Documentation/netlink/specs/rt_link.yaml \
    --do newlink --create \
    --json '{"ifname": "dummy0", "linkinfo": {"kind": "dummy"}}'

For example, offload stats can be fetched like this:

./tools/net/ynl/cli.py \
    --spec Documentation/netlink/specs/rt_link.yaml \
    --dump getstats --json '{ "filter-mask": 8 }'

Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20230825122756.7603-12-donald.hunter@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/specs/rt_link.yaml [new file with mode: 0644]