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