mbox series

[net-next,v2,00/13] tools/net/ynl: Add features for tc family

Message ID 20240129223458.52046-1-donald.hunter@gmail.com (mailing list archive)
Headers show
Series tools/net/ynl: Add features for tc family | expand

Message

Donald Hunter Jan. 29, 2024, 10:34 p.m. UTC
Add features to ynl for tc and update the tc spec to use them.

Patch 1 adds an option to output json instead of python pretty printing.
Patch 2, 3 adds support and docs for sub-messages in nested attribute
spaces that reference keys from a parent space.
Patches 4 and 7-9 refactor ynl in support of nested struct definitions
Patch 5 implements sub-message encoding for write ops.
Patch 6 adds logic to set default zero values for binary blobs
Patches 10, 11 adds support and docs for nested struct definitions
Patch 12 updates the ynl doc generator to include type information for
struct members.
Patch 13 updates the tc spec - still a work in progress but more complete

v1 -> v2
 - Use spec-led sub-message selector resolution instead of ChainMap
 - Add docs for sub-message selector resolution
 - Remove unused variable declaration in ynl-gen-rst

Donald Hunter (13):
  tools/net/ynl: Add --output-json arg to ynl cli
  tools/net/ynl: Support sub-messages in nested attribute spaces
  doc/netlink: Describe sub-message selector resolution
  tools/net/ynl: Refactor fixed header encoding into separate method
  tools/net/ynl: Add support for encoding sub-messages
  tools/net/ynl: Encode default values for binary blobs
  tools/net/ynl: Combine struct decoding logic in ynl
  tools/net/ynl: Rename _fixed_header_size() to _struct_size()
  tools/net/ynl: Move formatted_string method out of NlAttr
  tools/net/ynl: Add support for nested structs
  doc/netlink: Describe nested structs in netlink raw docs
  tools/net/ynl: Add type info to struct members in generated docs
  doc/netlink/specs: Update the tc spec

 Documentation/netlink/netlink-raw.yaml        |   15 +-
 Documentation/netlink/specs/tc.yaml           | 2218 +++++++++++++++--
 .../userspace-api/netlink/netlink-raw.rst     |   42 +
 tools/net/ynl/cli.py                          |   22 +-
 tools/net/ynl/lib/nlspec.py                   |    2 +
 tools/net/ynl/lib/ynl.py                      |  200 +-
 tools/net/ynl/ynl-gen-rst.py                  |    9 +-
 7 files changed, 2271 insertions(+), 237 deletions(-)

Comments

Jiri Pirko Jan. 30, 2024, 10:22 a.m. UTC | #1
Mon, Jan 29, 2024 at 11:34:45PM CET, donald.hunter@gmail.com wrote:
>Add features to ynl for tc and update the tc spec to use them.
>
>Patch 1 adds an option to output json instead of python pretty printing.
>Patch 2, 3 adds support and docs for sub-messages in nested attribute
>spaces that reference keys from a parent space.
>Patches 4 and 7-9 refactor ynl in support of nested struct definitions
>Patch 5 implements sub-message encoding for write ops.
>Patch 6 adds logic to set default zero values for binary blobs
>Patches 10, 11 adds support and docs for nested struct definitions
>Patch 12 updates the ynl doc generator to include type information for
>struct members.
>Patch 13 updates the tc spec - still a work in progress but more complete
>
>v1 -> v2
> - Use spec-led sub-message selector resolution instead of ChainMap
> - Add docs for sub-message selector resolution
> - Remove unused variable declaration in ynl-gen-rst
>
>Donald Hunter (13):
>  tools/net/ynl: Add --output-json arg to ynl cli
>  tools/net/ynl: Support sub-messages in nested attribute spaces
>  doc/netlink: Describe sub-message selector resolution
>  tools/net/ynl: Refactor fixed header encoding into separate method
>  tools/net/ynl: Add support for encoding sub-messages
>  tools/net/ynl: Encode default values for binary blobs
>  tools/net/ynl: Combine struct decoding logic in ynl
>  tools/net/ynl: Rename _fixed_header_size() to _struct_size()
>  tools/net/ynl: Move formatted_string method out of NlAttr
>  tools/net/ynl: Add support for nested structs
>  doc/netlink: Describe nested structs in netlink raw docs
>  tools/net/ynl: Add type info to struct members in generated docs
>  doc/netlink/specs: Update the tc spec

Looks good to me in general. I didn't review all the spec changes in
details though. FWIW:

Reviewed-by: Jiri Pirko <jiri@nvidia.com>
patchwork-bot+netdevbpf@kernel.org Feb. 1, 2024, 5:20 a.m. UTC | #2
Hello:

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

On Mon, 29 Jan 2024 22:34:45 +0000 you wrote:
> Add features to ynl for tc and update the tc spec to use them.
> 
> Patch 1 adds an option to output json instead of python pretty printing.
> Patch 2, 3 adds support and docs for sub-messages in nested attribute
> spaces that reference keys from a parent space.
> Patches 4 and 7-9 refactor ynl in support of nested struct definitions
> Patch 5 implements sub-message encoding for write ops.
> Patch 6 adds logic to set default zero values for binary blobs
> Patches 10, 11 adds support and docs for nested struct definitions
> Patch 12 updates the ynl doc generator to include type information for
> struct members.
> Patch 13 updates the tc spec - still a work in progress but more complete
> 
> [...]

Here is the summary with links:
  - [net-next,v2,01/13] tools/net/ynl: Add --output-json arg to ynl cli
    https://git.kernel.org/netdev/net-next/c/e2ece0bc5ab1
  - [net-next,v2,02/13] tools/net/ynl: Support sub-messages in nested attribute spaces
    https://git.kernel.org/netdev/net-next/c/bf8b832374fb
  - [net-next,v2,03/13] doc/netlink: Describe sub-message selector resolution
    https://git.kernel.org/netdev/net-next/c/78d234169795
  - [net-next,v2,04/13] tools/net/ynl: Refactor fixed header encoding into separate method
    https://git.kernel.org/netdev/net-next/c/5f2823c48ad6
  - [net-next,v2,05/13] tools/net/ynl: Add support for encoding sub-messages
    https://git.kernel.org/netdev/net-next/c/ab463c4342d1
  - [net-next,v2,06/13] tools/net/ynl: Encode default values for binary blobs
    https://git.kernel.org/netdev/net-next/c/a387a921139e
  - [net-next,v2,07/13] tools/net/ynl: Combine struct decoding logic in ynl
    https://git.kernel.org/netdev/net-next/c/e45fee0f49fc
  - [net-next,v2,08/13] tools/net/ynl: Rename _fixed_header_size() to _struct_size()
    https://git.kernel.org/netdev/net-next/c/886365cf40b2
  - [net-next,v2,09/13] tools/net/ynl: Move formatted_string method out of NlAttr
    https://git.kernel.org/netdev/net-next/c/971c3eeaf668
  - [net-next,v2,10/13] tools/net/ynl: Add support for nested structs
    https://git.kernel.org/netdev/net-next/c/bf08f32c8ced
  - [net-next,v2,11/13] doc/netlink: Describe nested structs in netlink raw docs
    https://git.kernel.org/netdev/net-next/c/9d6429c33976
  - [net-next,v2,12/13] tools/net/ynl: Add type info to struct members in generated docs
    https://git.kernel.org/netdev/net-next/c/fe09ae5fb93b
  - [net-next,v2,13/13] doc/netlink/specs: Update the tc spec
    https://git.kernel.org/netdev/net-next/c/2267672a6190

You are awesome, thank you!