tcp: consolidate PRR packet accounting
authorYuchung Cheng <ycheng@google.com>
Wed, 29 May 2013 14:20:11 +0000 (14:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 May 2013 01:06:11 +0000 (18:06 -0700)
commit6804973ffb4288bba14d53223e2fbb2bbd1d2e1b
tree0a1183971508bf7a502adbcc531ed329bd2be1c3
parent76723bca2802eb80990a5fefa179662e2e561d66
tcp: consolidate PRR packet accounting

This patch series fixes an undo bug in fast recovery: the sender
mistakenly undos the cwnd too early but continues fast retransmits
until all pending data are acked. This also multiplies the SNMP
stat PARTIALUNDO events by the degree of the network reordering.

The first patch prepares the fix by consolidating the accounting
of newly_acked_sacked in tcp_cwnd_reduction(), instead of updating
newly_acked_sacked everytime sacked_out is adjusted.  Also pass
acked and prior_unsacked as const type because they are readonly
in the rest of recovery processing.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c