Skip to content

mptcp: convert netlink code to use YAML spec

Davide Caratti mptcp 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 2 repliesIn review
  2. v36 patches 5 repliesSuperseded
  3. v26 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches5 repliesSuperseded

Changes in v4 from the cover letter

- removed unwanted whitespaces, update MAINTAINERS (Matthieu Baerts)

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6tools: ynl: add uns-admin-perm to genetlink legacyDocumentation/netlink/genetlink-legacy.yaml+1 -10 replies
2/6net: mptcp: convert netlink from small_ops to opsinclude/uapi/linux/mptcp.h net/mptcp/pm_netlink.c+135 -640 replies
3/6Documentation: netlink: add a YAML spec for mptcpDocumentation/netlink/specs/mptcp.yaml MAINTAINERS+395 -00 replies
4/6uapi: mptcp: use header file generated from YAML specMAINTAINERS include/uapi/linux/mptcp.h include/uapi/linux/mptcp_pm.h+160 -1730 replies
5/6net: mptcp: rename netlink handlers to mptcp_pm_nl_<blah>_{doit,dumpit}net/mptcp/pm_netlink.c net/mptcp/pm_userspace.c net/mptcp/protocol.h+32 -320 replies
6/6net: mptcp: use policy generated by YAML specnet/mptcp/Makefile net/mptcp/mptcp_pm_gen.c net/mptcp/mptcp_pm_gen.h +2 more+250 -1611 reply

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchPaolo Abeni
1/6A-b
2/6A-b
3/6A-b
4/6A-b
5/6A-b
6/6A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH mptcp-next v4 0/6] mptcp: convert netlink code to use YAML spec

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 \
Quoted 2 lines

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}]

v4:
- removed unwanted whitespaces, update MAINTAINERS (Matthieu Baerts)

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 ++++++++++++++++++++
 MAINTAINERS                                 |   3 +-
 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 +-
 11 files changed, 816 insertions(+), 274 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
Signature · 1 line
2.41.0