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

Mat Martineau posted 6 patches 2 years, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20211006235953.212243-1-mathew.j.martineau@linux.intel.com
Maintainers: Mat Martineau <mathew.j.martineau@linux.intel.com>, Jonathan Corbet <corbet@lwn.net>, Matthieu Baerts <matthieu.baerts@tessares.net>, Jakub Kicinski <kuba@kernel.org>, "David S. Miller" <davem@davemloft.net>
There is a newer version of this series
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(-)
[RFC PATCH 0/6] mptcp: Add userspace PM mode to bypass kernel PM
Posted by Mat Martineau 2 years, 6 months ago
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(-)

-- 
2.33.0