netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: bert hubert <bert.hubert@netherlabs.nl>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: [PATCH] tcp: set congestion default through Kconfig
Date: Mon, 18 Sep 2006 21:41:04 -0700	[thread overview]
Message-ID: <20060918214104.3824a2e2@localhost.localdomain> (raw)
In-Reply-To: <20060918195224.GA26585@outpost.ds9a.nl>

Bert's attempt was noble
It showed your desire for the truth
A simple path exists

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
---
 net/ipv4/Kconfig           |   39 +++++++++++++++++++++++++++++++++++++--
 net/ipv4/sysctl_net_ipv4.c |    7 +++++++
 net/ipv4/tcp_cong.c        |    2 +-
 3 files changed, 45 insertions(+), 3 deletions(-)

diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index 90f9136..e922c3a 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -573,12 +573,47 @@ config TCP_CONG_VENO
 	loss packets.
 	See http://www.ntu.edu.sg/home5/ZHOU0022/papers/CPFu03a.pdf
 
+choice
+	prompt "Default TCP congestion control"
+	default DEFAULT_BIC
+	help
+	  Select the TCP congestion control that will be used by default
+	  for all connections.
+
+	config DEFAULT_BIC
+		bool "Bic" if TCP_CONG_BIC=y
+
+	config DEFAULT_CUBIC
+		bool "Cubic" if TCP_CONG_CUBIC=y
+
+	config DEFAULT_HTCP
+		bool "Htcp" if TCP_CONG_HTCP=y
+
+	config DEFAULT_VEGAS
+		bool "Vegas" if TCP_CONG_VEGAS=y
+
+	config DEFAULT_WESTWOOD
+		bool "Westwood" if TCP_CONG_WESTWOOD=y
+
+	config DEFAULT_RENO
+		bool "Reno"
+
+endchoice
+
 endmenu
 
-config TCP_CONG_BIC
-	tristate
+config DEFAULT_BIC
 	depends on !TCP_CONG_ADVANCED
 	default y
 
+config DEFAULT_TCP_CONG
+	string
+	default "bic" if DEFAULT_BIC
+	default "cubic" if DEFAULT_CUBIC
+	default "htcp" if DEFAULT_HTCP
+	default "vegas" if DEFAULT_VEGAS
+	default "westwood" if DEFAULT_WESTWOOD
+	default "reno" if DEFAULT_RENO
+
 source "net/ipv4/ipvs/Kconfig"
 
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 19b2071..52b6481 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -129,6 +129,13 @@ static int sysctl_tcp_congestion_control
 	return ret;
 }
 
+static __init void tcp_congestion_default(void)
+{
+	tcp_set_default_congestion_control(CONFIG_DEFAULT_TCP_CONG)
+}
+
+late_initcall(tcp_congestion_default);
+
 
 ctl_table ipv4_table[] = {
         {
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 7ff2e42..af0aca1 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -48,7 +48,7 @@ int tcp_register_congestion_control(stru
 		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);
-- 
1.4.1


  reply	other threads:[~2006-09-19  4:41 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-16 22:19 2.6.18-rc[67] crashes in TCP ack handling bert hubert
2006-09-16 23:32 ` Stephen Hemminger
2006-09-17 10:11   ` bert hubert
2006-09-17 11:53     ` Stephen Hemminger
     [not found]       ` <20060917122153.GA2932@outpost.ds9a.nl>
2006-09-17 13:11         ` tcp congestion policy selection link order fragile Stephen Hemminger
2006-09-17 14:51           ` bert hubert
2006-09-18 23:41             ` Stephen Hemminger
2006-09-18  8:51         ` David Miller
2006-09-18  9:59           ` bert hubert
2006-09-18 14:06             ` David Miller
2006-09-18 15:40               ` bert hubert
2006-09-18 18:53                 ` David Miller
2006-09-18 19:52                   ` bert hubert
2006-09-19  4:41                     ` Stephen Hemminger [this message]
2006-09-19  5:08                       ` [PATCH] tcp: set congestion default through Kconfig Ian McDonald
2006-09-19 10:03                       ` Andi Kleen
2006-09-19 12:35                         ` Hagen Paul Pfeifer
2006-09-19 16:10                           ` David Miller
2006-09-19 17:28                             ` Stephen Hemminger
2006-09-19 15:29                         ` Stephen Hemminger
2006-09-19 19:29                       ` David Miller
2006-09-19 19:30                       ` David Miller
2006-09-19 19:33                       ` David Miller
2006-09-19 19:39                         ` Stephen Hemminger
2006-09-19 20:41                         ` [PATCH] tcp: set congestion default through Kconfig (v2) Stephen Hemminger
2006-09-19 21:20                           ` David Miller
2006-09-19 21:32                             ` [PATCH] tcp: simpler bic default Stephen Hemminger
2006-09-19 21:43                               ` bert hubert
2006-09-19 22:44                                 ` David Miller
2006-09-19 23:02                                   ` Stephen Hemminger
2006-09-19 23:04                                     ` David Miller
2006-09-19 23:23                                       ` Stephen Hemminger
2006-09-20  8:17                                         ` bert hubert
2006-09-20 20:28                                           ` [PATCH] tcp: default congestion control menu Stephen Hemminger
2006-09-25  3:12                                             ` David Miller
2006-09-20 20:32                                           ` [PATCH] tcp: make cubic the default Stephen Hemminger
2006-09-23 11:14                                             ` tested: " bert hubert
2006-09-23 20:00                                               ` David Miller
2006-09-25  3:13                                             ` David Miller
2006-09-19 21:38                             ` [PATCH] tcp: set congestion default through Kconfig (v2) bert hubert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060918214104.3824a2e2@localhost.localdomain \
    --to=shemminger@osdl.org \
    --cc=bert.hubert@netherlabs.nl \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).