Skip to content

RFC dd locking to PM APis, implement PM netlink

Paolo Abeni mptcp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Squash-to: "mptcp: Add ADD_ADDR handling"net/mptcp/options.c net/mptcp/protocol.h+0 -60 replies
2/6Squash-to: "mptcp: Add path manager interface"net/mptcp/options.c net/mptcp/pm.c net/mptcp/protocol.c +1 more+117 -1352 replies
3/6Squash-to: "mptcp: Add handling of incoming MP_JOIN requests"net/mptcp/options.c net/mptcp/subflow.c+9 -30 replies
4/6Squash-to: "mptcp: Add handling of outgoing MP_JOIN requests"net/mptcp/options.c net/mptcp/protocol.h net/mptcp/subflow.c+47 -190 replies
5/6Squash-to: "mptcp: Implement path manager interface commands"net/mptcp/pm.c+107 -1063 replies
6/6mptcp: add netlink based PMinclude/uapi/linux/mptcp.h net/mptcp/Makefile net/mptcp/pm.c +2 more+592 -23 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [MPTCP] [RFC PATCH 0/6] dd locking to PM APis, implement PM netlink

Sending as an early RFC to gather feedback, as this is proving to be more intrusive that what I initially hoped for.

This implement the locking required by the PM to allow concurent subflow accessing the msk PM data in a safe way. Such data is protected via a msk-level spinlock. It relies on the Double checked locking to avoid contention in the most common scenarion (no or very little PM "actions").

Overall the above adds quite a bit of code churn, is that a too premature optimization? On the flip side, the whole PM processing should be quite light on the CPU in most cases.

Additionally changes more than a bit the PM hooks/APIs, to be hopefully simpler and avoiding duplicate code (no v4/v6 variant, work queue management done by the core PM infra).

It also introduce the PM netlink - should replace the current basic ones. Completely untested but please have a look at the specified netlink uAPI.

TODO:
- implement U/S helper
- self-tests
- do we need NL dump operation to inspect the PM netlink status?

 include/uapi/linux/mptcp.h |   42 +++
 net/mptcp/Makefile         |    3 
 net/mptcp/options.c        |   59 ++---
 net/mptcp/pm.c             |  340 +++++++++++++----------------
 net/mptcp/pm_netlink.c     |  524 +++++++++++++++++++++++++++++++++++++++++++++
 net/mptcp/protocol.c       |    2 
 net/mptcp/protocol.h       |  110 +++++----
 net/mptcp/subflow.c        |   63 +++--
 8 files changed, 872 insertions(+), 271 deletions(-)