mbox series

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

Message ID 20231215093720.18774-1-donald.hunter@gmail.com (mailing list archive)
Headers show
Series tools/net/ynl: Add 'sub-message' support to ynl | expand

Message

Donald Hunter Dec. 15, 2023, 9:37 a.m. UTC
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

Comments

patchwork-bot+netdevbpf@kernel.org Dec. 18, 2023, 11:10 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 15 Dec 2023 09:37:07 +0000 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next,v5,01/13] tools/net/ynl: Use consistent array index expression formatting
    https://git.kernel.org/netdev/net-next/c/62691b801daa
  - [net-next,v5,02/13] doc/netlink: Add sub-message support to netlink-raw
    https://git.kernel.org/netdev/net-next/c/de2d98743b83
  - [net-next,v5,03/13] doc/netlink: Document the sub-message format for netlink-raw
    https://git.kernel.org/netdev/net-next/c/17ed5c1a9e36
  - [net-next,v5,04/13] tools/net/ynl: Add 'sub-message' attribute decoding to ynl
    https://git.kernel.org/netdev/net-next/c/1769e2be4baa
  - [net-next,v5,05/13] tools/net/ynl: Add binary and pad support to structs for tc
    https://git.kernel.org/netdev/net-next/c/8b6811d96666
  - [net-next,v5,06/13] doc/netlink/specs: Add sub-message type to rt_link family
    https://git.kernel.org/netdev/net-next/c/077b6022d24b
  - [net-next,v5,07/13] doc/netlink/specs: use pad in structs in rt_link
    https://git.kernel.org/netdev/net-next/c/6b4b0754ef8a
  - [net-next,v5,08/13] doc/netlink/specs: Add a spec for tc
    https://git.kernel.org/netdev/net-next/c/a1bcfde83669
  - [net-next,v5,09/13] doc/netlink: Regenerate netlink .rst files if ynl-gen-rst changes
    https://git.kernel.org/netdev/net-next/c/646158f20cbc
  - [net-next,v5,10/13] tools/net/ynl-gen-rst: Add sub-messages to generated docs
    https://git.kernel.org/netdev/net-next/c/6235b3d8bc3f
  - [net-next,v5,11/13] tools/net/ynl-gen-rst: Sort the index of generated netlink specs
    https://git.kernel.org/netdev/net-next/c/e8c32339cf49
  - [net-next,v5,12/13] tools/net/ynl-gen-rst: Remove bold from attribute-set headings
    https://git.kernel.org/netdev/net-next/c/e9d7c59212e4
  - [net-next,v5,13/13] tools/net/ynl-gen-rst: Remove extra indentation from generated docs
    https://git.kernel.org/netdev/net-next/c/9b0aa2244d9d

You are awesome, thank you!