From: Geliang Tang <tanggeliang@kylinos.cn>
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 (4):
mptcp: use sk_eat_skb in recvmsg_mskq
mptcp: implement .read_sock
mptcp: set .splice_read
selftests: mptcp: add splice test
net/ipv4/tcp.c | 6 +
net/mptcp/protocol.c | 66 +++++-
tools/testing/selftests/net/mptcp/Makefile | 2 +-
.../testing/selftests/net/mptcp/mptcp_join.sh | 20 ++
.../selftests/net/mptcp/mptcp_splice.c | 201 ++++++++++++++++++
5 files changed, 292 insertions(+), 3 deletions(-)
create mode 100644 tools/testing/selftests/net/mptcp/mptcp_splice.c
--
2.43.0