Address AI reviews:
- samples[0] is read without READ_ONCE, while the others are.
- prev_rtt_us is added but not used.
Link: https://lore.kernel.org/20260311024547.361027-1-kuba@kernel.org
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
net/mptcp/protocol.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 740f9d975719..98902ec4796d 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -449,7 +449,7 @@ static inline void mptcp_init_rtt_est(struct mptcp_sock *msk)
static inline u32 mptcp_rtt_us_est(const struct mptcp_sock *msk)
{
- u32 rtt_us = msk->rcv_rtt_est.samples[0];
+ u32 rtt_us = READ_ONCE(msk->rcv_rtt_est.samples[0]);
int i;
/* Lockless access of collected samples. */
@@ -559,7 +559,6 @@ struct mptcp_subflow_context {
u32 map_data_len;
__wsum map_data_csum;
u32 map_csum_len;
- u32 prev_rtt_us;
u32 prev_rtt_seq;
u32 request_mptcp : 1, /* send MP_CAPABLE */
request_join : 1, /* send MP_JOIN */
---
base-commit: 7f76791a2c6b61a0e074bd908e731418ebc2ab5a
change-id: 20260403-mptcp-fix-better-mptcp-level-rtt-estimator-b63d2cb74d61
Best regards,
--
Matthieu Baerts (NGI0) <matttbe@kernel.org>
Hello, On 03/04/2026 13:34, Matthieu Baerts (NGI0) wrote: > Address AI reviews: > > - samples[0] is read without READ_ONCE, while the others are. > > - prev_rtt_us is added but not used. FYI, I just applied this patch, these comments have been previously acked by Paolo, and the fixes were straightforward. New patches for t/upstream: - 1259cb662bb0: "squashed" in "mptcp: better mptcp-level RTT estimator" - Results: e8056528d187..efc8256ccab0 (export) Tests are now in progress: - export: https://github.com/multipath-tcp/mptcp_net-next/commit/40ddceaaadee57911993715043b6c0b0fa7810af/checks Cheers, Matt -- Sponsored by the NGI0 Core fund.
Hi Matthieu,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: normal (except selftest_mptcp_join): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Success! ✅
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/23945339282
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/abb75c9867cc
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1076965
If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-normal
For more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
© 2016 - 2026 Red Hat, Inc.