Skip to content

tools: ynl: fill in some gaps of ethtool spec

Stanislav Fomichev netdev 3 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. v3 Latest4 patches 0 repliesApplied 4/4
  2. v24 patches 4 repliesSuperseded
  3. v14 patches 11 repliesSuperseded

Changes in v3 from the cover letter

- reindent ethtool to 4 spaces
- byte_order=None to keep existing callers as is
- byte_order to SpecAttr

Patches in v3 All 4 applied

#Subject and filesSizeRepliesApplied
1/4tools: ynl: support byte-order in clitools/net/ynl/lib/nlspec.py tools/net/ynl/lib/ynl.py+24 -120 repliesApplied
2/4tools: ynl: populate most of the ethtool specDocumentation/netlink/specs/ethtool.yaml+1367 -1130 repliesApplied
3/4tools: ynl: replace print with NlErrortools/net/ynl/lib/ynl.py+9 -30 repliesApplied
4/4tools: ynl: ethtool testing tooltools/net/ynl/ethtool tools/net/ynl/lib/nlspec.py tools/net/ynl/lib/ynl.py+444 -00 repliesApplied

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH net-next v3 0/4] tools: ynl: fill in some gaps of ethtool spec

I was trying to fill in the spec while exploring ethtool API for some related work. I don't think I'll have the patience to fill in the rest, so decided to share whatever I currently have.

Patches 1-2 add the be16 + spec.
Patches 3-4 implement an ethtool-like python tool to test the spec.

Patches 3-4 are there because it felt more fun do the tool instead of writing the actual tests; feel free to drop it; sharing mostly to show that the spec is not a complete nonsense.

The spec is not 100% complete, see patch 2 for what's missing. I was hoping to finish the stats-get message, but I'm too dump to implement bitmask marshaling (multi-attr).

Note, this is on top of net-next plus the following patch:
[PATCH net-next v4] tools: ynl: Add missing types to encode/decode

v3:
- reindent ethtool to 4 spaces
- byte_order=None to keep existing callers as is
- byte_order to SpecAttr

v2:
- be16 -> byte-order
- remove header in ethtool, not the lib
- NlError two spaces after
- s/_/-/ in ethtool spec
- add missing - for s32-array
- remove "value: 13" hard-code for features-ntf (empty reply instead)
- updated output of the sample run in the last patch (I was actually using real ethtool, lol)

Stanislav Fomichev (4):
tools: ynl: support byte-order in cli
tools: ynl: populate most of the ethtool spec
tools: ynl: replace print with NlError
tools: ynl: ethtool testing tool

 Documentation/netlink/specs/ethtool.yaml | 1480 ++++++++++++++++++++--
 tools/net/ynl/ethtool                    |  424 +++++++
 tools/net/ynl/lib/nlspec.py              |   10 +
 tools/net/ynl/lib/ynl.py                 |   58 +-
 4 files changed, 1844 insertions(+), 128 deletions(-)
 create mode 100755 tools/net/ynl/ethtool
Signature · 1 line
2.40.0.348.gf938b09366-goog