浏览代码

[TCP]: Set default congestion control when no sysctl.

The setting of the default congestion control was buried in
the sysctl code so it would not be done properly if SYSCTL was
not enabled.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger 18 年之前
父节点
当前提交
b1736a7140
共有 2 个文件被更改,包括 8 次插入7 次删除
  1. 0 7
      net/ipv4/sysctl_net_ipv4.c
  2. 8 0
      net/ipv4/tcp_cong.c

+ 0 - 7
net/ipv4/sysctl_net_ipv4.c

@@ -129,13 +129,6 @@ static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name,
 	return ret;
 	return ret;
 }
 }
 
 
-static int __init tcp_congestion_default(void)
-{
-	return tcp_set_default_congestion_control(CONFIG_DEFAULT_TCP_CONG);
-}
-
-late_initcall(tcp_congestion_default);
-
 ctl_table ipv4_table[] = {
 ctl_table ipv4_table[] = {
         {
         {
 		.ctl_name	= NET_IPV4_TCP_TIMESTAMPS,
 		.ctl_name	= NET_IPV4_TCP_TIMESTAMPS,

+ 8 - 0
net/ipv4/tcp_cong.c

@@ -131,6 +131,14 @@ int tcp_set_default_congestion_control(const char *name)
 	return ret;
 	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 */
 /* Get current default congestion control */
 void tcp_get_default_congestion_control(char *name)
 void tcp_get_default_congestion_control(char *name)
 {
 {