netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Heffner <jheffner@psc.edu>
To: "Angelo P. Castellani" <angelo.castellani@gmail.com>
Cc: netdev <netdev@vger.kernel.org>,
	vacirca@infocom.uniroma1.it,
	Andrea Baiocchi <andrea.baiocchi@uniroma1.it>
Subject: Re: [TCP] window reduction fix
Date: Wed, 05 Jul 2006 15:17:23 -0400	[thread overview]
Message-ID: <44AC1043.10603@psc.edu> (raw)
In-Reply-To: <8dd26e70607050924q48954801h8fd4c32efa37929@mail.gmail.com>

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
> 
> 
> 
> 


  reply	other threads:[~2006-07-05 19:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-05 16:24 [TCP] window reduction fix Angelo P. Castellani
2006-07-05 19:17 ` John Heffner [this message]
2006-07-06  3:50   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44AC1043.10603@psc.edu \
    --to=jheffner@psc.edu \
    --cc=andrea.baiocchi@uniroma1.it \
    --cc=angelo.castellani@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vacirca@infocom.uniroma1.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).