diff options
Diffstat (limited to 'net/ipv4/tcp_cubic.c')
| -rw-r--r-- | net/ipv4/tcp_cubic.c | 12 | 
1 files changed, 4 insertions, 8 deletions
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c index b6ae92a51f5..a9bd8a4828a 100644 --- a/net/ipv4/tcp_cubic.c +++ b/net/ipv4/tcp_cubic.c @@ -304,18 +304,18 @@ static inline void bictcp_update(struct bictcp *ca, u32 cwnd)  		ca->cnt = 1;  } -static void bictcp_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) +static void bictcp_cong_avoid(struct sock *sk, u32 ack, u32 acked)  {  	struct tcp_sock *tp = tcp_sk(sk);  	struct bictcp *ca = inet_csk_ca(sk); -	if (!tcp_is_cwnd_limited(sk, in_flight)) +	if (!tcp_is_cwnd_limited(sk))  		return;  	if (tp->snd_cwnd <= tp->snd_ssthresh) {  		if (hystart && after(ack, ca->end_seq))  			bictcp_hystart_reset(sk); -		tcp_slow_start(tp); +		tcp_slow_start(tp, acked);  	} else {  		bictcp_update(ca, tp->snd_cwnd);  		tcp_cong_avoid_ai(tp, ca->cnt); @@ -408,7 +408,7 @@ static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt_us)  		ratio -= ca->delayed_ack >> ACK_RATIO_SHIFT;  		ratio += cnt; -		ca->delayed_ack = min(ratio, ACK_RATIO_LIMIT); +		ca->delayed_ack = clamp(ratio, 1U, ACK_RATIO_LIMIT);  	}  	/* Some calls are for duplicates without timetamps */ @@ -475,10 +475,6 @@ static int __init cubictcp_register(void)  	/* divide by bic_scale and by constant Srtt (100ms) */  	do_div(cube_factor, bic_scale * 10); -	/* hystart needs ms clock resolution */ -	if (hystart && HZ < 1000) -		cubictcp.flags |= TCP_CONG_RTT_STAMP; -  	return tcp_register_congestion_control(&cubictcp);  }  | 
