All of lore.kernel.org
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: anilkaushikwireless@gmail.com
Cc: mptcp@lists.linux.dev, kuba@kernel.org
Subject: Re: [PATCH mptcp-next v8 5/6] selftests: mptcp: pm_nl_ctl: support the subflow-retries limit
Date: Sat, 24 Oct 2026 06:11:19 +0000	[thread overview]
Message-ID: <179282227953.3132.7976238140611050653@kernel.org> (raw)
In-Reply-To: <20261022151130.2285198-6-anilkaushikwireless@gmail.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The 'subflow retries above hard limit' subtest in
  tools/testing/selftests/net/mptcp/pm_netlink.sh cannot show what the…

--

selftests: mptcp: pm_nl_ctl: support the subflow-retries limit

With this patch, 'pm_nl_ctl limits' can set the subflow-retries limit
through an optional third argument, and it prints the limit when the
kernel reports it. pm_netlink.sh is extended to check the default value,
that a value above the maximum is refused, and that the value can be set.

> diff --git a/tools/testing/selftests/net/mptcp/pm_netlink.sh b/tools/testing/selftests/net/mptcp/pm_netlink.sh
> index 21bfe1311f118..99072ad8052d9 100755
> --- a/tools/testing/selftests/net/mptcp/pm_netlink.sh
> +++ b/tools/testing/selftests/net/mptcp/pm_netlink.sh

[ ... ]

> @@ -75,6 +80,22 @@ get_limits_nb() {
>  	fi
>  }
>  
> +# The subflow retries limit is only set and shown with pm_nl_ctl for now.
> +# Prints its default value if it is supported.
> +get_default_retries() {
> +	if mptcp_lib_is_ip_mptcp; then
> +		return
> +	fi
> +
> +	if ip netns exec "${ns1}" ./pm_nl_ctl limits |
> +	   grep -q "^subflow_retries"; then
> +		echo 127
> +	elif mptcp_lib_expect_all_features; then
> +		# missing feature: the defaults limits check will fail
> +		echo 127
> +	fi
> +}

[ ... ]

> @@ -224,7 +247,27 @@ check "get_limits" "${default_limits}" "subflows above hard limit"
>  
>  set_limits ${max_limits} ${max_limits}
>  flush_endpoint  ## to make sure it doesn't affect the limits
> -check "get_limits" "$(format_limits ${max_limits} ${max_limits})" "set limits"
> +max_limits_out="$(format_limits ${max_limits} ${max_limits} \
> +		 "${default_retries}")"
> +check "get_limits" "${max_limits_out}" "set limits"
> +
> +if [ -n "${default_retries}" ]; then
> +	ip netns exec "${ns1}" ./pm_nl_ctl limits ${max_limits} ${max_limits} \
> +		128 2>/dev/null
> +	check "get_limits" "${max_limits_out}" \
> +		"subflow retries above hard limit"

[Severity: Low]
Can this subtest tell a refused value apart from a clamped one?

The commit message says pm_netlink.sh checks "that a value above the
maximum is refused". Since v8, the per-netns default is the same value
as the policy maximum.

In net/mptcp/pm_kernel.c:pm_nl_init_net():

	pernet->limit_subflow_retries = 127;

In net/mptcp/mptcp_pm_gen.c, mptcp_pm_set_limits_nl_policy has:

	[MPTCP_PM_ATTR_SUBFLOW_RETRIES] = NLA_POLICY_MAX(NLA_U32, 127),

get_default_retries() also hardcodes 127, so max_limits_out already
contains "subflow_retries 127" when the request with 128 is sent. The
exit status and stderr of pm_nl_ctl are thrown away.

If the kernel refuses 128, the readback shows 127. If 128 were accepted
and clamped to 127, the readback would also show 127. Both outcomes pass
this check, so it only fails if 128 is stored as-is.

The earlier "rcv addrs above hard limit" and "subflows above hard limit"
checks work because the stored value differs from what the bad request
would set.

Could the 128 attempt be moved after the "set subflow retries" step, so
the check can verify the value stays at 0? Checking that pm_nl_ctl exits
non-zero for the 128 request would also work.

> +
> +	ip netns exec "${ns1}" ./pm_nl_ctl limits ${max_limits} ${max_limits} 0
> +	check "get_limits" "$(format_limits ${max_limits} ${max_limits} 0)" \
> +		"set subflow retries"

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261022151130.2285198-1-anilkaushikwireless%40gmail.com

  reply	other threads:[~2026-10-24  6:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22 15:11 [PATCH mptcp-next v8 0/6] mptcp: pm: in-kernel: retry subflows closed after an error Anil Kaushik
2026-10-22 15:11 ` [PATCH mptcp-next v8 1/6] selftests: mptcp: connect: retry write() on EAGAIN Anil Kaushik
2026-10-22 15:11 ` [PATCH mptcp-next v8 2/6] netlink: specs: mptcp: add the subflow-retries attribute Anil Kaushik
2026-10-24  6:11   ` netdev-bot+sashiko
2026-10-22 15:11 ` [PATCH mptcp-next v8 3/6] mptcp: pm: in-kernel: add the subflow-retries limit Anil Kaushik
2026-10-22 15:11 ` [PATCH mptcp-next v8 4/6] mptcp: pm: in-kernel: retry subflows closed after an error Anil Kaushik
2026-10-22 15:49   ` sashiko-bot
2026-10-24  6:11   ` netdev-bot+sashiko
2026-10-22 15:11 ` [PATCH mptcp-next v8 5/6] selftests: mptcp: pm_nl_ctl: support the subflow-retries limit Anil Kaushik
2026-10-24  6:11   ` netdev-bot+sashiko [this message]
2026-10-22 15:11 ` [PATCH mptcp-next v8 6/6] selftests: mptcp: join: validate subflow retry after link failure Anil Kaushik
2026-10-22 15:34   ` sashiko-bot
2026-10-24  6:11   ` netdev-bot+sashiko

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=179282227953.3132.7976238140611050653@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=anilkaushikwireless@gmail.com \
    --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.