[PATCH mptcp-next] Squash to "mptcp: better mptcp-level RTT estimator"

Matthieu Baerts (NGI0)
2026-04-03T11:35:11Z

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>