All of lore.kernel.org
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: geliang@kernel.org
Cc: mptcp@lists.linux.dev, kuba@kernel.org
Subject: Re: [PATCH mptcp-next v9 6/7] selftests: net: msg_zerocopy: add MPTCP support
Date: Thu, 26 Nov 2026 20:44:04 +0000	[thread overview]
Message-ID: <179572584472.3133.9042620065604383437@kernel.org> (raw)
In-Reply-To: <89bb061e82fa0cf48cf44697041947bf9c99b110.1795591278.git.tanggeliang@kylinos.cn>

Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 1

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] The patch adds `$0 4 mptcp -t 1` and `$0 6 mptcp -t 1` to the
  default (no-argument) suite in…
- [Low] The header comment of tools/testing/selftests/net/msg_zerocopy.c
  lists the 'supported protocols and modes', including protocol variants…

--

selftests: net: msg_zerocopy: add MPTCP support

This patch adds an "mptcp" test mode to msg_zerocopy.c. The new mode opens
SOCK_STREAM sockets with IPPROTO_MPTCP, with a fallback definition for
older headers. msg_zerocopy.sh is also changed to run IPv4 and IPv6 MPTCP
tests in the default test suite.

> diff --git a/tools/testing/selftests/net/msg_zerocopy.c b/tools/testing/selftests/net/msg_zerocopy.c
> index 1d5d3c4e7e872..3a130f80d662f 100644
> --- a/tools/testing/selftests/net/msg_zerocopy.c
> +++ b/tools/testing/selftests/net/msg_zerocopy.c

[ ... ]

> @@ -816,6 +820,8 @@ int main(int argc, char **argv)
>  		do_test(cfg_family, SOCK_RAW, IPPROTO_RAW);
>  	else if (!strcmp(cfg_test, "tcp"))
>  		do_test(cfg_family, SOCK_STREAM, 0);
> +	else if (!strcmp(cfg_test, "mptcp"))
> +		do_test(cfg_family, SOCK_STREAM, IPPROTO_MPTCP);

[Severity: Low]
This isn't a bug, but should the header comment at the top of
msg_zerocopy.c also list the new mode? It currently says:

 * Send traffic between two processes over one of the supported
 * protocols and modes:
 *
 * PF_INET/PF_INET6
 * - SOCK_STREAM
 * - SOCK_DGRAM
 * - SOCK_DGRAM with UDP_CORK
 * - SOCK_RAW
 * - SOCK_RAW with IP_HDRINCL

Other protocol variants such as "SOCK_RAW with IP_HDRINCL" are listed
there, but SOCK_STREAM with IPPROTO_MPTCP is not. The usage string in
msg_zerocopy.sh was updated to include mptcp.

>  	else if (!strcmp(cfg_test, "udp"))
>  		do_test(cfg_family, SOCK_DGRAM, 0);
>  	else if (!strcmp(cfg_test, "rds"))
> diff --git a/tools/testing/selftests/net/msg_zerocopy.sh b/tools/testing/selftests/net/msg_zerocopy.sh
> index 28178a38a4e7b..83424758c452a 100755
> --- a/tools/testing/selftests/net/msg_zerocopy.sh
> +++ b/tools/testing/selftests/net/msg_zerocopy.sh
> @@ -31,6 +31,8 @@ if [[ "$#" -eq "0" ]]; then
>  	$0 6 tcp -t 1 || ret=1
>  	$0 4 udp -t 1 || ret=1
>  	$0 6 udp -t 1 || ret=1
> +	$0 4 mptcp -t 1 || ret=1
> +	$0 6 mptcp -t 1 || ret=1

[Severity: Medium]
Will this make the whole default suite fail on kernels where MPTCP, or
MPTCP SO_ZEROCOPY, is not available? Previously only tcp and udp ran here.
These new cases run unconditionally, and there is no feature check or
kselftest skip (exit 4).

On kernels without CONFIG_MPTCP, or for the IPv6 run without
CONFIG_MPTCP_IPV6, socket() fails. The tx side hits a hard error in
do_setup_tx():

	fd = socket(domain, type, protocol);
	if (fd == -1)
		error(1, errno, "socket t");

do_setup_rx() fails the same way with "socket r".

On kernels that have MPTCP but not "mptcp: handle SO_ZEROCOPY in
setsockopt", the "-z" run calls do_setsockopt(fd, SOL_SOCKET,
SO_ZEROCOPY, 1). In that case mptcp_setsockopt_sol_socket() ends with:

	 * SO_ZEROCOPY is currently unsupported, TODO in sndmsg
	 * SO_TXTIME is currently unsupported
	 */

	return -EOPNOTSUPP;

do_setsockopt() then calls error(1, ...), and the script sets ret=1.

msg_zerocopy.sh is in the net TEST_PROGS. The last patch in the series,
"selftests: mptcp: cover msg_zerocopy test", also links this script into
the MPTCP selftests. Those are often run on stable and older kernels, and
that patch does not add a feature check either.

Could the mptcp cases detect missing MPTCP or SO_ZEROCOPY support and
report a skip instead of a failure?

>  
>  	[[ "$ret" == "0" ]] && echo "OK. All tests passed"
>  	exit $ret

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1795591278.git.tanggeliang%40kylinos.cn

  reply	other threads:[~2026-11-26 20:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  7:22 [PATCH mptcp-next v9 0/7] mptcp: add MSG_ZEROCOPY support Geliang Tang
2026-11-25  7:22 ` [PATCH mptcp-next v9 1/7] mptcp: use local variable tp in sendmsg_frag Geliang Tang
2026-11-26 20:44   ` netdev-bot+sashiko
2026-11-25  7:23 ` [PATCH mptcp-next v9 2/7] mptcp: remove redundant orig_offset in carve_data_frag Geliang Tang
2026-11-26 20:44   ` netdev-bot+sashiko
2026-11-25  7:23 ` [PATCH mptcp-next v9 3/7] mptcp: add MSG_ZEROCOPY support Geliang Tang
2026-11-25  7:52   ` sashiko-bot
2026-11-26 20:44   ` netdev-bot+sashiko
2026-11-25  7:23 ` [PATCH mptcp-next v9 4/7] mptcp: handle SO_ZEROCOPY in setsockopt Geliang Tang
2026-11-25  7:44   ` sashiko-bot
2026-11-26 20:44   ` netdev-bot+sashiko
2026-11-25  7:23 ` [PATCH mptcp-next v9 5/7] Documentation: msg_zerocopy: add MPTCP support Geliang Tang
2026-11-26 20:44   ` netdev-bot+sashiko
2026-11-25  7:23 ` [PATCH mptcp-next v9 6/7] selftests: net: " Geliang Tang
2026-11-26 20:44   ` netdev-bot+sashiko [this message]
2026-11-25  7:23 ` [PATCH mptcp-next v9 7/7] selftests: mptcp: cover msg_zerocopy test Geliang Tang
2026-11-25  7:34   ` sashiko-bot
2026-11-26 20:44   ` netdev-bot+sashiko
2026-11-25  9:39 ` [PATCH mptcp-next v9 0/7] mptcp: add MSG_ZEROCOPY support 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=179572584472.3133.9042620065604383437@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=geliang@kernel.org \
    --cc=kuba@kernel.org \
    --cc=mptcp@lists.linux.dev \
    /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.