summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJohn Heffner <johnwheffner@gmail.com>2008-04-29 03:13:52 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-06-16 13:19:57 -0700
commit413b0a22cad909f8cf86299ecf37d34df5d1eb38 (patch)
treede85fc8fe4ce5a2ff7690c6ac04a74fcded8a049 /net
parent73c00341a340bda4aea6a5d765686e37d9f23441 (diff)
tcp: Limit cwnd growth when deferring for GSO
[ upstream commit: 246eb2af060fc32650f07203c02bdc0456ad76c7 ] This fixes inappropriately large cwnd growth on sender-limited flows when GSO is enabled, limiting cwnd growth to 64k. [ Backport to 2.6.25 by replacing sk->sk_gso_max_size with 65536 -DaveM ] Signed-off-by: John Heffner <johnwheffner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp_cong.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index bfb1996bd99f..fde71461e227 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -287,7 +287,8 @@ int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight)
left = tp->snd_cwnd - in_flight;
if (sk_can_gso(sk) &&
- left * sysctl_tcp_tso_win_divisor < tp->snd_cwnd)
+ left * sysctl_tcp_tso_win_divisor < tp->snd_cwnd &&
+ left * tp->mss_cache < 65536)
return 1;
return left <= tcp_max_burst(tp);
}