Skip to content

RFC mptcp: Add userspace PM mode to bypass kernel PM

Mat Martineau mptcp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6mptcp: Add a member to mptcp_pm_data to track kernel vs userspace modenet/mptcp/pm.c net/mptcp/protocol.h+2 -00 replies
2/6mptcp: Bypass kernel PM when userspace PM is enablednet/mptcp/pm.c+11 -20 replies
3/6mptcp: Make kernel path manager check for userspace-managed socketsnet/mptcp/pm_netlink.c+13 -60 replies
4/6mptcp: Add a per-namespace sysctl to set the default path manager typeDocumentation/networking/mptcp-sysctl.rst net/mptcp/ctrl.c net/mptcp/pm.c +1 more+37 -12 replies
5/6DO-NOT-MERGE: debug: mptcp: Warn on use of in-kernel PM functionsnet/mptcp/pm_netlink.c+6 -00 replies
6/6DO-NOT-MERGE: debug: mptcp: Warn on unexpected events when userspace PM is activenet/mptcp/pm_netlink.c+40 -50 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC PATCH 0/6] mptcp: Add userspace PM mode to bypass kernel PM

One part of supporting userspace path managers is to prevent the in-kernel PM from acting on userspace-managed MPTCP connections.

These patches:

* Add a per-MPTCP-socket 'userspace' bool to track which PM type is in use for that socket. A mix of kernel-managed and userspace-managed connections are supported within each namespace.

* Conditionally decouple incoming ADD_ADDR/RM_ADDR and subflow changes from the in-kernel PM. Netlink events are still triggered.

* Add a sysctl for setting the per-namespace default for in-kernel vs userspace path management of new MPTCP sockets. This might be better handled with a new netlink command to get/set the default, but I've included this commit so we can discuss the best approach!

* Some debug code to confirm that the in-kernel PM is not interfering with userspace-managed sockets. Some of these warnings (perhaps changed to debug messages?) may be good to permanently include, but are labeled "DO-NOT-MERGE" for now.

I've confirmed that mptcp_join.sh selftests fail as they should with the in-kernel PM disconnected, but do not run into the warnings I added. These are RFC patches so testing continues.

Kishen has some netlink command patches to follow. We're also working on mptcpd changes (https://github.com/intel/mptcpd/pull/156) to interact with the upstream kernel, but still have to resolve some differences relative to the multipath-tcp.org implementation of the netlink commands.

Mat Martineau (6):
mptcp: Add a member to mptcp_pm_data to track kernel vs userspace mode
mptcp: Bypass kernel PM when userspace PM is enabled
mptcp: Make kernel path manager check for userspace-managed sockets
mptcp: Add a per-namespace sysctl to set the default path manager type
DO-NOT-MERGE: debug: mptcp: Warn on use of in-kernel PM functions
DO-NOT-MERGE: debug: mptcp: Warn on unexpected events when userspace
PM is active

 Documentation/networking/mptcp-sysctl.rst | 17 ++++++
 net/mptcp/ctrl.c                          | 16 ++++++
 net/mptcp/pm.c                            | 16 +++++-
 net/mptcp/pm_netlink.c                    | 70 +++++++++++++++++++----
 net/mptcp/protocol.h                      |  2 +
 5 files changed, 108 insertions(+), 13 deletions(-)
Signature · 1 line
2.33.0