[PATCH net-next v2 0/7] mptcp: convert Netlink code to use YAML spec

Mat Martineau posted 7 patches 6 months ago
Failed in applying to current master (apply log)
Documentation/netlink/genetlink-c.yaml      |   3 +
Documentation/netlink/genetlink-legacy.yaml |   5 +-
Documentation/netlink/genetlink.yaml        |   3 +
Documentation/netlink/netlink-raw.yaml      |   3 +
Documentation/netlink/specs/mptcp.yaml      | 391 ++++++++++++++++++++++++++++
MAINTAINERS                                 |   3 +-
include/uapi/linux/mptcp.h                  | 174 +------------
include/uapi/linux/mptcp_pm.h               | 150 +++++++++++
net/mptcp/Makefile                          |   3 +-
net/mptcp/mptcp_pm_gen.c                    | 179 +++++++++++++
net/mptcp/mptcp_pm_gen.h                    |  58 +++++
net/mptcp/pm_netlink.c                      | 114 ++------
net/mptcp/pm_userspace.c                    |   8 +-
net/mptcp/protocol.h                        |   6 +-
tools/net/ynl/ynl-gen-c.py                  |  28 +-
15 files changed, 843 insertions(+), 285 deletions(-)
[PATCH net-next v2 0/7] mptcp: convert Netlink code to use YAML spec
Posted by Mat Martineau 6 months ago
This series from Davide converts most of the MPTCP Netlink interface
(plus uAPI bits) to use sources generated by YNL using a YAML spec file.

This new YAML file is useful to validate the API and to generate a good
documentation page.

Patch 1 modifies YNL spec to support "uns-admin-perm" for genetlink
legacy.

Patch 2 adds support for validating exact length of netlink attrs.

Patch 3 converts Netlink structures from small_ops to ops to prepare the
switch to YAML.

Patch 4 adds the Netlink YAML spec for MPTCP.

Patch 5 adds and uses a new header file generated from the new YAML
spec.

Patch 6 renames some handlers to match the ones generated from the YAML
spec.

Patch 7 adds and uses Netlink policies automatically generated from the
YAML spec.

v2 changes:
 - de-uglify YAML spec file, replacing '_' with '-' and avoiding
   unnecessary assignments in enums (Jakub Kicinski)
 - keep validating addr6 with NLA_POLICY_EXACT_LEN() (Jakub Kicinski)
 - Don't leave MPTCP_EVENT_UNSPEC undocumented (Simon Horman)

Signed-off-by: Mat Martineau <martineau@kernel.org>
---
Davide Caratti (7):
      tools: ynl: add uns-admin-perm to genetlink legacy
      tools: ynl-gen: add support for exact-len validation
      net: mptcp: convert netlink from small_ops to ops
      Documentation: netlink: add a YAML spec for mptcp
      uapi: mptcp: use header file generated from YAML spec
      net: mptcp: rename netlink handlers to mptcp_pm_nl_<blah>_{doit,dumpit}
      net: mptcp: use policy generated by YAML spec

 Documentation/netlink/genetlink-c.yaml      |   3 +
 Documentation/netlink/genetlink-legacy.yaml |   5 +-
 Documentation/netlink/genetlink.yaml        |   3 +
 Documentation/netlink/netlink-raw.yaml      |   3 +
 Documentation/netlink/specs/mptcp.yaml      | 391 ++++++++++++++++++++++++++++
 MAINTAINERS                                 |   3 +-
 include/uapi/linux/mptcp.h                  | 174 +------------
 include/uapi/linux/mptcp_pm.h               | 150 +++++++++++
 net/mptcp/Makefile                          |   3 +-
 net/mptcp/mptcp_pm_gen.c                    | 179 +++++++++++++
 net/mptcp/mptcp_pm_gen.h                    |  58 +++++
 net/mptcp/pm_netlink.c                      | 114 ++------
 net/mptcp/pm_userspace.c                    |   8 +-
 net/mptcp/protocol.h                        |   6 +-
 tools/net/ynl/ynl-gen-c.py                  |  28 +-
 15 files changed, 843 insertions(+), 285 deletions(-)
---
base-commit: 6e7ce2d71bb99096d811918341fde61e66bfff2c
change-id: 20231023-send-net-next-20231023-1-a23b6288959c

Best regards,
-- 
Mat Martineau <martineau@kernel.org>