public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stanislav Fomichev <sdf@google•com>
To: netdev@vger•kernel.org
Cc: davem@davemloft•net, edumazet@google•com, kuba@kernel•org,
	pabeni@redhat•com, Stanislav Fomichev <sdf@google•com>
Subject: [PATCH net-next v3 0/4] tools: ynl: fill in some gaps of ethtool spec
Date: Wed, 29 Mar 2023 15:16:51 -0700	[thread overview]
Message-ID: <20230329221655.708489-1-sdf@google.com> (raw)

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

-- 
2.40.0.348.gf938b09366-goog


             reply	other threads:[~2023-03-29 22:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 22:16 Stanislav Fomichev [this message]
2023-03-29 22:16 ` [PATCH net-next v3 1/4] tools: ynl: support byte-order in cli Stanislav Fomichev
2023-03-29 22:16 ` [PATCH net-next v3 2/4] tools: ynl: populate most of the ethtool spec Stanislav Fomichev
2023-03-29 22:16 ` [PATCH net-next v3 3/4] tools: ynl: replace print with NlError Stanislav Fomichev
2023-03-29 22:16 ` [PATCH net-next v3 4/4] tools: ynl: ethtool testing tool Stanislav Fomichev
2023-03-31  6:40 ` [PATCH net-next v3 0/4] tools: ynl: fill in some gaps of ethtool spec patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230329221655.708489-1-sdf@google.com \
    --to=sdf@google$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox