diff options
Diffstat (limited to 'net/ipv4/tcp_cong.c')
| -rw-r--r-- | net/ipv4/tcp_cong.c | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index d694088214cd..7a5ae50c80c8 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c @@ -83,7 +83,7 @@ int tcp_register_congestion_control(struct tcp_congestion_ops *ca)  		ret = -EEXIST;  	} else {  		list_add_tail_rcu(&ca->list, &tcp_cong_list); -		pr_info("%s registered\n", ca->name); +		pr_debug("%s registered\n", ca->name);  	}  	spin_unlock(&tcp_cong_list_lock); @@ -378,6 +378,12 @@ EXPORT_SYMBOL_GPL(tcp_slow_start);   */  void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w, u32 acked)  { +	/* If credits accumulated at a higher w, apply them gently now. */ +	if (tp->snd_cwnd_cnt >= w) { +		tp->snd_cwnd_cnt = 0; +		tp->snd_cwnd++; +	} +  	tp->snd_cwnd_cnt += acked;  	if (tp->snd_cwnd_cnt >= w) {  		u32 delta = tp->snd_cwnd_cnt / w;  |