netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 00/10] tools/net/ynl: Add support for netlink-raw families
@ 2023-08-15 19:42 Donald Hunter
  2023-08-15 19:42 ` [PATCH net-next v2 01/10] doc/netlink: Add a schema " Donald Hunter
                   ` (9 more replies)
  0 siblings, 10 replies; 29+ messages in thread
From: Donald Hunter @ 2023-08-15 19:42 UTC (permalink / raw)
  To: netdev, Jakub Kicinski, David S. Miller, Eric Dumazet,
	Paolo Abeni, Jonathan Corbet, linux-doc, Stanislav Fomichev,
	Arkadiusz Kubalewski
  Cc: donald.hunter, Donald Hunter

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

Patch 1 contains the schema definition
Patches 2 & 3 update the schema documentation
Patches 4 - 7 extends ynl
Patches 8 - 10 add several netlink-raw specs

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 force the schema author to specify the message ids directly.

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

The link and route messages contain different nested attributes
dependent on the type of link or route. Decoding these will need some
kind of attr-space selection that uses the value of another attribute as
the selector key. These nested attributes have been left with type
'binary' for now.

v1 -> v2:
  - Put mcast-group changes in separate patch
  - Put decode_fixed_header refactoring in separate patch
  - Avoid refactoring decode_enum
  - Rename NetlinkProtocolFamily -> NetlinkProtocol and
    GenlProtocolFamily -> GenlProtocol and store in self.nlproto
  - Add spec for rt link.

Donald Hunter (10):
  doc/netlink: Add a schema for netlink-raw families
  doc/netlink: Document the genetlink-legacy schema extensions
  doc/netlink: Document the netlink-raw schema extensions
  tools/ynl: Add mcast-group schema parsing to ynl
  tools/net/ynl: Refactor decode_fixed_header into NlMsg
  tools/net/ynl: Add support for netlink-raw families
  tools/net/ynl: Implement nlattr array-nest decoding in ynl
  doc/netlink: Add spec for rt addr messages
  doc/netlink: Add spec for rt link messages
  doc/netlink: Add spec for rt route messages

 Documentation/netlink/netlink-raw.yaml        |  414 +++++
 Documentation/netlink/specs/rt_addr.yaml      |  179 +++
 Documentation/netlink/specs/rt_link.yaml      | 1374 +++++++++++++++++
 Documentation/netlink/specs/rt_route.yaml     |  288 ++++
 Documentation/userspace-api/netlink/intro.rst |    2 +
 Documentation/userspace-api/netlink/specs.rst |   64 +
 tools/net/ynl/lib/nlspec.py                   |   26 +
 tools/net/ynl/lib/ynl.py                      |  153 +-
 8 files changed, 2461 insertions(+), 39 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_link.yaml
 create mode 100644 Documentation/netlink/specs/rt_route.yaml

-- 
2.41.0


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

end of thread, other threads:[~2023-08-21 14:03 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-15 19:42 [PATCH net-next v2 00/10] tools/net/ynl: Add support for netlink-raw families Donald Hunter
2023-08-15 19:42 ` [PATCH net-next v2 01/10] doc/netlink: Add a schema " Donald Hunter
2023-08-16  8:41   ` Simon Horman
2023-08-16 13:19     ` Donald Hunter
2023-08-15 19:42 ` [PATCH net-next v2 02/10] doc/netlink: Document the genetlink-legacy schema extensions Donald Hunter
2023-08-16  2:49   ` Jakub Kicinski
2023-08-16  8:25     ` Donald Hunter
2023-08-16 13:16       ` Donald Hunter
2023-08-16 15:00         ` Jakub Kicinski
2023-08-15 19:42 ` [PATCH net-next v2 03/10] doc/netlink: Document the netlink-raw " Donald Hunter
2023-08-16  2:52   ` Jakub Kicinski
2023-08-16  8:32     ` Donald Hunter
2023-08-15 19:42 ` [PATCH net-next v2 04/10] tools/ynl: Add mcast-group schema parsing to ynl Donald Hunter
2023-08-16 15:12   ` Jakub Kicinski
2023-08-15 19:42 ` [PATCH net-next v2 05/10] tools/net/ynl: Refactor decode_fixed_header into NlMsg Donald Hunter
2023-08-16 15:20   ` Jakub Kicinski
2023-08-17 15:14     ` Donald Hunter
2023-08-18  1:37       ` Jakub Kicinski
2023-08-18 10:21         ` Donald Hunter
2023-08-15 19:42 ` [PATCH net-next v2 06/10] tools/net/ynl: Add support for netlink-raw families Donald Hunter
2023-08-16 15:29   ` Jakub Kicinski
2023-08-17  9:10     ` Donald Hunter
2023-08-18  1:18       ` Jakub Kicinski
2023-08-21 14:00         ` Donald Hunter
2023-08-15 19:42 ` [PATCH net-next v2 07/10] tools/net/ynl: Implement nlattr array-nest decoding in ynl Donald Hunter
2023-08-16 15:31   ` Jakub Kicinski
2023-08-15 19:42 ` [PATCH net-next v2 08/10] doc/netlink: Add spec for rt addr messages Donald Hunter
2023-08-15 19:42 ` [PATCH net-next v2 09/10] doc/netlink: Add spec for rt link messages Donald Hunter
2023-08-15 19:42 ` [PATCH net-next v2 10/10] doc/netlink: Add spec for rt route messages 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).