diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-06-02 17:51:08 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-06-02 17:51:08 -0700 |
commit | fb80a6e1a521eb298edb4365429d533dd39427fa (patch) | |
tree | c832c3544aea353aaf73b5536e9ac1579d8fbfaf /net/ipv4/tcp_highspeed.c | |
parent | 0f3262157899efd422228713a521504bdf0c991e (diff) | |
download | linux-fb80a6e1a521eb298edb4365429d533dd39427fa.tar.gz linux-fb80a6e1a521eb298edb4365429d533dd39427fa.tar.bz2 linux-fb80a6e1a521eb298edb4365429d533dd39427fa.zip |
[TCP] tcp_highspeed: Fix problem observed by Xiaoliang (David) Wei
When snd_cwnd is smaller than 38 and the connection is in
congestion avoidance phase (snd_cwnd > snd_ssthresh), the snd_cwnd
seems to stop growing.
The additive increase was confused because C array's are 0 based.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_highspeed.c')
-rw-r--r-- | net/ipv4/tcp_highspeed.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_highspeed.c b/net/ipv4/tcp_highspeed.c index b72fa55dfb84..ba7c63ca5bb1 100644 --- a/net/ipv4/tcp_highspeed.c +++ b/net/ipv4/tcp_highspeed.c @@ -135,7 +135,8 @@ static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt, /* Do additive increase */ if (tp->snd_cwnd < tp->snd_cwnd_clamp) { - tp->snd_cwnd_cnt += ca->ai; + /* cwnd = cwnd + a(w) / cwnd */ + tp->snd_cwnd_cnt += ca->ai + 1; if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { tp->snd_cwnd_cnt -= tp->snd_cwnd; tp->snd_cwnd++; |