Skip to content

tools/net/ynl: Add 'sub-message' support to ynl

Donald Hunter linux-doc netdev 5 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. v5 Latest13 patches 1 replyApplied 13/13
  2. v413 patches 1 replySuperseded
  3. v313 patches 10 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v211 patches22 repliesSuperseded
v16 patches17 repliesSuperseded 1 of 6 applied

Changes in v5 from the cover letter

- Update tc spec to remove fixed header attributes from ops

Patches in v5 All 13 applied

#Subject and filesSizeRepliesApplied
1/13tools/net/ynl: Use consistent array index expression formattingtools/net/ynl/lib/ynl.py+5 -50 repliesApplied
2/13doc/netlink: Add sub-message support to netlink-rawDocumentation/netlink/netlink-raw.yaml+62 -30 repliesApplied
3/13doc/netlink: Document the sub-message format for netlink-rawDocumentation/userspace-api/netlink/netlink-raw.rst+95 -10 repliesApplied
4/13tools/net/ynl: Add 'sub-message' attribute decoding to ynltools/net/ynl/lib/nlspec.py tools/net/ynl/lib/ynl.py+95 -80 repliesApplied
5/13tools/net/ynl: Add binary and pad support to structs for tctools/net/ynl/lib/ynl.py+26 -100 repliesApplied
6/13doc/netlink/specs: Add sub-message type to rt_link familyDocumentation/netlink/specs/rt_link.yaml+432 -41 replyApplied
7/13doc/netlink/specs: use pad in structs in rt_linkDocumentation/netlink/specs/rt_link.yaml+6 -70 repliesApplied
8/13doc/netlink/specs: Add a spec for tcDocumentation/netlink/specs/tc.yaml+2031 -00 repliesApplied
9/13doc/netlink: Regenerate netlink .rst files if ynl-gen-rst changesDocumentation/Makefile+3 -30 repliesApplied
10/13tools/net/ynl-gen-rst: Add sub-messages to generated docstools/net/ynl/ynl-gen-rst.py+23 -00 repliesApplied
11/13tools/net/ynl-gen-rst: Sort the index of generated netlink specstools/net/ynl/ynl-gen-rst.py+1 -10 repliesApplied
12/13tools/net/ynl-gen-rst: Remove bold from attribute-set headingstools/net/ynl/ynl-gen-rst.py+1 -10 repliesApplied
13/13tools/net/ynl-gen-rst: Remove extra indentation from generated docstools/net/ynl/ynl-gen-rst.py+3 -30 repliesApplied

Reviews trailers per patch

9 of 13 patches have a Reviewed-by or Acked-by.

PatchJakub KicinskiBreno Leitao
1/13R-b
2/13R-b
3/13R-b
4/13R-b
5/13R-b
6/13
7/13
8/13
9/13R-b R-b
10/13R-b
11/13R-b R-b
12/13
13/13R-b

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

Read the v5 thread

Cover letter [PATCH net-next v5 00/13] tools/net/ynl: Add 'sub-message' support to ynl

This patchset adds a 'sub-message' attribute type to the netlink-raw schema and implements it in ynl. This provides support for kind-specific options attributes as used in rt_link and tc raw netlink families.

A description of the new 'sub-message' attribute type and the corresponding sub-message definitions is provided in patch 3.

The patchset includes updates to the rt_link spec and a new tc spec that make use of the new 'sub-message' attribute type.

As mentioned in patch 4, encode support is not yet implemented in ynl and support for sub-message selectors at a different nest level from the key attribute is not yet supported. I plan to work on these in follow-up patches.

Patches 1 is code cleanup in ynl
Patches 2-4 add sub-message support to the schema and ynl with documentation updates.
Patch 5 adds binary and pad support to structs in netlink-raw. Patches 6-8 contain specs that use the sub-message attribute type. Patches 9-13 update ynl-gen-rst and its make target

Changes since v4:
- Update tc spec to remove fixed header attributes from ops

Changes since v3: (reported by Breno Leitao)
- Remove an unnecessary make dependency from the YNL_INDEX target.

Changes since v2: (reported by Jakub Kicinski and Breno Leitao)
- Fixed ynl-gen-c breakage
- Added schema constraint for pad/binary & len
- Improved description text in raw schema
- Used | for all multi-line text in schema
- Updated docs with explanation of what a sub-message is
- Reverted change in ynl-gen-rst
- Added ynl-gen-rst patches and grouped them all at end of patchset

Changes since v1: (reported by Jakub Kicinski, thanks!)
- Added cleanups for ynl and generated netlink docs
- Describe sub-messages in netlink docs
- Cleaned up unintended indent changes
- Cleaned up rt-link sub-message definitions
- Cleaned up array index expressions to follow python style
- Added sub-messages to generated netlink spec docs

Donald Hunter (13):
tools/net/ynl: Use consistent array index expression formatting doc/netlink: Add sub-message support to netlink-raw doc/netlink: Document the sub-message format for netlink-raw tools/net/ynl: Add 'sub-message' attribute decoding to ynl tools/net/ynl: Add binary and pad support to structs for tc doc/netlink/specs: Add sub-message type to rt_link family doc/netlink/specs: use pad in structs in rt_link doc/netlink/specs: Add a spec for tc
doc/netlink: Regenerate netlink .rst files if ynl-gen-rst changes tools/net/ynl-gen-rst: Add sub-messages to generated docs tools/net/ynl-gen-rst: Sort the index of generated netlink specs tools/net/ynl-gen-rst: Remove bold from attribute-set headings tools/net/ynl-gen-rst: Remove extra indentation from generated docs

 Documentation/Makefile                        |    6 +-
 Documentation/netlink/netlink-raw.yaml        |   65 +-
 Documentation/netlink/specs/rt_link.yaml      |  449 +++-
 Documentation/netlink/specs/tc.yaml           | 2031 +++++++++++++++++
 .../userspace-api/netlink/netlink-raw.rst     |   96 +-
 tools/net/ynl/lib/nlspec.py                   |   55 +
 tools/net/ynl/lib/ynl.py                      |   94 +-
 tools/net/ynl/ynl-gen-rst.py                  |   31 +-
 8 files changed, 2782 insertions(+), 45 deletions(-)
 create mode 100644 Documentation/netlink/specs/tc.yaml
Signature · 1 line
2.42.0