All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-next v3 0/6] mptcp: convert netlink code to use YAML spec
@ 2023-09-05 13:53 Davide Caratti
  2023-09-05 13:53 ` [PATCH mptcp-next v3 1/6] tools: ynl: add uns-admin-perm to genetlink legacy Davide Caratti
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Davide Caratti @ 2023-09-05 13:53 UTC (permalink / raw)
  To: mptcp; +Cc: pabeni, Matthieu Baerts

this series converts most of the MPTCP netlink interface (plus uAPI bits)
to use sources generated by a YAML spec file. Patch 2/6 and 6/6 have been
individually verified with kselftests.

POC:

 $ sudo  ./tools/net/ynl/cli.py  --spec \
 > Documentation/netlink/specs/mptcp.yaml --do add_addr \
 > --json '{"addr": {"addr4": 16909061, "family": 2, "flags": 4, "id": 10, "port": 0}}'

 $ ip -j mptcp endpoint show id 10
 [{"address":"1.2.3.5","id":10,"backup":true}]

v3:
- add missing 'static' keyword (MPTCP CI)
- fix element ordering for 'attr' attributes in patch 2,
  mptcp spec and generated C code (Paolo Abeni)
- removed extra newline, deuglified subjects in patch 2 and 4

v2:
- mptcp.yaml: only put values around enum "holes" (Paolo Abeni)
-  _doit and _dumpit renames are done in a dedicate patch (Paolo Abeni)
- removed useless nla_policy passed through parse_entry()  (Paolo Abeni)
- renamed mptcp_pm_address_nl_policy in patch 2 (Paolo Abeni)
- (hopefully) more comprehensible commit messages (Paolo Abeni)

Davide Caratti (6):
  tools: ynl: add uns-admin-perm to genetlink legacy
  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-legacy.yaml |   2 +-
 Documentation/netlink/specs/mptcp.yaml      | 394 ++++++++++++++++++++
 include/uapi/linux/mptcp.h                  | 174 +--------
 include/uapi/linux/mptcp_pm.h               | 149 ++++++++
 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 +-
 10 files changed, 814 insertions(+), 273 deletions(-)
 create mode 100644 Documentation/netlink/specs/mptcp.yaml
 create mode 100644 include/uapi/linux/mptcp_pm.h
 create mode 100644 net/mptcp/mptcp_pm_gen.c
 create mode 100644 net/mptcp/mptcp_pm_gen.h

-- 
2.40.1


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

end of thread, other threads:[~2023-09-18  8:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-05 13:53 [PATCH mptcp-next v3 0/6] mptcp: convert netlink code to use YAML spec Davide Caratti
2023-09-05 13:53 ` [PATCH mptcp-next v3 1/6] tools: ynl: add uns-admin-perm to genetlink legacy Davide Caratti
2023-09-05 13:53 ` [PATCH mptcp-next v3 2/6] net: mptcp: convert netlink from small_ops to ops Davide Caratti
2023-09-05 13:53 ` [PATCH mptcp-next v3 3/6] Documentation: netlink: add a YAML spec for mptcp Davide Caratti
2023-09-05 13:53 ` [PATCH mptcp-next v3 4/6] uapi: mptcp: use header file generated from YAML spec Davide Caratti
2023-09-05 13:53 ` [PATCH mptcp-next v3 5/6] net: mptcp: rename netlink handlers to mptcp_pm_nl_<blah>_{doit,dumpit} Davide Caratti
2023-09-05 13:53 ` [PATCH mptcp-next v3 6/6] net: mptcp: use policy generated by YAML spec Davide Caratti
2023-09-05 15:46   ` net: mptcp: use policy generated by YAML spec: Tests Results MPTCP CI
2023-09-13  6:39 ` [PATCH mptcp-next v3 0/6] mptcp: convert netlink code to use YAML spec Paolo Abeni
2023-09-16 11:14 ` Matthieu Baerts
2023-09-18  8:07   ` Davide Caratti
2023-09-18  8:50     ` Matthieu Baerts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.