]> git.baikalelectronics.ru Git - 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)
commitda9604a7c5523d5d53e71d3d0bbdfae39724f344
tree1e05b6639cbd8684e6bd85f9cc7bf02da14e2484
parent73bcf24440685b0f7131661d48e7c8dada206606
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: a4b58929433f ("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