tcp: always ACK immediately on hole repairs
authorYuchung Cheng <ycheng@google.com>
Thu, 9 Aug 2018 16:38:11 +0000 (09:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Aug 2018 18:31:35 +0000 (11:31 -0700)
commit15bdd5686c2c61373680b9015e95abf31778e4fd
tree22ea53be6abfa0c819b4cdcccee8e4da4e4cc6a6
parentd2ccd7bc8acdcb9166c07a0255fb85bf877edb1f
tcp: always ACK immediately on hole repairs

RFC 5681 sec 4.2:
  To provide feedback to senders recovering from losses, the receiver
  SHOULD send an immediate ACK when it receives a data segment that
  fills in all or part of a gap in the sequence space.

When a gap is partially filled, __tcp_ack_snd_check already checks
the out-of-order queue and correctly send an immediate ACK. However
when a gap is fully filled, the previous implementation only resets
pingpong mode which does not guarantee an immediate ACK because the
quick ACK counter may be zero. This patch addresses this issue by
marking the one-time immediate ACK flag instead.

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