From: Geliang Tang <geliang@kernel.org>
To: mptcp@lists.linux.dev, matttbe@kernel.org, hare@kernel.org,
pabeni@redhat.com
Cc: Geliang Tang <tanggeliang@kylinos.cn>
Subject: [PATCH mptcp-next v8 0/7] implement mptcp read_sock
Date: Wed, 9 Jul 2025 15:25:27 +0800 [thread overview]
Message-ID: <cover.1752045499.git.tanggeliang@kylinos.cn> (raw)
From: Geliang Tang <tanggeliang@kylinos.cn>
v8:
- export struct tcp_splice_state and tcp_splice_data_recv() in net/tcp.h.
- add a new helper mptcp_recv_should_stop.
- add mptcp_connect_splice.sh.
- update commit logs.
Based-on: <20250708-selftests-mptcp-connect-modes-v1-0-f8e6f9828fd8@kernel.org>
v7:
- only patch 1 and patch 2 changed.
- add a new helper mptcp_eat_recv_skb.
- invoke skb_peek in mptcp_recv_skb().
- use while ((skb = mptcp_recv_skb(sk)) != NULL) instead of
skb_queue_walk_safe(&sk->sk_receive_queue, skb, tmp).
v6:
- address Paolo's comment for v4, v5 (thanks)
v5:
- extract the common code of __mptcp_recvmsg_mskq() and mptcp_read_sock()
into a new helper __mptcp_recvmsg_desc() to reduce duplication code.
v4:
- v3 doesn't work for MPTCP fallback tests in mptcp_connect.sh, this
set fix it.
- invoke __mptcp_move_skbs in mptcp_read_sock.
- use INDIRECT_CALL_INET_1 in __tcp_splice_read.
v3:
- merge the two squash-to patches.
- use sk->sk_rcvbuf instead of INT_MAX as the max len in
mptcp_read_sock().
- add splice io mode for mptcp_connect and drop mptcp_splice.c test.
- the splice test for packetdrill is also added here:
https://github.com/multipath-tcp/packetdrill/pull/162
v2:
- set splice_read of mptcp
- add a splice selftest.
I have good news! I recently added MPTCP support to "NVME over TCP".
And my RFC patches are under review by NVME maintainer Hannes.
Replacing "NVME over TCP" with MPTCP is very simple. I used IPPROTO_MPTCP
instead of IPPROTO_TCP to create MPTCP sockets on both target and host
sides, these sockets are created in Kernel space.
nvmet_tcp_add_port:
ret = sock_create(port->addr.ss_family, SOCK_STREAM,
IPPROTO_MPTCP, &port->sock);
nvme_tcp_alloc_queue:
ret = sock_create_kern(current->nsproxy->net_ns,
ctrl->addr.ss_family, SOCK_STREAM,
IPPROTO_MPTCP, &queue->sock);
nvme_tcp_try_recv() needs to call .read_sock interface of struct
proto_ops, but it is not implemented in MPTCP. So I implemented it
with reference to __mptcp_recvmsg_mskq().
Since the NVME part patches are still under reviewing, I only send the
MPTCP part patches in this set to MPTCP ML for your opinions.
Geliang Tang (7):
mptcp: add eat_recv_skb helper
mptcp: implement .read_sock
tcp: export tcp_splice_state
mptcp: add recv_should_stop helper
mptcp: implement .splice_read
selftests: mptcp: add splice io mode
selftests: mptcp: connect: cover splice mode
include/net/tcp.h | 12 +
net/ipv4/tcp.c | 13 +-
net/mptcp/protocol.c | 237 +++++++++++++++---
tools/testing/selftests/net/mptcp/Makefile | 2 +-
.../selftests/net/mptcp/mptcp_connect.c | 63 ++++-
.../net/mptcp/mptcp_connect_splice.sh | 4 +
6 files changed, 285 insertions(+), 46 deletions(-)
create mode 100755 tools/testing/selftests/net/mptcp/mptcp_connect_splice.sh
--
2.48.1
next reply other threads:[~2025-07-09 7:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 7:25 Geliang Tang [this message]
2025-07-09 7:25 ` [PATCH mptcp-next v8 1/7] mptcp: add eat_recv_skb helper Geliang Tang
2025-07-09 7:25 ` [PATCH mptcp-next v8 2/7] mptcp: implement .read_sock Geliang Tang
2025-07-09 7:25 ` [PATCH mptcp-next v8 3/7] tcp: export tcp_splice_state Geliang Tang
2025-07-09 7:25 ` [PATCH mptcp-next v8 4/7] mptcp: add recv_should_stop helper Geliang Tang
2025-07-09 7:25 ` [PATCH mptcp-next v8 5/7] mptcp: implement .splice_read Geliang Tang
2025-07-09 7:25 ` [PATCH mptcp-next v8 6/7] selftests: mptcp: add splice io mode Geliang Tang
2025-07-09 7:25 ` [PATCH mptcp-next v8 7/7] selftests: mptcp: connect: cover splice mode Geliang Tang
2025-07-09 16:06 ` [PATCH mptcp-next v8 0/7] implement mptcp read_sock MPTCP CI
2025-07-09 17:53 ` MPTCP CI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1752045499.git.tanggeliang@kylinos.cn \
--to=geliang@kernel.org \
--cc=hare@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=tanggeliang@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.