]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/tcp_bic.c
[TCP]: BIC max increment too large
[linux-2.6-omap-h63xx.git] / net / ipv4 / tcp_bic.c
index b940346de4e7cbc5bc724245992c07f6c0e41120..ae35e06090476a88bc9b6b6a4ba963d1aff9af9b 100644 (file)
@@ -27,7 +27,7 @@
                                          */
 
 static int fast_convergence = 1;
-static int max_increment = 32;
+static int max_increment = 16;
 static int low_window = 14;
 static int beta = 819;         /* = 819/1024 (BICTCP_BETA_SCALE) */
 static int low_utilization_threshold = 153;
@@ -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;