Skip to content

Add MPTCP support for NBD

Geliang Tang mptcp 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 1 replyIn review
  2. v12 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Add lockdep class distinction for MPTCP sockets (patch 1)
- Add set_memalloc protocol callback for automatic subflow sync (patch 2)
- update selfetsts.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mptcp: give MPTCP sockets a distinct lockdep classnet/mptcp/pm_kernel.c net/mptcp/protocol.c+36 -170 replies
2/4sock: add set_memalloc protocol callbackdrivers/block/nbd.c include/net/sock.h net/core/sock.c +1 more+31 -00 replies
3/4nbd: allow MPTCP socketsdrivers/block/nbd.c+3 -10 replies
4/4selftests: mptcp: add mptcp nbd teststools/testing/selftests/net/mptcp/Makefile tools/testing/selftests/net/mptcp/config tools/testing/selftests/net/mptcp/mptcp_lib.sh +1 more+388 -00 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH mptcp-next v2 0/4] Add MPTCP support for NBD

From: Geliang Tang <[email protected]>

This series adds MPTCP (Multipath TCP) support to NBD (Network Block Device) and includes comprehensive tests.

MPTCP can aggregate bandwidth from multiple network interfaces, providing significant performance improvements in multi-NIC scenarios. Our tests with 4 virtual NICs (each limited to 1000 Mbit/s / 125 MB/s) show ~4x bandwidth improvement: TCP achieves ~110 MiB/s while MPTCP achieves ~400 MiB/s for both read and write operations.

Patch 1 gives MPTCP sockets a distinct lockdep class to prevent false positive lockdep warnings when MPTCP master sockets and their subflow sockets are used together in the same lock chain.

Patch 2 adds a set_memalloc protocol callback to struct proto that allows protocols to propagate SOCK_MEMALLOC flag and allocation settings to their sub-sockets automatically. MPTCP implements this callback to sync memalloc settings to all subflow sockets.

Patch 3 adds MPTCP socket support to the kernel NBD driver by allowing MPTCP sockets in nbd_get_socket().

Patch 4 adds a comprehensive test script (mptcp_nbd.sh) that validates NBD over both TCP and MPTCP.

v2:
- Add lockdep class distinction for MPTCP sockets (patch 1)
- Add set_memalloc protocol callback for automatic subflow sync (patch 2)
- update selfetsts.

v1:
- https://patchwork.kernel.org/project/mptcp/cover/[email protected]/

Geliang Tang (4):
mptcp: give MPTCP sockets a distinct lockdep class
sock: add set_memalloc protocol callback
nbd: allow MPTCP sockets
selftests: mptcp: add mptcp nbd tests

 drivers/block/nbd.c                           |   5 +-
 include/net/sock.h                            |   1 +
 net/core/sock.c                               |   8 +
 net/mptcp/pm_kernel.c                         |  16 -
 net/mptcp/protocol.c                          |  58 ++-
 tools/testing/selftests/net/mptcp/Makefile    |   1 +
 tools/testing/selftests/net/mptcp/config      |   1 +
 .../testing/selftests/net/mptcp/mptcp_lib.sh  |  13 +
 .../testing/selftests/net/mptcp/mptcp_nbd.sh  | 373 ++++++++++++++++++
 9 files changed, 458 insertions(+), 18 deletions(-)
 create mode 100755 tools/testing/selftests/net/mptcp/mptcp_nbd.sh
Signature · 1 line
2.55.0