From 5992a37eade475d1aeff90feab2d91fe7a1b9dce Mon Sep 17 00:00:00 2001 From: Jeremy Chadwick Date: Thu, 19 Jan 2017 23:05:36 -0800 Subject: [PATCH] Remove TCP Vegas support (MIPS) In commit 6504755, the TCP Vegas GUI option was hidden. The intention was to remove support for it entirely. This commit removes all support for Vegas, but retains the kernel module (CONFIG_TCP_CONG_VEGAS=m) for extreme tech-savvy users who truly have a need/want for it. Said users can use something like the following in their Scripts/Init section (default values): modprobe tcp_vegas alpha=2 beta=6 gamma=2 echo vegas > /proc/sys/net/ipv4/tcp_congestion_control NVRAM variables ne_vegas, ne_valpha, ne_vbeta, and ne_vgamma will no longer be used. They can be removed through nvram unset+commit, or more commonly through a thorough NVRAM erase. --- release/src/router/httpd/tomato.c | 4 ---- release/src/router/nvram/defaults.c | 6 ------ release/src/router/rc/qos.c | 24 ------------------------ release/src/router/www/qos-settings.asp | 32 +++----------------------------- 4 files changed, 3 insertions(+), 63 deletions(-) diff --git a/release/src/router/httpd/tomato.c b/release/src/router/httpd/tomato.c index 4c6a023a92..fd76ff47a6 100644 --- a/release/src/router/httpd/tomato.c +++ b/release/src/router/httpd/tomato.c @@ -1181,10 +1181,6 @@ static const nvset_t nvset_list[] = { { "qos_orates", V_LENGTH(0, 128) }, { "qos_classnames", V_LENGTH(10, 128) }, // !!TOASTMAN { "atm_overhead", V_RANGE(-127, 128) }, - { "ne_vegas", V_01 }, - { "ne_valpha", V_NUM }, - { "ne_vbeta", V_NUM }, - { "ne_vgamma", V_NUM }, // new_qoslimit { "new_qoslimit_enable", V_01 }, diff --git a/release/src/router/nvram/defaults.c b/release/src/router/nvram/defaults.c index 66c97afab5..9d507e0d0a 100644 --- a/release/src/router/nvram/defaults.c +++ b/release/src/router/nvram/defaults.c @@ -550,12 +550,6 @@ const defaults_t defaults[] = { { "qos_irates", "5-100,2-20,5-100,10-90,20-90,5-90,5-70,5-100,5-30,1-1" }, { "qos_classnames", "Service VOIP/Game Remote WWW Media HTTPS/Msgr Mail FileXfer P2P/Bulk Crawl" }, - - { "ne_vegas", "0" }, // TCP Vegas - { "ne_valpha", "2" }, // " - { "ne_vbeta", "6" }, // " - { "ne_vgamma", "2" }, // " - // access restrictions { "rruleN", "0" }, { "rrule0", "0|1320|300|31|||word text\n^begins-with.domain.\n.ends-with.net$\n^www.exact-domain.net$|0|example" }, diff --git a/release/src/router/rc/qos.c b/release/src/router/rc/qos.c index a99e8cf073..bbeeb2426e 100644 --- a/release/src/router/rc/qos.c +++ b/release/src/router/rc/qos.c @@ -360,30 +360,6 @@ void start_qos(void) qosDefaultClassId = (nvram_get_int("qos_default") + 1) * 10; incomingBandwidthInKilobitsPerSecond = strtoul(nvram_safe_get("qos_ibw"), NULL, 10); - // move me? - x = nvram_get_int("ne_vegas"); -#ifdef LINUX26 - if (x) { - char alpha[10], beta[10], gamma[10]; - sprintf(alpha, "alpha=%d", nvram_get_int("ne_valpha")); - sprintf(beta, "beta=%d", nvram_get_int("ne_vbeta")); - sprintf(gamma, "gamma=%d", nvram_get_int("ne_vgamma")); - modprobe("tcp_vegas", alpha, beta, gamma); - f_write_string("/proc/sys/net/ipv4/tcp_congestion_control", "vegas", 0, 0); - } - else { - modprobe_r("tcp_vegas"); - f_write_string("/proc/sys/net/ipv4/tcp_congestion_control", "", FW_NEWLINE, 0); - } -#else - f_write_string("/proc/sys/net/ipv4/tcp_vegas_cong_avoid", x ? "1" : "0", 0, 0); - if (x) { - f_write_string("/proc/sys/net/ipv4/tcp_vegas_alpha", nvram_safe_get("ne_valpha"), 0, 0); - f_write_string("/proc/sys/net/ipv4/tcp_vegas_beta", nvram_safe_get("ne_vbeta"), 0, 0); - f_write_string("/proc/sys/net/ipv4/tcp_vegas_gamma", nvram_safe_get("ne_vgamma"), 0, 0); - } -#endif - if (!nvram_get_int("qos_enable")) return; if ((f = fopen(qosfn, "w")) == NULL) return; diff --git a/release/src/router/www/qos-settings.asp b/release/src/router/www/qos-settings.asp index 65a2d9c7fe..1842386c0e 100644 --- a/release/src/router/www/qos-settings.asp +++ b/release/src/router/www/qos-settings.asp @@ -25,7 +25,7 @@ /* REMOVE-BEGIN !!TB - added qos_pfifo REMOVE-END */ -// <% nvram("qos_classnames,qos_enable,qos_ack,qos_syn,qos_fin,qos_rst,qos_icmp,qos_udp,qos_default,qos_pfifo,qos_obw,qos_ibw,qos_orates,qos_irates,qos_reset,ne_vegas,ne_valpha,ne_vbeta,ne_vgamma,atm_overhead"); %> +// <% nvram("qos_classnames,qos_enable,qos_ack,qos_syn,qos_fin,qos_rst,qos_icmp,qos_udp,qos_default,qos_pfifo,qos_obw,qos_ibw,qos_orates,qos_irates,qos_reset,atm_overhead"); %> var classNames = nvram.qos_classnames.split(' '); // Toastman - configurable class names @@ -108,17 +108,8 @@ function verifyFields(focused, quiet) f = E('_fom').elements; b = !E('_f_qos_enable').checked; for (i = 0; i < f.length; ++i) { - if ((f[i].name.substr(0, 1) != '_') && (f[i].type != 'button') && (f[i].name.indexOf('enable') == -1) && - (f[i].name.indexOf('ne_v') == -1)) f[i].disabled = b; - } - - var abg = ['alpha', 'beta', 'gamma']; - b = E('_f_ne_vegas').checked; - for (i = 0; i < 3; ++i) { - f = E('_ne_v' + abg[i]); - f.disabled = !b; - if (b) { - if (!v_range(f, quiet, 0, 65535)) return 0; + if ((f[i].name.substr(0, 1) != '_') && (f[i].type != 'button') && (f[i].name.indexOf('enable') == -1)) { + f[i].disabled = b; } } @@ -164,8 +155,6 @@ function save() fom.qos_irates.value = a.join(','); - fom.ne_vegas.value = E('_f_ne_vegas').checked ? 1 : 0; - form.submit(fom, 1); } @@ -202,7 +191,6 @@ function save() - @@ -326,20 +314,6 @@ createFieldTable('', f); - - -- 2.11.4.GIT