netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/12] tools: ynl: generate code for the ethtool family
@ 2023-06-09 21:43 Jakub Kicinski
  2023-06-09 21:43 ` [PATCH net-next 01/12] tools: ynl-gen: support excluding tricky ops Jakub Kicinski
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Jakub Kicinski @ 2023-06-09 21:43 UTC (permalink / raw)
  To: davem; +Cc: netdev, edumazet, pabeni, sdf, Jakub Kicinski

And finally ethtool support. Thanks to Stan's work the ethtool family
spec is quite complete, so there is a lot of operations to support.

I chickened out of stats-get support, they require at the very least
type-value support on a u64 scalar. Type-value is an arrangement where
a u16 attribute is encoded directly in attribute type. Code gen can
support this if the inside is a nest, we just throw in an extra
field into that nest to carry the attr type. But a little more coding
is needed to for a scalar, because first we need to turn the scalar
into a struct with one member, then we can add the attr type.

Other than that ethtool required event support (notification which
does not share contents with any GET), but the previous series
already added that to the codegen.

I haven't tested all the ops here, and a few I tried seem to work.

Jakub Kicinski (12):
  tools: ynl-gen: support excluding tricky ops
  tools: ynl-gen: record extra args for regen
  netlink: specs: support setting prefix-name per attribute
  netlink: specs: ethtool: add C render hints
  tools: ynl-gen: don't generate enum types if unnamed
  tools: ynl-gen: resolve enum vs struct name conflicts
  netlink: specs: ethtool: add empty enum stringset
  netlink: specs: ethtool: untangle UDP tunnels and cable test a bit
  netlink: specs: ethtool: untangle stats-get
  netlink: specs: ethtool: mark pads as pads
  tools: ynl: generate code for the ethtool family
  tools: ynl: add sample for ethtool

 Documentation/netlink/genetlink-c.yaml      |    4 +
 Documentation/netlink/genetlink-legacy.yaml |    4 +
 Documentation/netlink/specs/ethtool.yaml    |  120 +-
 tools/net/ynl/generated/Makefile            |    9 +-
 tools/net/ynl/generated/ethtool-user.c      | 6353 +++++++++++++++++++
 tools/net/ynl/generated/ethtool-user.h      | 5531 ++++++++++++++++
 tools/net/ynl/lib/nlspec.py                 |   12 +-
 tools/net/ynl/samples/.gitignore            |    1 +
 tools/net/ynl/samples/ethtool.c             |   65 +
 tools/net/ynl/ynl-gen-c.py                  |   59 +-
 tools/net/ynl/ynl-regen.sh                  |    4 +-
 11 files changed, 12116 insertions(+), 46 deletions(-)
 create mode 100644 tools/net/ynl/generated/ethtool-user.c
 create mode 100644 tools/net/ynl/generated/ethtool-user.h
 create mode 100644 tools/net/ynl/samples/ethtool.c

-- 
2.40.1


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

end of thread, other threads:[~2023-06-12 10:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-09 21:43 [PATCH net-next 00/12] tools: ynl: generate code for the ethtool family Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 01/12] tools: ynl-gen: support excluding tricky ops Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 02/12] tools: ynl-gen: record extra args for regen Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 03/12] netlink: specs: support setting prefix-name per attribute Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 04/12] netlink: specs: ethtool: add C render hints Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 05/12] tools: ynl-gen: don't generate enum types if unnamed Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 06/12] tools: ynl-gen: resolve enum vs struct name conflicts Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 07/12] netlink: specs: ethtool: add empty enum stringset Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 08/12] netlink: specs: ethtool: untangle UDP tunnels and cable test a bit Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 09/12] netlink: specs: ethtool: untangle stats-get Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 10/12] netlink: specs: ethtool: mark pads as pads Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 11/12] tools: ynl: generate code for the ethtool family Jakub Kicinski
2023-06-09 21:43 ` [PATCH net-next 12/12] tools: ynl: add sample for ethtool Jakub Kicinski
2023-06-09 22:12 ` [PATCH net-next 00/12] tools: ynl: generate code for the ethtool family Stanislav Fomichev
2023-06-12 10:10 ` patchwork-bot+netdevbpf

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).