]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/ipv4/tcp_cong.c
Merge branches 'acpi-dock', 'acpi-ec' and 'acpi-scan'
[karo-tx-linux.git] / net / ipv4 / tcp_cong.c
index d694088214cd87fa50e413730402499610c546e6..7a5ae50c80c87add1e46e8255f0837796d2e4947 100644 (file)
@@ -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;