* [TCP] window reduction fix
@ 2006-07-05 16:24 Angelo P. Castellani
2006-07-05 19:17 ` John Heffner
0 siblings, 1 reply; 3+ messages in thread
From: Angelo P. Castellani @ 2006-07-05 16:24 UTC (permalink / raw)
To: netdev; +Cc: vacirca, Andrea Baiocchi
[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]
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 <angelo.castellani+lkml@gmail.com>
Date: 5-lug-2006 16.22
Subject: [TCP] window reduction fix
To: netdev <netdev@vger.kernel.org>
Cc: Francesco Vacirca <francesco@net.infocom.uniroma1.it>, Andrea
Baiocchi <andrea.baiocchi@uniroma1.it>
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
[-- Attachment #2: fix_win_reduction.diff --]
[-- Type: text/x-patch, Size: 1096 bytes --]
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [TCP] window reduction fix
2006-07-05 16:24 [TCP] window reduction fix Angelo P. Castellani
@ 2006-07-05 19:17 ` John Heffner
2006-07-06 3:50 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: John Heffner @ 2006-07-05 19:17 UTC (permalink / raw)
To: Angelo P. Castellani; +Cc: netdev, vacirca, Andrea Baiocchi
Hm, wouldn't that violate the TCP spec?
-John
Angelo P. Castellani wrote:
> 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 <angelo.castellani+lkml@gmail.com>
> Date: 5-lug-2006 16.22
> Subject: [TCP] window reduction fix
> To: netdev <netdev@vger.kernel.org>
> Cc: Francesco Vacirca <francesco@net.infocom.uniroma1.it>, Andrea
> Baiocchi <andrea.baiocchi@uniroma1.it>
>
>
> 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
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [TCP] window reduction fix
2006-07-05 19:17 ` John Heffner
@ 2006-07-06 3:50 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2006-07-06 3:50 UTC (permalink / raw)
To: jheffner; +Cc: angelo.castellani, netdev, vacirca, andrea.baiocchi
From: John Heffner <jheffner@psc.edu>
Date: Wed, 05 Jul 2006 15:17:23 -0400
> Hm, wouldn't that violate the TCP spec?
Yes, this cannot be right. One cannot shrink the offered
window under any circumstance.
If we over-advertised the window, that isn't something we
can "clean up" like this.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-07-06 3:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-05 16:24 [TCP] window reduction fix Angelo P. Castellani
2006-07-05 19:17 ` John Heffner
2006-07-06 3:50 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).