]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] BIC coding bug in Linux 2.6.13
authorStephen Hemminger <shemminger@osdl.org>
Fri, 7 Oct 2005 23:43:51 +0000 (16:43 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 10 Oct 2005 18:50:54 +0000 (11:50 -0700)
Please consider this change for 2.6.13-stable   Since BIC is
the default congestion control algorithm, this fix is quite
important.

Missing parenthesis in causes BIC to be slow in increasing congestion
window.

Spotted by Injong Rhee.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/tcp_bic.c

index ec38d45d6649633178c8d541a34499349443c8a4..a721085c134c96ba3196e16b5f969175de8482cf 100644 (file)
@@ -136,7 +136,7 @@ static inline void bictcp_update(struct bictcp *ca, u32 cwnd)
                else if (cwnd < ca->last_max_cwnd + max_increment*(BICTCP_B-1))
                        /* slow start */
                        ca->cnt = (cwnd * (BICTCP_B-1))
-                               / cwnd-ca->last_max_cwnd;
+                               / (cwnd - ca->last_max_cwnd);
                else
                        /* linear increase */
                        ca->cnt = cwnd / max_increment;