]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tcp: always seek for minimal rtt in tcp_rcv_rtt_update()
authorEric Dumazet <edumazet@google.com>
Tue, 13 May 2025 19:39:15 +0000 (19:39 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:33 +0000 (11:07 +0100)
commite74f4433ed75e9d0a55c28cfb50d03ca88450e53
tree222dda5568b8ef612dcb9543df6027adca749c82
parent6c52c6c873213f81c4e78f2545ce3279ca252c70
tcp: always seek for minimal rtt in tcp_rcv_rtt_update()

[ Upstream commit b879dcb1aeeca278eacaac0b1e2425b1c7599f9f ]

tcp_rcv_rtt_update() goal is to maintain an estimation of the RTT
in tp->rcv_rtt_est.rtt_us, used by tcp_rcv_space_adjust()

When TCP TS are enabled, tcp_rcv_rtt_update() is using
EWMA to smooth the samples.

Change this to immediately latch the incoming value if it
is lower than tp->rcv_rtt_est.rtt_us, so that tcp_rcv_space_adjust()
does not overshoot tp->rcvq_space.space and sk->sk_rcvbuf.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250513193919.1089692-8-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/tcp_input.c