From: Chris Wright Date: Fri, 30 Sep 2005 02:05:28 +0000 (-0700) Subject: Add tcp_clam_window() fix fwd from DaveM X-Git-Tag: v2.6.13.3~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1222d9e254549e14af1e8dbffc3d3ba12d9cf863;p=thirdparty%2Fkernel%2Fstable-queue.git Add tcp_clam_window() fix fwd from DaveM --- diff --git a/queue/series b/queue/series index b45bf51377e..8077aaf676b 100644 --- a/queue/series +++ b/queue/series @@ -7,3 +7,4 @@ uml-fix-x86_64-page-leak.patch check-connect-status-for-IPv6-UDP-socket.patch skge-set-mac-address-oops-with-bonding.patch tcp-set-default-congestion-control-correctly.patch +tcp-dont-over-clamp-window-in-tcp_clamp_window.patch diff --git a/queue/tcp-dont-over-clamp-window-in-tcp_clamp_window.patch b/queue/tcp-dont-over-clamp-window-in-tcp_clamp_window.patch new file mode 100644 index 00000000000..d6fe80591f6 --- /dev/null +++ b/queue/tcp-dont-over-clamp-window-in-tcp_clamp_window.patch @@ -0,0 +1,51 @@ +From stable-bounces@linux.kernel.org Thu Sep 29 17:19:58 2005 +Date: Thu, 29 Sep 2005 17:19:42 -0700 (PDT) +To: stable@kernel.org +From: "David S. Miller" +Subject: [TCP]: Don't over-clamp window in tcp_clamp_window() + +From: Alexey Kuznetsov + +Handle better the case where the sender sends full sized +frames initially, then moves to a mode where it trickles +out small amounts of data at a time. + +This known problem is even mentioned in the comments +above tcp_grow_window() in tcp_input.c, specifically: + +... + * The scheme does not work when sender sends good segments opening + * window and then starts to feed us spagetti. But it should work + * in common situations. Otherwise, we have to rely on queue collapsing. +... + +When the sender gives full sized frames, the "struct sk_buff" overhead +from each packet is small. So we'll advertize a larger window. +If the sender moves to a mode where small segments are sent, this +ratio becomes tilted to the other extreme and we start overrunning +the socket buffer space. + +tcp_clamp_window() tries to address this, but it's clamping of +tp->window_clamp is a wee bit too aggressive for this particular case. + +Fix confirmed by Ion Badulescu. + +Signed-off-by: "David S. Miller" +Signed-off-by: Chris Wright +--- + net/ipv4/tcp_input.c | 2 -- + 1 files changed, 2 deletions(-) + +Index: linux-2.6.13.y/net/ipv4/tcp_input.c +=================================================================== +--- linux-2.6.13.y.orig/net/ipv4/tcp_input.c ++++ linux-2.6.13.y/net/ipv4/tcp_input.c +@@ -350,8 +350,6 @@ static void tcp_clamp_window(struct sock + app_win -= tp->ack.rcv_mss; + app_win = max(app_win, 2U*tp->advmss); + +- if (!ofo_win) +- tp->window_clamp = min(tp->window_clamp, app_win); + tp->rcv_ssthresh = min(tp->window_clamp, 2U*tp->advmss); + } + }