netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v1 0/3] tools/net/ynl: Add support for netlink-raw families
@ 2023-07-25 16:22 Donald Hunter
  2023-07-25 16:22 ` [PATCH net-next v1 1/3] doc/netlink: Add a schema " Donald Hunter
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Donald Hunter @ 2023-07-25 16:22 UTC (permalink / raw)
  To: netdev, Jakub Kicinski, David S. Miller, Eric Dumazet,
	Paolo Abeni
  Cc: donald.hunter, Donald Hunter

This patchset adds support for netlink-raw families such as rtnetlink.

The first patch contains the schema definition.
The second patch extends ynl to support netlink-raw
The third patch adds rtnetlink addr and route message types

The second patch depends on "tools: ynl-gen: fix parse multi-attr enum
attribute":

https://patchwork.kernel.org/project/netdevbpf/list/?series=769229

The netlink-raw schema is very similar to genetlink-legacy and I thought
about making the changes there and symlinking to it. On balance I
thought that might be problematic for accurate schema validation.

rtnetlink doesn't seem to fit into unified or directional message
enumeration models. It seems like an 'explicit' model would be useful,
to require the schema author to specify the message ids directly. The
patch supports commands and it supports notifications, but it's
currently hard to support both simultaneously from the same netlink-raw
spec. I plan to work on this in a future patchset.

There is not yet support for notifications because ynl currently doesn't
support defining 'event' properties on a 'do' operation. I plan to work
on this in a future patch.

The link message types are a work in progress that I plan to submit in a
future patchset. Links contain different nested attributes dependent on
the type of link. Decoding these will need some kind of attr-space
selection based on the value of another attribute in the message.

Donald Hunter (3):
  doc/netlink: Add a schema for netlink-raw families
  tools/net/ynl: Add support for netlink-raw families
  doc/netlink: Add specs for addr and route rtnetlink message types

 Documentation/netlink/netlink-raw.yaml    | 414 ++++++++++++++++++++++
 Documentation/netlink/specs/rt_addr.yaml  | 179 ++++++++++
 Documentation/netlink/specs/rt_route.yaml | 192 ++++++++++
 tools/net/ynl/lib/nlspec.py               |  25 ++
 tools/net/ynl/lib/ynl.py                  | 185 +++++++---
 5 files changed, 941 insertions(+), 54 deletions(-)
 create mode 100644 Documentation/netlink/netlink-raw.yaml
 create mode 100644 Documentation/netlink/specs/rt_addr.yaml
 create mode 100644 Documentation/netlink/specs/rt_route.yaml

-- 
2.41.0


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

end of thread, other threads:[~2023-07-26 22:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-25 16:22 [PATCH net-next v1 0/3] tools/net/ynl: Add support for netlink-raw families Donald Hunter
2023-07-25 16:22 ` [PATCH net-next v1 1/3] doc/netlink: Add a schema " Donald Hunter
2023-07-26 21:09   ` Jakub Kicinski
2023-07-26 21:48     ` Donald Hunter
2023-07-26 22:03       ` Jakub Kicinski
2023-07-25 16:22 ` [PATCH net-next v1 2/3] tools/net/ynl: Add support " Donald Hunter
2023-07-26 21:37   ` Jakub Kicinski
2023-07-26 22:01     ` Donald Hunter
2023-07-26 22:23       ` Jakub Kicinski
2023-07-25 16:22 ` [PATCH net-next v1 3/3] doc/netlink: Add specs for addr and route rtnetlink message types Donald Hunter
2023-07-26  4:16 ` [PATCH net-next v1 0/3] tools/net/ynl: Add support for netlink-raw families Jakub Kicinski
2023-07-26 12:38 ` Simon Horman
2023-07-26 13:06   ` Donald Hunter
2023-07-26 13:16     ` Simon Horman
2023-07-26 15:55       ` Jakub Kicinski
2023-07-26 16:09         ` 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).