]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: ignore rcv_rtt sample with old ts ecr value
authorWei Wang <weiwan@google.com>
Wed, 20 Jun 2018 04:42:50 +0000 (21:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Jun 2018 04:45:01 +0000 (13:45 +0900)
commitb3f3bdf6526f5cd130ea2f0539256b3da485a68f
tree7dabd565296b1e797140820da5205e4c0f60aae2
parent4bb872ea0fab93cc6dce311912eed122b2b3b1b9
tcp: ignore rcv_rtt sample with old ts ecr value

When receiving multiple packets with the same ts ecr value, only try
to compute rcv_rtt sample with the earliest received packet.
This is because the rcv_rtt calculated by later received packets
could possibly include long idle time or other types of delay.
For example:
(1) server sends last packet of reply with TS val V1
(2) client ACKs last packet of reply with TS ecr V1
(3) long idle time passes
(4) client sends next request data packet with TS ecr V1 (again!)
At this time, the rcv_rtt computed on server with TS ecr V1 will be
inflated with the idle time and should get ignored.

Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/tcp.h
net/ipv4/tcp.c
net/ipv4/tcp_input.c