netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [TCP] Fixed mss in tcp_init_cwnd
@ 2004-09-27  8:08 Herbert Xu
  2004-09-27 15:36 ` Nivedita Singhvi
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Herbert Xu @ 2004-09-27  8:08 UTC (permalink / raw)
  To: David S. Miller, netdev

[-- Attachment #1: Type: text/plain, Size: 360 bytes --]

Hi Dave:

The MSS in tcp_init_cwnd should be the real one instead of the TSO value.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[-- Attachment #2: p --]
[-- Type: text/plain, Size: 492 bytes --]

===== net/ipv4/tcp_input.c 1.73 vs edited =====
--- 1.73/net/ipv4/tcp_input.c	2004-09-13 10:30:58 +10:00
+++ edited/net/ipv4/tcp_input.c	2004-09-27 17:00:32 +10:00
@@ -799,10 +799,10 @@
 	__u32 cwnd = (dst ? dst_metric(dst, RTAX_INITCWND) : 0);
 
 	if (!cwnd) {
-		if (tp->mss_cache > 1460)
+		if (tp->mss_cache_std > 1460)
 			cwnd = 2;
 		else
-			cwnd = (tp->mss_cache > 1095) ? 3 : 4;
+			cwnd = (tp->mss_cache_std > 1095) ? 3 : 4;
 	}
 	return min_t(__u32, cwnd, tp->snd_cwnd_clamp);
 }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [TCP] Fixed mss in tcp_init_cwnd
  2004-09-27  8:08 [TCP] Fixed mss in tcp_init_cwnd Herbert Xu
@ 2004-09-27 15:36 ` Nivedita Singhvi
  2004-09-27 15:43 ` Nivedita Singhvi
  2004-09-27 19:00 ` David S. Miller
  2 siblings, 0 replies; 7+ messages in thread
From: Nivedita Singhvi @ 2004-09-27 15:36 UTC (permalink / raw)
  To: Herbert Xu; +Cc: David S. Miller, netdev

Herbert Xu wrote:
> Hi Dave:
> 
> The MSS in tcp_init_cwnd should be the real one instead of the TSO value.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> 
> Cheers,
> 
> 
> ------------------------------------------------------------------------
> 
> ===== net/ipv4/tcp_input.c 1.73 vs edited =====
> --- 1.73/net/ipv4/tcp_input.c	2004-09-13 10:30:58 +10:00
> +++ edited/net/ipv4/tcp_input.c	2004-09-27 17:00:32 +10:00
> @@ -799,10 +799,10 @@
>  	__u32 cwnd = (dst ? dst_metric(dst, RTAX_INITCWND) : 0);
>  
>  	if (!cwnd) {
> -		if (tp->mss_cache > 1460)
> +		if (tp->mss_cache_std > 1460)
>  			cwnd = 2;
>  		else
> -			cwnd = (tp->mss_cache > 1095) ? 3 : 4;
> +			cwnd = (tp->mss_cache_std > 1095) ? 3 : 4;
>  	}
>  	return min_t(__u32, cwnd, tp->snd_cwnd_clamp);
>  }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [TCP] Fixed mss in tcp_init_cwnd
  2004-09-27  8:08 [TCP] Fixed mss in tcp_init_cwnd Herbert Xu
  2004-09-27 15:36 ` Nivedita Singhvi
@ 2004-09-27 15:43 ` Nivedita Singhvi
  2004-09-27 19:00 ` David S. Miller
  2 siblings, 0 replies; 7+ messages in thread
From: Nivedita Singhvi @ 2004-09-27 15:43 UTC (permalink / raw)
  To: Herbert Xu; +Cc: David S. Miller, netdev

Herbert Xu wrote:

> ===== net/ipv4/tcp_input.c 1.73 vs edited =====
> --- 1.73/net/ipv4/tcp_input.c	2004-09-13 10:30:58 +10:00
> +++ edited/net/ipv4/tcp_input.c	2004-09-27 17:00:32 +10:00
> @@ -799,10 +799,10 @@
>  	__u32 cwnd = (dst ? dst_metric(dst, RTAX_INITCWND) : 0);
>  
>  	if (!cwnd) {
> -		if (tp->mss_cache > 1460)
> +		if (tp->mss_cache_std > 1460)
>  			cwnd = 2;
>  		else
> -			cwnd = (tp->mss_cache > 1095) ? 3 : 4;
> +			cwnd = (tp->mss_cache_std > 1095) ? 3 : 4;
>  	}
>  	return min_t(__u32, cwnd, tp->snd_cwnd_clamp);
>  }

Helps to send after finishing commenting..

I fixed this locally but was still seeing poor throughput,
though it does correct how many we initially/on restart send out.
Thought this was fixed in the bk tree?

thanks,
Nivedita

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [TCP] Fixed mss in tcp_init_cwnd
  2004-09-27  8:08 [TCP] Fixed mss in tcp_init_cwnd Herbert Xu
  2004-09-27 15:36 ` Nivedita Singhvi
  2004-09-27 15:43 ` Nivedita Singhvi
@ 2004-09-27 19:00 ` David S. Miller
  2004-09-27 22:02   ` Herbert Xu
  2 siblings, 1 reply; 7+ messages in thread
From: David S. Miller @ 2004-09-27 19:00 UTC (permalink / raw)
  To: Herbert Xu; +Cc: netdev

On Mon, 27 Sep 2004 18:08:28 +1000
Herbert Xu <herbert@gondor.apana.org.au> wrote:

> The MSS in tcp_init_cwnd should be the real one instead of the TSO value.

This happens too early in the connections lifetime
to make a difference for anything.

It happens on the first move to ESTABLISHED state, and
therefore by definition before we try to send any data
on the connection.

You're barking up the wrong tree in the search for these
TSO problems.  Instead, I'd recommend looking seriously at
the tcp_clean_rtx_queue() partial ack'ing stuff I spoke
about yesterday.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [TCP] Fixed mss in tcp_init_cwnd
  2004-09-27 19:00 ` David S. Miller
