From 1aa561c7dd019a6723deba2e0d408638e9172f01 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <shemminger@osdl.org>
Date: Fri, 7 Oct 2005 16:43:51 -0700
Subject: [PATCH] [PATCH] BIC coding bug in Linux 2.6.13

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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git linux-2.6.13.1/net/ipv4/tcp_bic.c linux-2.6.13.1/net/ipv4/tcp_bic.c
index ec38d45..a721085 100644
--- linux-2.6.13.1/net/ipv4/tcp_bic.c
+++ linux-2.6.13.1/net/ipv4/tcp_bic.c
@@ -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;

From 75be5e47479abaac50295fa846cb91edb0424c3a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <shemminger@osdl.org>
Date: Wed, 9 Nov 2005 10:22:10 -0800
Subject: [PATCH] [PATCH] tcp: BIC max increment too large

The max growth of BIC TCP is too large. Original code was based on
BIC 1.0 and the default there was 32. Later code (2.6.13) included
compensation for delayed acks, and should have reduced the default
value to 16; since normally TCP gets one ack for every two packets sent.

The current value of 32 makes BIC too aggressive and unfair to other
flows.

Submitted-by: Injong Rhee <rhee@eos.ncsu.edu>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 net/ipv4/tcp_bic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git linux-2.6.13.1/net/ipv4/tcp_bic.c linux-2.6.13.1/net/ipv4/tcp_bic.c
index 6d80e06..ae35e06 100644
--- linux-2.6.13.1/net/ipv4/tcp_bic.c
+++ linux-2.6.13.1/net/ipv4/tcp_bic.c
@@ -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;
