netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/13] tools: ynl: c: basic netlink-raw support
@ 2025-04-09  0:03 Jakub Kicinski
  2025-04-09  0:03 ` [PATCH net-next 01/13] netlink: specs: rename rtnetlink specs in accordance with family name Jakub Kicinski
                   ` (12 more replies)
  0 siblings, 13 replies; 45+ messages in thread
From: Jakub Kicinski @ 2025-04-09  0:03 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, donald.hunter,
	jacob.e.keller, yuyanghuang, sdf, gnault, nicolas.dichtel, petrm,
	Jakub Kicinski

Basic support for netlink-raw AKA classic netlink in user space C codegen.
This series is enough to read routes and addresses from the kernel
(see the samples in patches 12 and 13).

Specs need to be slightly adjusted and decorated with the c naming info.

In terms of codegen this series includes just the basic plumbing required
to skip genlmsghdr and handle request types which may technically also
be legal in genetlink-legacy but are very uncommon there.

Subsequent series will add support for:
 - handling CRUD-style notifications
 - code gen for array types classic netlink uses
 - sub-message support

Jakub Kicinski (13):
  netlink: specs: rename rtnetlink specs in accordance with family name
  netlink: specs: rt-route: specify fixed-header at operations level
  netlink: specs: rt-addr: remove the fixed members from attrs
  netlink: specs: rt-route: remove the fixed members from attrs
  netlink: specs: rt-addr: add C naming info
  netlink: specs: rt-route: add C naming info
  tools: ynl: support creating non-genl sockets
  tools: ynl-gen: don't consider requests with fixed hdr empty
  tools: ynl: don't use genlmsghdr in classic netlink
  tools: ynl-gen: consider dump ops without a do "type-consistent"
  tools: ynl-gen: use family c-name in notifications
  tools: ynl: generate code for rt-addr and add a sample
  tools: ynl: generate code for rt-route and add a sample

 .../specs/{rt_addr.yaml => rt-addr.yaml}      | 24 ++----
 .../specs/{rt_link.yaml => rt-link.yaml}      |  0
 .../specs/{rt_neigh.yaml => rt-neigh.yaml}    |  0
 .../specs/{rt_route.yaml => rt-route.yaml}    | 22 ++---
 .../specs/{rt_rule.yaml => rt-rule.yaml}      |  0
 .../userspace-api/netlink/netlink-raw.rst     |  2 +-
 tools/net/ynl/Makefile.deps                   |  2 +
 tools/net/ynl/generated/Makefile              |  2 +-
 tools/net/ynl/lib/ynl-priv.h                  |  3 +
 tools/net/ynl/lib/ynl.h                       |  3 +
 tools/net/ynl/lib/ynl.c                       | 59 +++++++++-----
 tools/net/ynl/samples/rt-addr.c               | 80 +++++++++++++++++++
 tools/net/ynl/samples/rt-route.c              | 80 +++++++++++++++++++
 tools/net/ynl/pyynl/ynl_gen_c.py              | 55 +++++++++----
 tools/net/ynl/samples/.gitignore              |  4 +-
 tools/testing/selftests/net/lib/py/ynl.py     |  4 +-
 16 files changed, 263 insertions(+), 77 deletions(-)
 rename Documentation/netlink/specs/{rt_addr.yaml => rt-addr.yaml} (89%)
 rename Documentation/netlink/specs/{rt_link.yaml => rt-link.yaml} (100%)
 rename Documentation/netlink/specs/{rt_neigh.yaml => rt-neigh.yaml} (100%)
 rename Documentation/netlink/specs/{rt_route.yaml => rt-route.yaml} (93%)
 rename Documentation/netlink/specs/{rt_rule.yaml => rt-rule.yaml} (100%)
 create mode 100644 tools/net/ynl/samples/rt-addr.c
 create mode 100644 tools/net/ynl/samples/rt-route.c

-- 
2.49.0


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

end of thread, other threads:[~2025-04-09 21:59 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09  0:03 [PATCH net-next 00/13] tools: ynl: c: basic netlink-raw support Jakub Kicinski
2025-04-09  0:03 ` [PATCH net-next 01/13] netlink: specs: rename rtnetlink specs in accordance with family name Jakub Kicinski
2025-04-09  4:49   ` Jacob Keller
2025-04-09 12:15     ` Donald Hunter
2025-04-09 14:15       ` Jakub Kicinski
2025-04-09 14:36         ` Donald Hunter
2025-04-09  0:03 ` [PATCH net-next 02/13] netlink: specs: rt-route: specify fixed-header at operations level Jakub Kicinski
2025-04-09  4:50   ` Jacob Keller
2025-04-09 12:16   ` Donald Hunter
2025-04-09  0:03 ` [PATCH net-next 03/13] netlink: specs: rt-addr: remove the fixed members from attrs Jakub Kicinski
2025-04-09  4:53   ` Jacob Keller
2025-04-09  4:58     ` Jacob Keller
2025-04-09 12:19   ` Donald Hunter
2025-04-09  0:03 ` [PATCH net-next 04/13] netlink: specs: rt-route: " Jakub Kicinski
2025-04-09  4:58   ` Jacob Keller
2025-04-09 12:20   ` Donald Hunter
2025-04-09  0:03 ` [PATCH net-next 05/13] netlink: specs: rt-addr: add C naming info Jakub Kicinski
2025-04-09  4:54   ` Jacob Keller
2025-04-09 12:21   ` Donald Hunter
2025-04-09  0:03 ` [PATCH net-next 06/13] netlink: specs: rt-route: " Jakub Kicinski
2025-04-09  4:54   ` Jacob Keller
2025-04-09 12:21   ` Donald Hunter
2025-04-09  0:03 ` [PATCH net-next 07/13] tools: ynl: support creating non-genl sockets Jakub Kicinski
2025-04-09  4:56   ` Jacob Keller
2025-04-09 12:25   ` Donald Hunter
2025-04-09  0:03 ` [PATCH net-next 08/13] tools: ynl-gen: don't consider requests with fixed hdr empty Jakub Kicinski
2025-04-09  4:57   ` Jacob Keller
2025-04-09  0:03 ` [PATCH net-next 09/13] tools: ynl: don't use genlmsghdr in classic netlink Jakub Kicinski
2025-04-09  4:59   ` Jacob Keller
2025-04-09 12:26   ` Donald Hunter
2025-04-09  0:03 ` [PATCH net-next 10/13] tools: ynl-gen: consider dump ops without a do "type-consistent" Jakub Kicinski
2025-04-09  5:01   ` Jacob Keller
2025-04-09 12:38   ` Donald Hunter
2025-04-09 13:52     ` Jakub Kicinski
2025-04-09 21:58       ` Jacob Keller
2025-04-09  0:03 ` [PATCH net-next 11/13] tools: ynl-gen: use family c-name in notifications Jakub Kicinski
2025-04-09  5:01   ` Jacob Keller
2025-04-09 12:38   ` Donald Hunter
2025-04-09  0:03 ` [PATCH net-next 12/13] tools: ynl: generate code for rt-addr and add a sample Jakub Kicinski
2025-04-09  5:04   ` Jacob Keller
2025-04-09 15:01     ` Jakub Kicinski
2025-04-09 12:50   ` Donald Hunter
2025-04-09  0:04 ` [PATCH net-next 13/13] tools: ynl: generate code for rt-route " Jakub Kicinski
2025-04-09  5:05   ` Jacob Keller
2025-04-09 12:49   ` Donald Hunter

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