--- tcp/linux/tcp_cubic.c.old	2006-11-30 16:04:42.000000000 -0500
+++ tcp/linux/tcp_cubic.c	2006-11-30 16:06:12.000000000 -0500
@@ -197,7 +197,7 @@ static inline void cbictcp_update(struct
          */
 
 	/* change the unit from HZ to cbictcp_HZ */
-        t = ((tcp_time_stamp + ca->delay_min - ca->epoch_start)
+        t = ((tcp_time_stamp + (ca->delay_min>>3) - ca->epoch_start)
 	     << BICTCP_HZ) / HZ;
 
         if (t < ca->bic_K)		/* t - K */
@@ -266,7 +266,7 @@ static inline void measure_delay(struct 
 	    (s32)(tcp_time_stamp - ca->epoch_start) < HZ)
 		return;
 
-	delay = tcp_time_stamp - tp->rx_opt.rcv_tsecr;
+	delay = (tcp_time_stamp - tp->rx_opt.rcv_tsecr)<<3;
 	if (delay == 0)
 		delay = 1;
 
@@ -379,7 +379,7 @@ static int __init cubictcp_register(void
 
 	beta_scale = 8*(BICTCP_BETA_SCALE+cbeta)/ 3 / (BICTCP_BETA_SCALE - cbeta);
 
-	cube_rtt_scale = (cbic_scale << 3) / 10;	/* 1024*c/rtt */
+	cube_rtt_scale = cbic_scale * 10;	/* 1024*c/rtt */
 
 	/* calculate the "K" for (wmax-cwnd) = c/rtt * K^3
 	 *  so K = cubic_root( (wmax-cwnd)*rtt/c )


