]> 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)
commita27612fb79db5af7a9e49bd82181cc09fa122736
tree1e05b6639cbd8684e6bd85f9cc7bf02da14e2484
parentdc8f40f3f6352fd5a05d11a35a6e8e02a89b4d5a
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: eeeec57e5e7b ("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