tcp: avoid cwnd moderation in undo
authorYuchung Cheng <ycheng@google.com>
Mon, 14 Mar 2011 10:57:03 +0000 (10:57 +0000)
committerBrad Figg <brad.figg@canonical.com>
Wed, 27 Apr 2011 18:42:00 +0000 (11:42 -0700)
commit40b35d032e1d35e58c5221cbc4cb5163d5b43928
tree089c19c1722652200cb264516ae6909b67a44e1c
parentb92930a5dfb085010daff2675aefea05ce6f19d1
tcp: avoid cwnd moderation in undo

BugLink: http://bugs.launchpad.net/bugs/769042

[ Upstream commit 67d4120a1793138bc9f4a6eb61d0fc5298ed97e0 ]

In the current undo logic, cwnd is moderated after it was restored
to the value prior entering fast-recovery. It was moderated first
in tcp_try_undo_recovery then again in tcp_complete_cwr.

Since the undo indicates recovery was false, these moderations
are not necessary. If the undo is triggered when most of the
outstanding data have been acknowledged, the (restored) cwnd is
falsely pulled down to a small value.

This patch removes these cwnd moderations if cwnd is undone
  a) during fast-recovery
b) by receiving DSACKs past fast-recovery

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
net/ipv4/tcp_input.c