Skip to content

mptcp: rx path refactor

Paolo Abeni mptcp 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 10 repliesIn review
  2. v13 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- fixed several data stream corruption and wake-up misses due to multi subflows races
- added patches 1-3 mainly to address the above
- added an additional follow-up patch (patch 7) with more cleanup

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7mptcp: prevent excessive coalescing on receivenet/mptcp/protocol.c+1 -04 replies
2/7tcp: fix recvbuffer adjust on sleeping rcvmsgnet/mptcp/protocol.c+3 -30 replies
3/7mptcp: don't always assume copied data in mptcp_cleanup_rbuf()net/mptcp/protocol.c+9 -90 replies
4/7mptcp: consolidate subflow cleanupnet/mptcp/subflow.c+18 -150 replies
5/7mptcp: move the whole rx path under msk socket lock protectionnet/mptcp/fastopen.c net/mptcp/protocol.c net/mptcp/protocol.h+61 -660 replies
6/7mptcp: cleanup mem accounting.net/mptcp/fastopen.c net/mptcp/protocol.c net/mptcp/protocol.h+10 -1112 replies
7/7net: dismiss sk_forward_alloc_get()include/net/sock.h net/core/sock.c net/ipv4/af_inet.c +2 more+4 -170 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMat Martineau
SeriesR-b
1/7
2/7
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH mptcp-next v2 0/7] mptcp: rx path refactor

This is a batch of changes I had sitting in my local tree for a while. Why another refactor you may ask? Two main resons:

- currently the mptcp RX path introduces quite a bit of 'exceptional' accounting/locking processing WRT to plain TCP, adding up to the implementation complexity in a misurable way
- the performance gap WRT plain TCP for single subflow connections is quite measurable.

The present refactor addresses both the above items: most of the additional complexity is dropped, and single stream performances increase measurably - from 55Gbps to 71Gbps in my loopback test. As a reference, plain TCP is around 84Gps on the same host.

The above comes to a price: the patch are invasive, even in subtle ways:
the chance of destabilizing the implementation is real (ence the additional, intentional '-next' into the subj).

In any case keeping the patch hidden for longer was not going to do any good, so here we are.

Changes from v1:
- fixed several data stream corruption and wake-up misses due to multi subflows races
- added patches 1-3 mainly to address the above
- added an additional follow-up patch (patch 7) with more cleanup

Paolo Abeni (7):
mptcp: prevent excessive coalescing on receive
tcp: fix recvbuffer adjust on sleeping rcvmsg
mptcp: don't always assume copied data in mptcp_cleanup_rbuf()
mptcp: consolidate subflow cleanup
mptcp: move the whole rx path under msk socket lock protection
mptcp: cleanup mem accounting.
net: dismiss sk_forward_alloc_get()

 include/net/sock.h   |  13 ---
 net/core/sock.c      |   2 +-
 net/ipv4/af_inet.c   |   2 +-
 net/ipv4/inet_diag.c |   2 +-
 net/mptcp/fastopen.c |   4 +-
 net/mptcp/protocol.c | 259 +++++++++++++------------------------------
 net/mptcp/protocol.h |   6 +-
 net/mptcp/subflow.c  |  33 +++---
 net/sched/em_meta.c  |   2 +-
 9 files changed, 104 insertions(+), 219 deletions(-)
Signature · 1 line
2.45.2