Bug #366

Fwd: [PATCH] tcp: fix tcp_grow_window() for large incoming frames

Added by David Taht on Apr 17, 2012. Updated on Apr 19, 2012.
Rejected Normal Dave Täht


While this is not important for cerowrt, it could explain some things.

———- Forwarded message ———-
From: Eric Dumazet eric.dumazet@gmail.com
Date: Tue, Apr 17, 2012 at 2:28 AM
Subject: [PATCH] tcp: fix tcp_grow_window() for large incoming frames
To: David Miller davem@davemloft.net
Cc: Neal Cardwell ncardwell@google.com, Tom Herbert
therbert@google.com, netdev netdev@vger.kernel.org

From: Eric Dumazet edumazet@google.com

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

Sorry for the delay, this was discussed a long time ago.

 net/ipv4/tcp_input.c |    1 +
 1 file changed, 1 insertion(+)

diff –git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 9944c1d..3ff36406 100644
— a/net/ipv4/tcp_input.c
**+ b/net/ipv4/tcp_input.c
@ -335,6 +335,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,
                       inet_csk(sk)->icsk_ack.quick |= 1;


Updated by Dave Täht on Apr 19, 2012.
3.4 issue that only affects boxes with gro/lro on. Important to note on testing with x86, not a cero issue.

This is a static export of the original bufferbloat.net issue database. As such, no further commenting is possible; the information is solely here for archival purposes.
RSS feed

Recent Updates

Jul 21, 2024 Wiki page
Jul 21, 2024 Wiki page
What Can I Do About Bufferbloat?
Jul 21, 2024 Wiki page
Tests for Bufferbloat
Jul 1, 2024 Wiki page
RRUL Chart Explanation
Dec 3, 2022 Wiki page
Codel Wiki

Find us elsewhere

Bufferbloat Mailing Lists
#bufferbloat on Twitter
Google+ group
Archived Bufferbloat pages from the Wayback Machine


Comcast Research Innovation Fund
Nlnet Foundation
Shuttleworth Foundation

Bufferbloat Related Projects

OpenWrt Project
Congestion Control Blog
Flent Network Test Suite
The Cake shaper
CeroWrt (where it all started)

Network Performance Related Resources

Jim Gettys' Blog - The chairman of the Fjord
Toke's Blog - Karlstad University's work on bloat
Voip Users Conference - Weekly Videoconference mostly about voip
Candelatech - A wifi testing company that "gets it".