Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35546
b: refs/heads/master
c: 3d2573f
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Sep 25, 2006
1 parent fa61ae2 commit e860b52
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b7c714ec27584b18279b741b6043016f8adb9de
refs/heads/master: 3d2573f7ebe507e372a23cdd3c8b03305d6e90aa
45 changes: 40 additions & 5 deletions trunk/net/ipv4/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ config INET_TCP_DIAG
depends on INET_DIAG
def_tristate INET_DIAG

config TCP_CONG_ADVANCED
menuconfig TCP_CONG_ADVANCED
bool "TCP: advanced congestion control"
---help---
Support for selection of various TCP congestion control
Expand All @@ -459,9 +459,7 @@ config TCP_CONG_ADVANCED

If unsure, say N.

# TCP Reno is builtin (required as fallback)
menu "TCP congestion control"
depends on TCP_CONG_ADVANCED
if TCP_CONG_ADVANCED

config TCP_CONG_BIC
tristate "Binary Increase Congestion (BIC) control"
Expand Down Expand Up @@ -574,12 +572,49 @@ config TCP_CONG_VENO
loss packets.
See http://www.ntu.edu.sg/home5/ZHOU0022/papers/CPFu03a.pdf

endmenu
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

endif

config TCP_CONG_BIC
tristate
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
default "bic"

source "net/ipv4/ipvs/Kconfig"

6 changes: 6 additions & 0 deletions trunk/net/ipv4/sysctl_net_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name,
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[] = {
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/tcp_cong.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,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);
Expand Down

0 comments on commit e860b52

Please sign in to comment.