]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
tcp: fix potential underestimation on rcv_rtt
authorWei Wang <weiwan@google.com>
Wed, 13 Dec 2017 00:28:58 +0000 (16:28 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Dec 2017 21:01:17 +0000 (16:01 -0500)
commit9ee11bd03cb1a5c3ca33c2bb70e7ed325f68890f
tree1e05b6639cbd8684e6bd85f9cc7bf02da14e2484
parentc009cb842fcc0f84536a9d2692e6f063af5ac5c6
tcp: fix potential underestimation on rcv_rtt

When ms timestamp is used, current logic uses 1us in
tcp_rcv_rtt_update() when the real rcv_rtt is within 1 - 999us.
This could cause rcv_rtt underestimation.
Fix it by always using a min value of 1ms if ms timestamp is used.

Fixes: 645f4c6f2ebd ("tcp: switch rcv_rtt_est and rcvq_space to high resolution timestamps")
Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c