Skip to content

tools: ynl: more docs and basic ethtool support

Jakub Kicinski linux-doc netdev 2 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest14 patches 0 repliesApplied 14/14
  2. v113 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- spelling fixes (patch 11)
- always use python3 (new patch 14)

Patches in v2 All 14 applied

#Subject and filesSizeRepliesApplied
1/14tools: ynl-gen: prevent do / dump reorderingtools/net/ynl/ynl-gen-c.py+2 -20 repliesApplied
2/14tools: ynl: move the cli and netlink code aroundtools/net/ynl/cli.py tools/net/ynl/lib/__init__.py tools/net/ynl/lib/ynl.py+6 -10 repliesApplied
3/14tools: ynl: add an object hierarchy to represent parsed spectools/net/ynl/lib/__init__.py tools/net/ynl/lib/nlspec.py+304 -10 repliesApplied
4/14tools: ynl: use the common YAML loading and validation codetools/net/ynl/lib/ynl.py tools/net/ynl/ynl-gen-c.py+142 -2320 repliesApplied
5/14tools: ynl: add support for types needed by ethtooltools/net/ynl/lib/ynl.py+10 -10 repliesApplied
6/14tools: ynl: support directional enum-model in CLItools/net/ynl/lib/ynl.py+4 -40 repliesApplied
7/14tools: ynl: support multi-attrtools/net/ynl/lib/ynl.py+14 -70 repliesApplied
8/14tools: ynl: support pretty printing bad attribute namestools/net/ynl/lib/ynl.py+40 -00 repliesApplied
9/14tools: ynl: use operation names from spec on the CLItools/net/ynl/cli.py tools/net/ynl/lib/ynl.py+11 -40 repliesApplied
10/14tools: ynl: load jsonschema on demandtools/net/ynl/cli.py tools/net/ynl/lib/nlspec.py+14 -10 repliesApplied
11/14netlink: specs: finish up operation enum-modelsDocumentation/netlink/genetlink-c.yaml Documentation/netlink/genetlink-legacy.yaml Documentation/netlink/genetlink.yaml +1 more+92 -90 repliesApplied
12/14netlink: specs: add partial specification for ethtoolDocumentation/netlink/specs/ethtool.yaml+392 -00 repliesApplied
13/14docs: netlink: add a starting guide for working with specsDocumentation/userspace-api/netlink/index.rst Documentation/userspace-api/netlink/intro-specs.rst Documentation/userspace-api/netlink/specs.rst+84 -00 repliesApplied
14/14tools: net: use python3 explicitlytools/net/ynl/cli.py tools/net/ynl/ynl-gen-c.py+2 -20 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH net-next v2 00/14] tools: ynl: more docs and basic ethtool support

I got discouraged from supporting ethtool in specs, because generating the user space C code seems a little tricky. The messages are ID'ed in a "directional" way (to and from kernel are separate ID "spaces"). There is value, however, in having the spec and being able to for example use it in Python.

After paying off some technical debt - add a partial ethtool spec. Partial because the header for ethtool is almost a 1000 LoC, so converting in one sitting is tough. But adding new commands should be trivial now.

Last but not least I add more docs, I realized that I've been sending a similar "instructions" email to people working on new families. It's now intro-specs.rst.

v2:
- spelling fixes (patch 11)
- always use python3 (new patch 14)

Jakub Kicinski (14):
tools: ynl-gen: prevent do / dump reordering
tools: ynl: move the cli and netlink code around
tools: ynl: add an object hierarchy to represent parsed spec
tools: ynl: use the common YAML loading and validation code
tools: ynl: add support for types needed by ethtool
tools: ynl: support directional enum-model in CLI
tools: ynl: support multi-attr
tools: ynl: support pretty printing bad attribute names
tools: ynl: use operation names from spec on the CLI
tools: ynl: load jsonschema on demand
netlink: specs: finish up operation enum-models
netlink: specs: add partial specification for ethtool
docs: netlink: add a starting guide for working with specs
tools: net: use python3 explicitly

 Documentation/netlink/genetlink-c.yaml        |   4 +-
 Documentation/netlink/genetlink-legacy.yaml   |  11 +-
 Documentation/netlink/genetlink.yaml          |   4 +-
 Documentation/netlink/specs/ethtool.yaml      | 392 ++++++++++++++++++
 .../netlink/genetlink-legacy.rst              |  82 ++++
 Documentation/userspace-api/netlink/index.rst |   1 +
 .../userspace-api/netlink/intro-specs.rst     |  80 ++++
 Documentation/userspace-api/netlink/specs.rst |   3 +
 tools/net/ynl/{samples => }/cli.py            |  17 +-
 tools/net/ynl/lib/__init__.py                 |   7 +
 tools/net/ynl/lib/nlspec.py                   | 310 ++++++++++++++
 tools/net/ynl/{samples => lib}/ynl.py         | 192 +++++----
 tools/net/ynl/ynl-gen-c.py                    | 262 ++++++------
 13 files changed, 1109 insertions(+), 256 deletions(-)
 create mode 100644 Documentation/netlink/specs/ethtool.yaml
 create mode 100644 Documentation/userspace-api/netlink/intro-specs.rst
 rename tools/net/ynl/{samples => }/cli.py (76%)
 create mode 100644 tools/net/ynl/lib/__init__.py
 create mode 100644 tools/net/ynl/lib/nlspec.py
 rename tools/net/ynl/{samples => lib}/ynl.py (79%)
Signature · 1 line
2.39.1