Skip to content

RFC mptcp: fallback socket cleanup

Paolo Abeni mptcp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5mptcp: clear 'is_tcp' socket flag when the MP_CAPABLE handshake failsnet/mptcp/options.c net/mptcp/subflow.c+5 -00 replies
2/5mptcp: pass subflow to mptcp_finish_connect()net/mptcp/protocol.c net/mptcp/protocol.h net/mptcp/subflow.c+6 -70 replies
3/5mptcp: cleanup fallback handlingnet/mptcp/protocol.c+123 -690 replies
4/5mptcp: remove 'fallback' fieldnet/mptcp/protocol.c net/mptcp/protocol.h+17 -190 replies
5/5mptcp: avoid acquiring the msk lock in mptcp_finisch_connect()net/mptcp/protocol.c+75 -1062 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/5] mptcp: fallback socket cleanup

This is a quite early RFC to acquire as early feedback as possible. I did self-tests a few times on 3/5 and on patch 5/5 without failure, but likely some bugs are still present.

The first 3 patches in this series:
- clarify and cleanup the TCP fallback handling
- fixes setsockopt()/getsockopt() for connected/unbound sockets

The last 2 patches do more aggressive/invasive cleanup:
- drop the 'fallback' field so that we always use the conn_list
- drop the nested socket in mptcp_finish_connect()
- remove the lock/lookup/get/unlock dance in most case (due the the above)

After all the above, performance for connection fallen back to plain TCP should be almost the same of TCP connection on unpacked kernel.

Addittionally 'nc' and 'netperf' now run successfully when forced to MPTCP. The latter still report a non fatal error at connection closing time as it performs:

getsockopt(4, SOL_TCP, TCP_MAXSEG, //...);
getsockopt(4, SOL_TCP, TCP_INFO, //...);

which is still unsupported after that the mp capable handshake is started.

For the records on the debug build I'm using netperf scores better result with MPTCP that with plain TCP ;) [agreed, completely irrelevant, still nice]

The series applies at selftests and is unsquashed - will require quite a bit of work there and more work to rebase/adjust the patches after kselftest. I'll start that after the pending patches are in.

_Any_ feedback _very_ welcome!

Paolo Abeni (5):
mptcp: clear 'is_tcp' socket flag when the MP_CAPABLE handshake fails
mptcp: pass subflow to mptcp_finish_connect()
mptcp: cleanup fallback handling
mptcp: remove 'fallback' field
mptcp: avoid acquiring the msk lock in mptcp_finisch_connect()

 net/mptcp/options.c  |   3 +
 net/mptcp/protocol.c | 342 +++++++++++++++++++++++--------------------
 net/mptcp/protocol.h |   4 +-
 net/mptcp/subflow.c  |   4 +-
 4 files changed, 189 insertions(+), 164 deletions(-)
Signature · 1 line
2.21.0