All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ruilin Mao" <zibuyu423@gmail.com>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next 2/2] selftests: mptcp: check the aggregate pacing rate across two paths
Date: Thu, 03 Dec 2026 15:09:06 +0000	[thread overview]
Message-ID: <sashiko-outbox-248073@kernel.org> (raw)
In-Reply-To: <179630953226.20.8856777451271939865.mptcp-578-0002@gmail.com>

Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [Medium] selftests: mptcp: mid-script mptcp_lib_kallsyms_has() aborts
  simult_flows.sh
- [Low] selftests: mptcp: silent skip in simult_flows.sh lacks reason
  string
- [Low] selftests: mptcp: loose max_time in simult_flows.sh misses
  over-throttling
- [Low] selftests: mptcp: unconditional pacing checks overwrite retc in
  do_transfer()
--

commit d7318c01326d99e2d3acfdbd5eb6d1d7164dba08
Author: Ruilin Mao <zibuyu423@gmail.com>

selftests: mptcp: check the aggregate pacing rate across two paths

This commit adds a -a option to mptcp_connect to set SO_MAX_PACING_RATE
and adds an aggregate pacing rate subtest to simult_flows.sh over two
10-Mbit/s paths.

Link: https://github.com/multipath-tcp/mptcp_net-next/issues/578

> diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh
> index 3ea3d1efe32e1..d4a6bda0e3a24 100755
> --- a/tools/testing/selftests/net/mptcp/simult_flows.sh
> +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh

[ ... ]

> @@ -184,6 +198,23 @@ do_transfer()
>  	wait $spid
>  	local rets=$?
>  
> +	if ((rate)); then
> +		end=$(date +%s%N)
> +		elapsed=$(((end - start) / 1000000))
> +		# Allow one GSO burst and timer jitter at the endpoints.
> +		min_time=$((size * 1000 / rate * 90 / 100))
> +		if ((elapsed < min_time)); then
> +			mptcp_lib_print_err "pacing: ${elapsed}ms, minimum ${min_time}ms"
> +			retc=1
> +		fi
> +		tx1=$(($(get_tx_bytes ns1eth1) - tx1))
> +		tx2=$(($(get_tx_bytes ns1eth2) - tx2))
> +		if ((tx1 < 65536 || tx2 < 65536)); then
> +			mptcp_lib_print_err "path byte counts too low: $tx1 and $tx2"
> +			retc=1
> +		fi
> +	fi

[Severity: Low]
Should these pacing checks require retc and rets to be zero and track
failures in a separate variable?

When mptcp_connect fails early, elapsed and tx1/tx2 miss their thresholds,
printing spurious pacing errors and overwriting retc with 1 before
mptcp_lib_pr_fail() reports it.  Even when both peers exit 0, mutating retc
makes mptcp_lib_pr_fail() misreport a client exit code of 1.

[ ... ]

> @@ -309,6 +340,23 @@ done
>  setup
>  mptcp_lib_subtests_last_ts_reset
>  run_test 10 10 0 0  20 20 "balanced bwidth"
> +
> +# Keep the two 10-Mbit/s paths from the previous test. A 14-Mbit/s
> +# connection cap leaves room to use both while exposing independent caps.
> +msg="aggregate pacing rate"
> +mptcp_lib_print_title "$msg"
> +if mptcp_lib_kallsyms_has 'mptcp_pacing_account$'; then

[Severity: Medium]
Can calling mptcp_lib_kallsyms_has() mid-script abort simult_flows.sh when
CONFIG_KALLSYMS is disabled?

mptcp_lib_kallsyms_has() calls mptcp_lib_check_kallsyms(), which runs
exit ${KSFT_SKIP} when /proc/kallsyms is absent.  Terminating after the
first run_test() skips the remaining subtests, drops the TAP summary, and
masks any failure already recorded in ret.

Calling mptcp_lib_check_kallsyms() at startup like the sibling MPTCP
selftests, or checking for /proc/kallsyms before this test, would avoid
exiting mid-run.

> +	do_transfer "$large" "$small" "$((timeout_poll * 1000))" 1750000

[Severity: Low]
Is passing $((timeout_poll * 1000)) (30000 ms) as max_time too loose to catch
over-throttling?

For a 16 MiB transfer capped at 14 Mbit/s (~9.6 s expected), a 30 s upper
bound lets a 7-Mbit/s over-throttled transfer or a mostly single-path
10-Mbit/s transfer (after 64 KiB on the second path) pass.  Deriving max_time
from the 14-Mbit/s rate and slack, like run_test() does, would catch that.

[ ... ]

> +else
> +	mptcp_lib_pr_skip
> +	mptcp_lib_result_skip "$msg"
> +fi

[Severity: Low]
Should mptcp_lib_pr_skip take a reason string here?  Calling it with no
arguments prints a bare "[SKIP]" without saying which kernel feature is
missing (for example, "SO_MAX_PACING_RATE not supported by the kernel").

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/179630953225.20.4977913523988952504.mptcp-578-0000@gmail.com?part=2

  reply	other threads:[~2026-12-03 15:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 14:53 [PATCH mptcp-next 0/2] mptcp: pace subflows against a connection-wide rate limit Ruilin Mao
2026-12-03 14:53 ` [PATCH mptcp-next 1/2] mptcp: support a connection-wide SO_MAX_PACING_RATE Ruilin Mao
2026-12-03 15:29   ` sashiko-bot
2026-12-05  5:06   ` netdev-bot+sashiko
2026-12-03 14:53 ` [PATCH mptcp-next 2/2] selftests: mptcp: check the aggregate pacing rate across two paths Ruilin Mao
2026-12-03 15:09   ` sashiko-bot [this message]
2026-12-05  5:06   ` 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=sashiko-outbox-248073@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zibuyu423@gmail.com \
    /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.