From 2817d69e980bb4754bbd14756c608467c24aff6c Mon Sep 17 00:00:00 2001 From: Jeremy Chadwick Date: Thu, 19 Jan 2017 22:39:15 -0800 Subject: [PATCH] Remove TCP Vegas support (ARM) In commit 0c3d1c9, 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-rt-6.x.4708/router/httpd/tomato.c | 4 --- release/src-rt-6.x.4708/router/rc/qos.c | 24 ---------------- release/src-rt-6.x.4708/router/shared/defaults.c | 5 ---- .../src-rt-6.x.4708/router/www/qos-settings.asp | 32 ++-------------------- 4 files changed, 3 insertions(+), 62 deletions(-) diff --git a/release/src-rt-6.x.4708/router/httpd/tomato.c b/release/src-rt-6.x.4708/router/httpd/tomato.c index 4401489ca8..c7e8b05871 100644 --- a/release/src-rt-6.x.4708/router/httpd/tomato.c +++ b/release/src-rt-6.x.4708/router/httpd/tomato.c @@ -1188,10 +1188,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-rt-6.x.4708/router/rc/qos.c b/release/src-rt-6.x.4708/router/rc/qos.c index 5187a65af3..0bdf723361 100644 --- a/release/src-rt-6.x.4708/router/rc/qos.c +++ b/release/src-rt-6.x.4708/router/rc/qos.c @@ -377,30 +377,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", "cubic", 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-rt-6.x.4708/router/shared/defaults.c b/release/src-rt-6.x.4708/router/shared/defaults.c index b5e0c7891c..ad2834a882 100644 --- a/release/src-rt-6.x.4708/router/shared/defaults.c +++ b/release/src-rt-6.x.4708/router/shared/defaults.c @@ -534,11 +534,6 @@ struct nvram_tuple router_defaults[] = { { "qos_irates", "5-100,5-30,5-100,5-70,5-70,5-70,5-70,5-100,5-30,1-1" , 0 }, { "qos_classnames", "Service VOIP/Game Remote WWW Media HTTPS/Msgr Mail FileXfer P2P/Bulk Crawl" , 0 }, - { "ne_vegas", "0" , 0 }, // TCP Vegas - { "ne_valpha", "2" , 0 }, // " - { "ne_vbeta", "6" , 0 }, // " - { "ne_vgamma", "2" , 0 }, // " - // access restrictions { "rruleN", "0" , 0 }, { "rrule0", "0|1320|300|31|||word text\n^begins-with.domain.\n.ends-with.net$\n^www.exact-domain.net$|0|example" , 0 }, diff --git a/release/src-rt-6.x.4708/router/www/qos-settings.asp b/release/src-rt-6.x.4708/router/www/qos-settings.asp index 06aead93d7..a1ee1499bb 100644 --- a/release/src-rt-6.x.4708/router/www/qos-settings.asp +++ b/release/src-rt-6.x.4708/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