netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/4] tools: ynl: fill in some gaps of ethtool spec
@ 2023-03-24 22:56 Stanislav Fomichev
  2023-03-24 22:56 ` [PATCH net-next v2 1/4] tools: ynl: support byte-order in cli Stanislav Fomichev
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Stanislav Fomichev @ 2023-03-24 22:56 UTC (permalink / raw)
  To: netdev; +Cc: davem, edumazet, kuba, pabeni, Stanislav Fomichev

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

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 | 1476 ++++++++++++++++++++--
 tools/net/ynl/ethtool                    |  424 +++++++
 tools/net/ynl/lib/nlspec.py              |    9 +
 tools/net/ynl/lib/ynl.py                 |   70 +-
 4 files changed, 1847 insertions(+), 132 deletions(-)
 create mode 100755 tools/net/ynl/ethtool

-- 
2.40.0.348.gf938b09366-goog


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-03-29  0:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-24 22:56 [PATCH net-next v2 0/4] tools: ynl: fill in some gaps of ethtool spec Stanislav Fomichev
2023-03-24 22:56 ` [PATCH net-next v2 1/4] tools: ynl: support byte-order in cli Stanislav Fomichev
2023-03-25  3:33   ` Jakub Kicinski
2023-03-29  0:07     ` Stanislav Fomichev
2023-03-24 22:56 ` [PATCH net-next v2 2/4] tools: ynl: populate most of the ethtool spec Stanislav Fomichev
2023-03-24 22:56 ` [PATCH net-next v2 3/4] tools: ynl: replace print with NlError Stanislav Fomichev
2023-03-24 22:56 ` [PATCH net-next v2 4/4] tools: ynl: ethtool testing tool Stanislav Fomichev
2023-03-25  3:35   ` Jakub Kicinski
2023-03-29  0:06     ` Stanislav Fomichev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).