tcp: account lost retransmit after timeout
authorYuchung Cheng <ycheng@google.com>
Wed, 16 May 2018 23:40:13 +0000 (16:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 May 2018 19:41:29 +0000 (15:41 -0400)
commitd716bfdb10b4250617783c94253e48b0e85adcb1
treee2622423fe783b7a7dfb81ea3a28b45dbb15ff3e
parent6ac06ecd3a5d1dd1aaea5c2a8f6d6e4c81d5de6a
tcp: account lost retransmit after timeout

The previous approach for the lost and retransmit bits was to
wipe the slate clean: zero all the lost and retransmit bits,
correspondingly zero the lost_out and retrans_out counters, and
then add back the lost bits (and correspondingly increment lost_out).

The new approach is to treat this very much like marking packets
lost in fast recovery. We don’t wipe the slate clean. We just say
that for all packets that were not yet marked sacked or lost, we now
mark them as lost in exactly the same way we do for fast recovery.

This fixes the lost retransmit accounting at RTO time and greatly
simplifies the RTO code by sharing much of the logic with Fast
Recovery.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Soheil Hassas Yeganeh <soheil@google.com>
Reviewed-by: Priyaranjan Jha <priyarjha@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/tcp_input.c
net/ipv4/tcp_recovery.c