mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
tcp: skip big rtt sample if receive queue is not empty
tcp_rcv_rtt_update() role is to keep an estimation of RTT (tp->rcv_rtt_est.rtt_us) for receivers. If an application is too slow to drain the TCP receive queue, it is better to leave the RTT estimation small, so that tcp_rcv_space_adjust() does not inflate tp->rcvq_space.space and sk->sk_rcvbuf. Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20250513193919.1089692-9-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
b879dcb1ae
commit
a00f135cd9
|
@ -682,6 +682,9 @@ static void tcp_rcv_rtt_update(struct tcp_sock *tp, u32 sample, int win_dep)
|
|||
*/
|
||||
if (win_dep)
|
||||
return;
|
||||
/* Do not use this sample if receive queue is not empty. */
|
||||
if (tp->rcv_nxt != tp->copied_seq)
|
||||
return;
|
||||
new_sample = old_sample - (old_sample >> 3) + sample;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user