@ -87,7 +87,8 @@ struct bictcp {
u32 last_cwnd ; /* the last snd_cwnd */
u32 last_time ; /* time when updated last_cwnd */
u32 bic_origin_point ; /* origin point of bic function */
u32 bic_K ; /* time to origin point from the beginning of the current epoch */
u32 bic_K ; /* time to origin point
from the beginning of the current epoch */
u32 delay_min ; /* min delay (msec << 3) */
u32 epoch_start ; /* beginning of an epoch */
u32 ack_cnt ; /* number of acks */
@ -219,7 +220,7 @@ static inline void bictcp_update(struct bictcp *ca, u32 cwnd)
ca - > last_time = tcp_time_stamp ;
if ( ca - > epoch_start = = 0 ) {
ca - > epoch_start = tcp_time_stamp ; /* record the beginning of an epoch */
ca - > epoch_start = tcp_time_stamp ; /* record beginning */
ca - > ack_cnt = 1 ; /* start counting */
ca - > tcp_cwnd = cwnd ; /* syn with cubic */
@ -285,6 +286,7 @@ static inline void bictcp_update(struct bictcp *ca, u32 cwnd)
/* TCP Friendly */
if ( tcp_friendliness ) {
u32 scale = beta_scale ;
delta = ( cwnd * scale ) > > 3 ;
while ( ca - > ack_cnt > delta ) { /* update tcp cwnd */
ca - > ack_cnt - = delta ;
@ -320,7 +322,6 @@ static void bictcp_cong_avoid(struct sock *sk, u32 ack, u32 acked)
bictcp_update ( ca , tp - > snd_cwnd ) ;
tcp_cong_avoid_ai ( tp , ca - > cnt ) ;
}
}
static u32 bictcp_recalc_ssthresh ( struct sock * sk )
@ -452,7 +453,8 @@ static int __init cubictcp_register(void)
* based on SRTT of 100 ms
*/
beta_scale = 8 * ( BICTCP_BETA_SCALE + beta ) / 3 / ( BICTCP_BETA_SCALE - beta ) ;
beta_scale = 8 * ( BICTCP_BETA_SCALE + beta ) / 3
/ ( BICTCP_BETA_SCALE - beta ) ;
cube_rtt_scale = ( bic_scale * 10 ) ; /* 1024*c/rtt */