I forward the message because it seems hasn't get through to mailing
list (removing references to a word that seems blocking the message).

The previous message "[TCP] window update during recovery (continuing
on window reduction)" references this one

Regards,
Angelo P. Castellani
---------- Forwarded message ----------
From: Angelo P. Castellani <[EMAIL PROTECTED]>
Date: 5-lug-2006 16.22
Subject: [TCP] window reduction fix
To: netdev <netdev@vger.kernel.org>
Cc: Francesco Vacirca <[EMAIL PROTECTED]>, Andrea
Baiocchi <[EMAIL PROTECTED]>


When the receiver buffer is filling up, it should reduce the allowed
receive window value piggybacked in the acks, according to the free
space actually left in the buffer.

So it should send in the tcp acks returning to the sender a window
field with a value not higher than the space available to store
incoming segments.

The attached patch addresses this issue, requests to the sender a
window size not bigger than the free space for incoming data.

Regards,
Angelo P. Castellani
diff -urd linux-2.6.16-orig/net/ipv4/tcp_output.c linux-2.6.16-winreduction/net/ipv4/tcp_output.c
--- linux-2.6.16-orig/net/ipv4/tcp_output.c	2006-05-16 14:53:02.000000000 +0200
+++ linux-2.6.16-winreduction/net/ipv4/tcp_output.c	2006-07-05 16:35:55.000000000 +0200
@@ -218,18 +218,15 @@
 	u32 cur_win = tcp_receive_window(tp);
 	u32 new_win = __tcp_select_window(sk);
 
-	/* Never shrink the offered window */
-	if(new_win < cur_win) {
-		/* Danger Will Robinson!
-		 * Don't update rcv_wup/rcv_wnd here or else
-		 * we will not be able to advertise a zero
-		 * window in time.  --DaveM
-		 *
-		 * Relax Will Robinson.
-		 */
-		new_win = cur_win;
-	}
-	tp->rcv_wnd = new_win;
+	/* Danger Will Robinson!
+	 * Don't update rcv_wup/rcv_wnd here or else
+	 * we will not be able to advertise a zero
+	 * window in time.  --DaveM
+	 *
+	 * Relax Will Robinson.
+	 */
+	// Anyway let's send the right window reduction to the sender.
+	tp->rcv_wnd = max( new_win, cur_win );
 	tp->rcv_wup = tp->rcv_nxt;
 
 	/* Make sure we do not exceed the maximum possible




Reply via email to