mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
By default, strings defined in YAML at the next line are folded:
newlines are replaced by spaces. Here, the newlines are there for a
reason, and should be kept in the output.
This can be fixed by adding the '|' symbol to use the "literal" style.
This issue was introduced by commit 387724cbf4 ("Documentation:
netlink: add a YAML spec for team"), but visible in the doc only since
the parent commit.
To avoid warnings when generating the HTML output, and to look better,
the code layout is now in a dedicated code block, which requires '::'
and a new blank line. Just for a question of uniformity, a new blank
line is also added after the code block.
Suggested-by: Donald Hunter <donald.hunter@gmail.com>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250913-net-next-ynl-attr-doc-rst-v3-2-4f06420d87db@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
206 lines
4 KiB
YAML
206 lines
4 KiB
YAML
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
|
---
|
|
name: team
|
|
|
|
protocol: genetlink-legacy
|
|
|
|
doc: |
|
|
Network team device driver.
|
|
|
|
c-family-name: team-genl-name
|
|
c-version-name: team-genl-version
|
|
kernel-policy: global
|
|
uapi-header: linux/if_team.h
|
|
|
|
definitions:
|
|
-
|
|
name: string-max-len
|
|
type: const
|
|
value: 32
|
|
-
|
|
name: genl-change-event-mc-grp-name
|
|
type: const
|
|
value: change_event
|
|
|
|
attribute-sets:
|
|
-
|
|
name: team
|
|
doc: |
|
|
The team nested layout of get/set msg looks like::
|
|
|
|
[TEAM_ATTR_LIST_OPTION]
|
|
[TEAM_ATTR_ITEM_OPTION]
|
|
[TEAM_ATTR_OPTION_*], ...
|
|
[TEAM_ATTR_ITEM_OPTION]
|
|
[TEAM_ATTR_OPTION_*], ...
|
|
...
|
|
[TEAM_ATTR_LIST_PORT]
|
|
[TEAM_ATTR_ITEM_PORT]
|
|
[TEAM_ATTR_PORT_*], ...
|
|
[TEAM_ATTR_ITEM_PORT]
|
|
[TEAM_ATTR_PORT_*], ...
|
|
...
|
|
|
|
name-prefix: team-attr-
|
|
attributes:
|
|
-
|
|
name: unspec
|
|
type: unused
|
|
value: 0
|
|
-
|
|
name: team-ifindex
|
|
type: u32
|
|
-
|
|
name: list-option
|
|
type: nest
|
|
nested-attributes: item-option
|
|
-
|
|
name: list-port
|
|
type: nest
|
|
nested-attributes: item-port
|
|
-
|
|
name: item-option
|
|
name-prefix: team-attr-item-
|
|
attr-cnt-name: __team-attr-item-option-max
|
|
attr-max-name: team-attr-item-option-max
|
|
attributes:
|
|
-
|
|
name: option-unspec
|
|
type: unused
|
|
value: 0
|
|
-
|
|
name: option
|
|
type: nest
|
|
nested-attributes: attr-option
|
|
-
|
|
name: attr-option
|
|
name-prefix: team-attr-option-
|
|
attributes:
|
|
-
|
|
name: unspec
|
|
type: unused
|
|
value: 0
|
|
-
|
|
name: name
|
|
type: string
|
|
checks:
|
|
max-len: string-max-len
|
|
unterminated-ok: true
|
|
-
|
|
name: changed
|
|
type: flag
|
|
-
|
|
name: type
|
|
type: u8
|
|
-
|
|
name: data
|
|
type: binary
|
|
-
|
|
name: removed
|
|
type: flag
|
|
-
|
|
name: port-ifindex
|
|
type: u32
|
|
doc: for per-port options
|
|
-
|
|
name: array-index
|
|
type: u32
|
|
doc: for array options
|
|
-
|
|
name: item-port
|
|
name-prefix: team-attr-item-
|
|
attr-cnt-name: __team-attr-item-port-max
|
|
attr-max-name: team-attr-item-port-max
|
|
attributes:
|
|
-
|
|
name: port-unspec
|
|
type: unused
|
|
value: 0
|
|
-
|
|
name: port
|
|
type: nest
|
|
nested-attributes: attr-port
|
|
-
|
|
name: attr-port
|
|
name-prefix: team-attr-port-
|
|
attributes:
|
|
-
|
|
name: unspec
|
|
type: unused
|
|
value: 0
|
|
-
|
|
name: ifindex
|
|
type: u32
|
|
-
|
|
name: changed
|
|
type: flag
|
|
-
|
|
name: linkup
|
|
type: flag
|
|
-
|
|
name: speed
|
|
type: u32
|
|
-
|
|
name: duplex
|
|
type: u8
|
|
-
|
|
name: removed
|
|
type: flag
|
|
|
|
operations:
|
|
list:
|
|
-
|
|
name: noop
|
|
doc: No operation
|
|
value: 0
|
|
attribute-set: team
|
|
dont-validate: [strict]
|
|
|
|
do:
|
|
# Actually it only reply the team netlink family
|
|
reply:
|
|
attributes:
|
|
- team-ifindex
|
|
|
|
-
|
|
name: options-set
|
|
doc: Set team options
|
|
attribute-set: team
|
|
dont-validate: [strict]
|
|
flags: [admin-perm]
|
|
|
|
do:
|
|
request: &option_attrs
|
|
attributes:
|
|
- team-ifindex
|
|
- list-option
|
|
reply: *option_attrs
|
|
|
|
-
|
|
name: options-get
|
|
doc: Get team options info
|
|
attribute-set: team
|
|
dont-validate: [strict]
|
|
flags: [admin-perm]
|
|
|
|
do:
|
|
request:
|
|
attributes:
|
|
- team-ifindex
|
|
reply: *option_attrs
|
|
|
|
-
|
|
name: port-list-get
|
|
doc: Get team ports info
|
|
attribute-set: team
|
|
dont-validate: [strict]
|
|
flags: [admin-perm]
|
|
|
|
do:
|
|
request:
|
|
attributes:
|
|
- team-ifindex
|
|
reply: &port_attrs
|
|
attributes:
|
|
- team-ifindex
|
|
- list-port
|