From: netdev-bot+sashiko@kernel.org
To: geliang@kernel.org
Cc: mptcp@lists.linux.dev, kuba@kernel.org
Subject: Re: [PATCH mptcp-next v8 6/7] selftests: mptcp: sockopt: check app_limited
Date: Wed, 18 Nov 2026 01:05:47 +0000 [thread overview]
Message-ID: <179496394785.3133.6898080008519020798@kernel.org> (raw)
In-Reply-To: <655e40ce580c2cdb8126397d03498d225dbea6da.1794826541.git.geliang@kernel.org>
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 commit 'selftests: mptcp: sockopt: check app_limited' is
authored by `Geliang Tang <geliang@kernel.org>`, but its only Signed-…
- [Low] In connect_one_server()
(tools/testing/selftests/net/mptcp/mptcp_sockopt.c:640-641), the new…
--
selftests: mptcp: sockopt: check app_limited
This commit adds a check to connect_one_server() in mptcp_sockopt.c. After
a small data exchange, it asserts that tcpi_delivery_rate_app_limited is 1
when expect_all_features() is enabled. The goal is to catch regressions
where MPTCP subflows are never marked app-limited.
> Author: Geliang Tang <geliang@kernel.org>
> ...
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
[Severity: Low]
This isn't a bug, but the author address and the only Signed-off-by
address are different. checkpatch.pl reports this as
FROM_SIGN_OFF_MISMATCH.
Most of the series has the same mismatch:
"mptcp: fix TFO SIOCINQ overflow in mptcp_inq_hint"
"selftests: mptcp: connect: check TFO SIOCINQ overflow"
"mptcp: implement peek_len for proto_ops"
"mptcp: add sendmsg_locked to proto_ops"
"mptcp: track app-limited state in mptcp_sendmsg"
"mptcp: update mptcp_check_readable", however, signs off with the
kernel.org address.
Could an in-body From: line with the kylinos.cn address be added, or the
sign-off switched to the kernel.org address, so the series is consistent?
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
> index b8158a1198eba..9517c530ba214 100644
> --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
> +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c
> @@ -635,6 +635,11 @@ static void connect_one_server(int fd, int pipefd)
> do_getsockopts(&s, fd, total, total);
>
> assert(s.mptcpi_rcv_delta == (uint64_t)total);
> +
> + /* app-limited accounting only checked under EXPECT_ALL_FEATURES */
> + if (expect_all_features())
> + assert(s.tcp_info.tcpi_delivery_rate_app_limited == 1);
[Severity: Low]
Can this assertion pass even when no rate sample was accepted for the
client's data?
The expected value is the same one tcp_init_sock() sets at the start:
net/ipv4/tcp.c:tcp_init_sock() {
...
tp->app_limited = ~0U;
tp->rate_app_limited = 1;
...
}
tcp_rate_gen() only updates tp->rate_app_limited when the sample gets
past its early returns, including this one:
net/ipv4/tcp_input.c:tcp_rate_gen() {
...
if (unlikely(rs->interval_us < tcp_min_rtt(tp))) {
...
rs->interval_us = -1;
return;
}
...
}
Also, tcp_update_rtt_min() replaces a 0 us RTT with one jiffy:
net/ipv4/tcp_input.c:tcp_update_rtt_min() {
...
minmax_running_min(&tp->rtt_min, wlen, tcp_jiffies32,
rtt_us ? : jiffies_to_usecs(1));
}
Suppose the clocksource is coarse and the data skb's RTT measures as 0 us.
Then ack_us is below min_rtt and the sample is dropped. rate_app_limited
keeps its initial value of 1, so the assert would still pass if
mptcp_rate_check_app_limited() were broken or removed.
On loopback with a fine-grained clock a sample is normally accepted, so
the check works in the usual case.
Would it make sense to also require s.tcp_info.tcpi_delivery_rate != 0,
or to compare tcpi_delivered before and after the exchange? Either would
confirm that a sample was actually measured.
> +
> close(fd);
> }
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1794826541.git.geliang%40kernel.org
next prev parent reply other threads:[~2026-11-18 1:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 10:57 [PATCH mptcp-next v8 0/7] prepare interfaces for kTLS and sockmap support Geliang Tang
2026-11-16 10:57 ` [PATCH mptcp-net v8 1/7] mptcp: fix TFO SIOCINQ overflow in mptcp_inq_hint Geliang Tang
2026-11-18 1:05 ` netdev-bot+sashiko
2026-11-16 10:57 ` [PATCH mptcp-next v8 2/7] selftests: mptcp: connect: check TFO SIOCINQ overflow Geliang Tang
2026-11-18 1:05 ` netdev-bot+sashiko
2026-11-16 10:57 ` [PATCH mptcp-next v8 3/7] mptcp: implement peek_len for proto_ops Geliang Tang
2026-11-18 1:05 ` netdev-bot+sashiko
2026-11-16 10:57 ` [PATCH mptcp-next v8 4/7] mptcp: add sendmsg_locked to proto_ops Geliang Tang
2026-11-18 1:05 ` netdev-bot+sashiko
2026-11-16 10:57 ` [PATCH mptcp-next v8 5/7] mptcp: track app-limited state in mptcp_sendmsg Geliang Tang
2026-11-18 1:05 ` netdev-bot+sashiko
2026-11-16 10:57 ` [PATCH mptcp-next v8 6/7] selftests: mptcp: sockopt: check app_limited Geliang Tang
2026-11-18 1:05 ` netdev-bot+sashiko [this message]
2026-11-16 10:57 ` [PATCH mptcp-next v8 7/7] mptcp: update mptcp_check_readable Geliang Tang
2026-11-16 13:38 ` [PATCH mptcp-next v8 0/7] prepare interfaces for kTLS and sockmap 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=179496394785.3133.6898080008519020798@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.