]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: mptcp: add splice io mode
authorGeliang Tang <tanggeliang@kylinos.cn>
Fri, 30 Jan 2026 19:24:28 +0000 (20:24 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Feb 2026 02:15:32 +0000 (18:15 -0800)
commit6a059c6bfb557a8c72634d761d78463a6e224547
treed7054718733f091c523ed7915e2c9b9337278f5f
parent22f3bd9bf8e850e2b365ad65916ef5aadc79bb61
selftests: mptcp: add splice io mode

This patch adds a new 'splice' io mode for mptcp_connect to test
the newly added read_sock() and splice_read() functions of MPTCP.

do_splice() efficiently transfers data directly between two file
descriptors (infd and outfd) without copying to userspace, using
Linux's splice() system call.

Usage:
./mptcp_connect.sh -m splice

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Co-developed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260130-net-next-mptcp-splice-v2-5-31332ba70d7f@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_connect.c