All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Heffner <jheffner@psc.edu>
To: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
Cc: Herbert Xu <herbert@gondor.apana.org.au>, netdev@vger.kernel.org
Subject: Re: [RFC PATCH 2/2] [TCP] MTUprobe: Cleanup send queue check (no need to loop)
Date: Wed, 21 Nov 2007 11:25:07 -0500	[thread overview]
Message-ID: <47445BE3.6030708@psc.edu> (raw)
In-Reply-To: <1195660888907-git-send-email-ilpo.jarvinen@helsinki.fi>

Ilpo Järvinen wrote:
> The original code has striking complexity to perform a query
> which can be reduced to a very simple compare.
> 
> FIN seqno may be included to write_seq but it should not make
> any significant difference here compared to skb->len which was
> used previously. One won't end up there with SYN still queued.
> 
> Use of write_seq check guarantees that there's a valid skb in
> send_head so I removed the extra check.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>

Acked-by: John Heffner <jheffner@psc.edu>


> ---
>  net/ipv4/tcp_output.c |    7 +------
>  1 files changed, 1 insertions(+), 6 deletions(-)
> 
> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> index ff22ce8..1822ce6 100644
> --- a/net/ipv4/tcp_output.c
> +++ b/net/ipv4/tcp_output.c
> @@ -1315,12 +1315,7 @@ static int tcp_mtu_probe(struct sock *sk)
>  	}
>  
>  	/* Have enough data in the send queue to probe? */
> -	len = 0;
> -	if ((skb = tcp_send_head(sk)) == NULL)
> -		return -1;
> -	while ((len += skb->len) < size_needed && !tcp_skb_is_last(sk, skb))
> -		skb = tcp_write_queue_next(sk, skb);
> -	if (len < size_needed)
> +	if (tp->write_seq - tp->snd_nxt < size_needed)
>  		return -1;
>  
>  	if (tp->snd_wnd < size_needed)


  reply	other threads:[~2007-11-21 16:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-21 16:01 [RFC PATCH 0/2]: TCP MTUprobe fixes Ilpo Järvinen
2007-11-21 16:01 ` [RFC PATCH 1/2] [TCP]: MTUprobe: receiver window & data available checks fixed Ilpo Järvinen
2007-11-21 16:01   ` [RFC PATCH 2/2] [TCP] MTUprobe: Cleanup send queue check (no need to loop) Ilpo Järvinen
2007-11-21 16:25     ` John Heffner [this message]
2007-11-22 11:00     ` Herbert Xu
2007-11-21 16:25   ` [RFC PATCH 1/2] [TCP]: MTUprobe: receiver window & data available checks fixed John Heffner
2007-11-22  9:27   ` Herbert Xu
2007-11-22 13:11     ` Ilpo Järvinen
2007-11-22 15:16       ` Herbert Xu

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=47445BE3.6030708@psc.edu \
    --to=jheffner@psc.edu \
    --cc=herbert@gondor.apana.org.au \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.