Skip to content

tools/net/ynl: Add support for netlink-raw families

Donald Hunter linux-doc netdev 6 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest12 patches 0 repliesApplied 12/12
  2. v512 patches 3 repliesSuperseded
  3. v412 patches 16 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v312 patches3 repliesSuperseded
v210 patches18 repliesSuperseded
v13 patches12 repliesSuperseded

Changes in v6 from the cover letter

- Remove explicit value definitions from link-attrs in rt_link.yaml

Patches in v6 All 12 applied

#Subject and filesSizeRepliesApplied
1/12doc/netlink: Fix typo in genetlink-* schemasDocumentation/netlink/genetlink-c.yaml Documentation/netlink/genetlink-legacy.yaml+2 -20 repliesApplied
2/12doc/netlink: Add a schema for netlink-raw familiesDocumentation/netlink/netlink-raw.yaml+410 -00 repliesApplied
3/12doc/netlink: Update genetlink-legacy documentationDocumentation/core-api/netlink.rst Documentation/userspace-api/netlink/genetlink-legacy.rst Documentation/userspace-api/netlink/specs.rst+35 -130 repliesApplied
4/12doc/netlink: Document the netlink-raw schema extensionsDocumentation/userspace-api/netlink/index.rst Documentation/userspace-api/netlink/netlink-raw.rst+59 -00 repliesApplied
5/12tools/ynl: Add mcast-group schema parsing to ynltools/net/ynl/lib/nlspec.py+31 -00 repliesApplied
6/12tools/net/ynl: Fix extack parsing with fixed header genlmsgtools/net/ynl/lib/ynl.py+40 -250 repliesApplied
7/12tools/net/ynl: Add support for netlink-raw familiestools/net/ynl/lib/ynl.py+91 -330 repliesApplied
8/12tools/net/ynl: Implement nlattr array-nest decoding in ynltools/net/ynl/lib/ynl.py+13 -00 repliesApplied
9/12tools/net/ynl: Add support for create flagstools/net/ynl/cli.py tools/net/ynl/lib/__init__.py tools/net/ynl/lib/ynl.py+22 -80 repliesApplied
10/12doc/netlink: Add spec for rt addr messagesDocumentation/netlink/specs/rt_addr.yaml+179 -00 repliesApplied
11/12doc/netlink: Add spec for rt link messagesDocumentation/netlink/specs/rt_link.yaml+1432 -00 repliesApplied
12/12doc/netlink: Add spec for rt route messagesDocumentation/netlink/specs/rt_route.yaml+327 -00 repliesApplied

Reviews trailers per patch

11 of 12 patches have a Reviewed-by or Acked-by.

PatchJacob KellerJakub Kicinski
1/12R-b
2/12R-b
3/12R-b
4/12R-b
5/12R-b
6/12R-b
7/12
8/12R-b R-b
9/12R-b
10/12R-b
11/12R-b
12/12R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH net-next v6 00/12] tools/net/ynl: Add support for netlink-raw families

This patchset adds support for netlink-raw families such as rtnetlink.

Patch 1 fixes a typo in existing schemas
Patch 2 contains the schema definition
Patches 3 & 4 update the schema documentation
Patches 5 - 9 extends ynl
Patches 10 - 12 add several netlink-raw specs

The netlink-raw schema is very similar to genetlink-legacy and I thought about making the changes there and symlinking to it. On balance I thought that might be problematic for accurate schema validation.

rtnetlink doesn't seem to fit into unified or directional message enumeration models. It seems like an 'explicit' model would be useful, to force the schema author to specify the message ids directly.

There is not yet support for notifications because ynl currently doesn't support defining 'event' properties on a 'do' operation. The message ids are shared so ops need to be both sync and async. I plan to look at this in a future patch.

The link and route messages contain different nested attributes dependent on the type of link or route. Decoding these will need some kind of attr-space selection that uses the value of another attribute as the selector key. These nested attributes have been left with type 'binary' for now.

v5 -> v6:
- Remove explicit value definitions from link-attrs in rt_link.yaml

v4 -> v5:
- Fix schema id in netlink-raw schema
- Remove doc references to genetlink from netlink-raw schema
- Add missing whitespace between classes in ynl.py

v3 -> v4:
- Fix incorrect var name in handle_ntf
- Update rt_link spec to include operation attributes
- Update rt_route spec to refine operation attributes

v2 -> v3:
- Fix typo in existing schemas
- Rework fixed_header code to fix extack parsing
- Add support for CREATE, EXCL, REPLACE and APPEND, needed by rt_route

v1 -> v2:
- Put mcast-group changes in separate patch
- Put decode_fixed_header refactoring in separate patch
- Avoid refactoring decode_enum
- Rename NetlinkProtocolFamily -> NetlinkProtocol and

    GenlProtocolFamily -> GenlProtocol and store in self.nlproto

- Add spec for rt link.

Donald Hunter (12):
doc/netlink: Fix typo in genetlink-* schemas doc/netlink: Add a schema for netlink-raw families doc/netlink: Update genetlink-legacy documentation doc/netlink: Document the netlink-raw schema extensions tools/ynl: Add mcast-group schema parsing to ynl tools/net/ynl: Fix extack parsing with fixed header genlmsg tools/net/ynl: Add support for netlink-raw families tools/net/ynl: Implement nlattr array-nest decoding in ynl tools/net/ynl: Add support for create flags doc/netlink: Add spec for rt addr messages doc/netlink: Add spec for rt link messages doc/netlink: Add spec for rt route messages

 Documentation/core-api/netlink.rst            |    9 +-
 Documentation/netlink/genetlink-c.yaml        |    2 +-
 Documentation/netlink/genetlink-legacy.yaml   |    2 +-
 Documentation/netlink/netlink-raw.yaml        |  410 +++++
 Documentation/netlink/specs/rt_addr.yaml      |  179 +++
 Documentation/netlink/specs/rt_link.yaml      | 1432 +++++++++++++++++
 Documentation/netlink/specs/rt_route.yaml     |  327 ++++
 .../netlink/genetlink-legacy.rst              |   26 +-
 Documentation/userspace-api/netlink/index.rst |    1 +
 .../userspace-api/netlink/netlink-raw.rst     |   58 +
 Documentation/userspace-api/netlink/specs.rst |   13 +
 tools/net/ynl/cli.py                          |   12 +-
 tools/net/ynl/lib/__init__.py                 |    4 +-
 tools/net/ynl/lib/nlspec.py                   |   31 +
 tools/net/ynl/lib/ynl.py                      |  198 ++-
 15 files changed, 2632 insertions(+), 72 deletions(-)
 create mode 100644 Documentation/netlink/netlink-raw.yaml
 create mode 100644 Documentation/netlink/specs/rt_addr.yaml
 create mode 100644 Documentation/netlink/specs/rt_link.yaml
 create mode 100644 Documentation/netlink/specs/rt_route.yaml
 create mode 100644 Documentation/userspace-api/netlink/netlink-raw.rst
Signature · 1 line
2.41.0