]> 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:05:31 +0000 (11:05 +0100)
commita7d4705f60b64cd8644939d9233e88a3a85534ad
treefb9c65de8f5e6aae995db7f3735002da22e5e1d8
parent8ce9d65726d58c1c3be573555f7d583417edd818
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