diff options
author | Eric Dumazet <edumazet@google.com> | 2012-04-16 23:28:07 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-05-11 13:14:26 +0100 |
commit | f8f811922bb85977a1c30f4788cca14b5741f9b9 (patch) | |
tree | 3c1e776f60082033b2abbe5fc8ab45aad628d388 /net/ipv4 | |
parent | 829a94ac60173dca2a30b65ea43c5c01150bd233 (diff) | |
download | linux-stable-f8f811922bb85977a1c30f4788cca14b5741f9b9.tar.gz linux-stable-f8f811922bb85977a1c30f4788cca14b5741f9b9.tar.bz2 linux-stable-f8f811922bb85977a1c30f4788cca14b5741f9b9.zip |
tcp: fix tcp_grow_window() for large incoming frames
[ Upstream commit 4d846f02392a710f9604892ac3329e628e60a230 ]
tcp_grow_window() has to grow rcv_ssthresh up to window_clamp, allowing
sender to increase its window.
tcp_grow_window() still assumes a tcp frame is under MSS, but its no
longer true with LRO/GRO.
This patch fixes one of the performance issue we noticed with GRO on.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Tom Herbert <therbert@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_input.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 4c46fa7c451d..daedc0714aa6 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -334,6 +334,7 @@ static void tcp_grow_window(struct sock *sk, const struct sk_buff *skb) incr = __tcp_grow_window(sk, skb); if (incr) { + incr = max_t(int, incr, 2 * skb->len); tp->rcv_ssthresh = min(tp->rcv_ssthresh + incr, tp->window_clamp); inet_csk(sk)->icsk_ack.quick |= 1; |