[TCP]: Adjust Reno SACK estimate in tcp_fragment
commit83ca28befc43e93849e79c564cda10e39d983e75
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 23 Sep 2005 06:32:56 +0000 (22 23:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Sep 2005 06:32:56 +0000 (22 23:32 -0700)
treeb86c768738f929246e4a0f858f8f6df88c015da8
parente484585ec3ee66cd07a627d3a9e2364640a3807f
[TCP]: Adjust Reno SACK estimate in tcp_fragment

Since the introduction of TSO pcount a year ago, it has been possible
for tcp_fragment() to cause packets_out to decrease.  Prior to that,
tcp_retrans_try_collapse() was the only way for that to happen on the
retransmission path.

When this happens with Reno, it is possible for sasked_out to become
invalid because it is only an estimate and not tied to any particular
packet on the retransmission queue.

Therefore we need to adjust sacked_out as well as left_out in the Reno
case.  The following patch does exactly that.

This bug is pretty difficult to trigger in practice though since you
need a SACKless peer with a retransmission that occurs just as the
cached MTU value expires.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c