@ 2004-09-27 22:02   ` Herbert Xu
  2004-09-27 23:04     ` David S. Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Herbert Xu @ 2004-09-27 22:02 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

On Mon, Sep 27, 2004 at 12:00:31PM -0700, David S. Miller wrote:
> On Mon, 27 Sep 2004 18:08:28 +1000
> Herbert Xu <herbert@gondor.apana.org.au> wrote:
> 
> > The MSS in tcp_init_cwnd should be the real one instead of the TSO value.
> 
> This happens too early in the connections lifetime
> to make a difference for anything.

I know.  That's why I put it in a different thread.

IMHO we should still fix it though at least for consistency.
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [TCP] Fixed mss in tcp_init_cwnd
  2004-09-27 22:02   ` Herbert Xu
@ 2004-09-27 23:04     ` David S. Miller
  2004-09-27 23:09       ` Herbert Xu
  0 siblings, 1 reply; 7+ messages in thread
From: David S. Miller @ 2004-09-27 23:04 UTC (permalink / raw)
  To: Herbert Xu; +Cc: netdev

On Tue, 28 Sep 2004 08:02:40 +1000
Herbert Xu <herbert@gondor.apana.org.au> wrote:

> On Mon, Sep 27, 2004 at 12:00:31PM -0700, David S. Miller wrote:
> > On Mon, 27 Sep 2004 18:08:28 +1000
> > Herbert Xu <herbert@gondor.apana.org.au> wrote:
> > 
> > > The MSS in tcp_init_cwnd should be the real one instead of the TSO value.
> > 
> > This happens too early in the connections lifetime
> > to make a difference for anything.
> 
> I know.  That's why I put it in a different thread.
> 
> IMHO we should still fix it though at least for consistency.

That early on in the connection, it should be setting both
values, right?  If so your patch still needs a tweak. :)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [TCP] Fixed mss in tcp_init_cwnd
  2004-09-27 23:04     ` David S. Miller
@ 2004-09-27 23:09       ` Herbert Xu
  0 siblings, 0 replies; 7+ messages in thread
From: Herbert Xu @ 2004-09-27 23:09 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

On Mon, Sep 27, 2004 at 04:04:54PM -0700, David S. Miller wrote:
>
> > IMHO we should still fix it though at least for consistency.
> 
> That early on in the connection, it should be setting both
> values, right?  If so your patch still needs a tweak. :)

I'm not saying that this patch makes any difference in terms of
run-time results.  At that point both mss_cache and mss_cache_std
should contain the same values.

However, since the value that's intended here is the physical MSS,
we should use mss_cache_std for the sake of consistency.

The only reason I spotted this at all is because I grepped -w for
mss_cache and found this function as one of the very few users.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-09-27 23:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-27  8:08 [TCP] Fixed mss in tcp_init_cwnd Herbert Xu
2004-09-27 15:36 ` Nivedita Singhvi
2004-09-27 15:43 ` Nivedita Singhvi
2004-09-27 19:00 ` David S. Miller
2004-09-27 22:02   ` Herbert Xu
2004-09-27 23:04     ` David S. Miller
2004-09-27 23:09       ` Herbert Xu

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