]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/tcp_cong.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / net / ipv4 / tcp_cong.c
index 857eefc52aab900c6a52f759f04d028f0af27516..1e2982f4acd414733e4d31f51a1b2b1fab56a2e6 100644 (file)
@@ -6,7 +6,6 @@
  * Copyright (C) 2005 Stephen Hemminger <shemminger@osdl.org>
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/mm.h>
 #include <linux/types.h>
@@ -49,7 +48,7 @@ int tcp_register_congestion_control(struct tcp_congestion_ops *ca)
                printk(KERN_NOTICE "TCP %s already registered\n", ca->name);
                ret = -EEXIST;
        } else {
-               list_add_rcu(&ca->list, &tcp_cong_list);
+               list_add_tail_rcu(&ca->list, &tcp_cong_list);
                printk(KERN_INFO "TCP %s registered\n", ca->name);
        }
        spin_unlock(&tcp_cong_list_lock);
@@ -132,6 +131,14 @@ int tcp_set_default_congestion_control(const char *name)
        return ret;
 }
 
+/* Set default value from kernel configuration at bootup */
+static int __init tcp_congestion_default(void)
+{
+       return tcp_set_default_congestion_control(CONFIG_DEFAULT_TCP_CONG);
+}
+late_initcall(tcp_congestion_default);
+
+
 /* Get current default congestion control */
 void tcp_get_default_congestion_control(char *name)
 {
@@ -190,7 +197,7 @@ void tcp_slow_start(struct tcp_sock *tp)
                        return;
 
                /* We MAY increase by 2 if discovered delayed ack */
-               if (sysctl_tcp_abc > 1 && tp->bytes_acked > 2*tp->mss_cache) {
+               if (sysctl_tcp_abc > 1 && tp->bytes_acked >= 2*tp->mss_cache) {
                        if (tp->snd_cwnd < tp->snd_cwnd_clamp)
                                tp->snd_cwnd++;
                }