Subject: [PATCH 1/5] tcp: set default congestion control when no sysctl

From: Stephen Hemminger <[email-masked]>
Date: Tue, 31 Oct 2006 15:01:41 -0800

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 <[email-masked]>

---
 net/ipv4/sysctl_net_ipv4.c |    7 -------
 net/ipv4/tcp_cong.c        |    8 ++++++++
 2 files changed, 8 insertions(+), 7 deletions(-)

--- tcp.orig/net/ipv4/sysctl_net_ipv4.c	2006-10-31 12:22:43.000000000 -0800
+++ tcp/net/ipv4/sysctl_net_ipv4.c	2006-10-31 12:22:56.000000000 -0800
@@ -129,13 +129,6 @@
 	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_name	= NET_IPV4_TCP_TIMESTAMPS,
--- tcp.orig/net/ipv4/tcp_cong.c	2006-10-31 12:22:33.000000000 -0800
+++ tcp/net/ipv4/tcp_cong.c	2006-10-31 12:23:42.000000000 -0800
@@ -131,6 +131,14 @@
 	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)
 {

--
Stephen Hemminger <[email-masked]>