MPTCP Linux Development
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>,
	Geliang Tang <geliang@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Sasha Levin <sashal@kernel.org>,
	martineau@kernel.org, netdev@vger.kernel.org,
	mptcp@lists.linux.dev
Subject: [PATCH AUTOSEL 6.17-6.12] selftests: mptcp: join: allow more time to send ADD_ADDR
Date: Sat, 25 Oct 2025 12:00:27 -0400	[thread overview]
Message-ID: <20251025160905.3857885-396-sashal@kernel.org> (raw)
In-Reply-To: <20251025160905.3857885-1-sashal@kernel.org>

From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>

[ Upstream commit e2cda6343bfe459c3331db5afcd675ab333112dd ]

When many ADD_ADDR need to be sent, it can take some time to send each
of them, and create new subflows. Some CIs seem to occasionally have
issues with these tests, especially with "debug" kernels.

Two subtests will now run for a slightly longer time: the last two where
3 or more ADD_ADDR are sent during the test.

Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250907-net-next-mptcp-add_addr-retrans-adapt-v1-3-824cc805772b@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

YES

- What changed: The patch slows two MPTCP selftests that signal three
  addresses to reduce flakiness. It injects `speed=slow` for the “signal
  addresses” and “signal invalid addresses” subtests so `run_tests` runs
  in slow mode:
  - tools/testing/selftests/net/mptcp/mptcp_join.sh:2271-2272 sets
    `speed=slow` before `run_tests` in the “signal addresses” block.
  - tools/testing/selftests/net/mptcp/mptcp_join.sh:2284-2285 sets
    `speed=slow` before `run_tests` in the “signal invalid addresses”
    block.

- How it works: `speed=slow` is consumed by `do_transfer()` which maps
  it to `-r 50` for `mptcp_connect`:
  - Default/dispatch:
    tools/testing/selftests/net/mptcp/mptcp_join.sh:953 defines `local
    speed=${speed:-"fast"}` and at 967-972 maps `fast`→`-j`, `slow`→`-r
    50`, or numeric speed→`-r <num>`.
  - mptcp_connect semantics: the `-r` option enables “slow mode,
    limiting each write to num bytes,” giving the protocol time to
    exchange ADD_ADDR and create subflows
    (tools/testing/selftests/net/mptcp/mptcp_connect.c:132, parsed in
    1426 and handled in the ‘r’ case 1444-1450).

- Why it’s needed: With three or more ADD_ADDR to send, debug kernels
  and slower CI runners can time out or not complete subflow setup
  before data transfer finishes. Slowing writes increases the window for
  address signaling and subflow establishment, improving determinism.
  This aligns with existing practice elsewhere in the script where many
  subtests already run with `speed=slow` for similar reasons (e.g.,
  numerous `speed=slow` calls throughout the file).

- Scope and risk:
  - Test-only: Changes are confined to
    `tools/testing/selftests/net/mptcp/mptcp_join.sh` and do not touch
    kernel code paths or ABIs.
  - Minimal and contained: Two call sites adjusted; no logic or
    expectations changed, only pacing.
  - Low regression risk: Only increases runtime slightly for two
    subtests; expected counts remain the same (e.g., still `chk_join_nr
    3 3 3` and `chk_add_nr 3 3` in
    tools/testing/selftests/net/mptcp/mptcp_join.sh:2273-2274; and
    unchanged checks after the invalid addresses case at 2286-2288).

- Stable-policy fit:
  - Fixes test flakiness affecting CI/users running stable selftests
    (practical impact for validation).
  - No new features or architectural changes; very small diff; conforms
    to stable rules for low-risk test fixes.
  - No “Cc: stable” tag, but the change is a clear reliability fix for
    selftests, which stable trees commonly accept to keep test suites
    meaningful.

Given it’s a tiny, isolated selftest reliability improvement with no
kernel-side risk and tangible benefit for CI stability, it is suitable
for backporting.

 tools/testing/selftests/net/mptcp/mptcp_join.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 8e92dfead43bf..fed14a281a6d9 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -2151,7 +2151,8 @@ signal_address_tests()
 		pm_nl_add_endpoint $ns1 10.0.3.1 flags signal
 		pm_nl_add_endpoint $ns1 10.0.4.1 flags signal
 		pm_nl_set_limits $ns2 3 3
-		run_tests $ns1 $ns2 10.0.1.1
+		speed=slow \
+			run_tests $ns1 $ns2 10.0.1.1
 		chk_join_nr 3 3 3
 		chk_add_nr 3 3
 	fi
@@ -2163,7 +2164,8 @@ signal_address_tests()
 		pm_nl_add_endpoint $ns1 10.0.3.1 flags signal
 		pm_nl_add_endpoint $ns1 10.0.14.1 flags signal
 		pm_nl_set_limits $ns2 3 3
-		run_tests $ns1 $ns2 10.0.1.1
+		speed=slow \
+			run_tests $ns1 $ns2 10.0.1.1
 		join_syn_tx=3 \
 			chk_join_nr 1 1 1
 		chk_add_nr 3 3
-- 
2.51.0


           reply	other threads:[~2025-10-25 16:26 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20251025160905.3857885-1-sashal@kernel.org>]

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=20251025160905.3857885-396-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=geliang@kernel.org \
    --cc=kuba@kernel.org \
    --cc=martineau@kernel.org \
    --cc=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox