All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix limited slow start bug
@ 2007-02-22 18:56 John Heffner
  2007-02-22 21:37 ` Ilpo Järvinen
  2007-02-23  6:42 ` David Miller
  0 siblings, 2 replies; 9+ messages in thread
From: John Heffner @ 2007-02-22 18:56 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

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



[-- Attachment #2: lss_order_bug.patch --]
[-- Type: text/plain, Size: 989 bytes --]

Fix arithmetic order bug in limited slow start.  The subtraction needs to be
done before snd_cwnd is incremented.

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

---
commit 244e7411d99443df7b7ae849ba6ebbec4c2342bc
tree e6d5985a22448f59f8bef393542e1d5497ee5684
parent 97033fa201705e6cfc68ce66f34ede3277c3d645
author John Heffner <jheffner@psc.edu> Thu, 22 Feb 2007 13:54:01 -0500
committer John Heffner <jheffner@psc.edu> Thu, 22 Feb 2007 13:54:01 -0500

 net/ipv4/tcp_cong.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 7fd2910..a0c894f 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -303,9 +303,9 @@ void tcp_slow_start(struct tcp_sock *tp)
 	
 	tp->snd_cwnd_cnt += cnt;
 	while (tp->snd_cwnd_cnt >= tp->snd_cwnd) {
+		tp->snd_cwnd_cnt -= tp->snd_cwnd;
 		if (tp->snd_cwnd < tp->snd_cwnd_clamp)
 			tp->snd_cwnd++;
-		tp->snd_cwnd_cnt -= tp->snd_cwnd;
 	}
 }
 EXPORT_SYMBOL_GPL(tcp_slow_start);

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* Re: [PATCH] fix limited slow start bug
@ 2007-02-25  8:55 Roger While
  2007-02-25 23:43 ` David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Roger While @ 2007-02-25  8:55 UTC (permalink / raw)
  To: netdev; +Cc: davem


Dave M wrote :
>diff --git a/include/linux/tcp.h b/include/linux/tcp.h
>index 415193e..18a468d 100644
>--- a/include/linux/tcp.h
>+++ b/include/linux/tcp.h
>@@ -302,7 +302,7 @@ struct tcp_sock {
>         u32     snd_ssthresh;   /* Slow start size threshold            */
>         u32     snd_cwnd;       /* Sending congestion window            */
>         u16     snd_cwnd_cnt;   /* Linear increase counter              */
>-       u16     snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */
>+       u32     snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */
>         u32     snd_cwnd_used;
>         u32     snd_cwnd_stamp;

Was anything done about size/member alignment of struct tcp_sock per
mail from last year  -
http://marc.theaimsgroup.com/?l=linux-netdev&m=114318857102290&w=2

(I have no idea what current size is)



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

end of thread, other threads:[~2007-02-26  3:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-22 18:56 [PATCH] fix limited slow start bug John Heffner
2007-02-22 21:37 ` Ilpo Järvinen
2007-02-22 21:52   ` John Heffner
2007-02-23  6:53     ` David Miller
2007-02-23  6:42 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2007-02-25  8:55 Roger While
2007-02-25 23:43 ` David Miller
2007-02-26  2:19   ` Arnaldo Carvalho de Melo
2007-02-26  3:02     ` Arnaldo Carvalho de Melo

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.