diff options
author | Eric Dumazet <edumazet@google.com> | 2012-04-16 19:28:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-27 12:51:21 -0400 |
commit | 6a0e69cea2ec1499224067989470d3c929dbd67e (patch) | |
tree | 9bdce2a2f7e4e5d9604421bbd9742e0b0266ff78 /net | |
parent | 3286761923475d1b4a943e65a1dadda1caee7723 (diff) |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-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 104b02e3ee2..c3a9f033ef3 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -328,6 +328,7 @@ static void tcp_grow_window(struct sock *sk, struct sk_buff *skb) | |||
328 | incr = __tcp_grow_window(sk, skb); | 328 | incr = __tcp_grow_window(sk, skb); |
329 | 329 | ||
330 | if (incr) { | 330 | if (incr) { |
331 | incr = max_t(int, incr, 2 * skb->len); | ||
331 | tp->rcv_ssthresh = min(tp->rcv_ssthresh + incr, | 332 | tp->rcv_ssthresh = min(tp->rcv_ssthresh + incr, |
332 | tp->window_clamp); | 333 | tp->window_clamp); |
333 | inet_csk(sk)->icsk_ack.quick |= 1; | 334 | inet_csk(sk)->icsk_ack.quick |= 1; |