From: <abe...@us...> - 2012-12-26 22:21:35
|
Revision: 5839 http://astlinux.svn.sourceforge.net/astlinux/?rev=5839&view=rev Author: abelbeck Date: 2012-12-26 22:21:29 +0000 (Wed, 26 Dec 2012) Log Message: ----------- AIF traffic shaper, bump version and date Modified Paths: -------------- branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh Modified: branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh =================================================================== --- branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh 2012-12-26 21:33:51 UTC (rev 5838) +++ branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh 2012-12-26 22:21:29 UTC (rev 5839) @@ -2,10 +2,10 @@ # -= Arno's iptables firewall - HTB & HFSC traffic shaper plugin =- # PLUGIN_NAME="Traffic-Shaper plugin" -PLUGIN_VERSION="1.2.06-astlinux" +PLUGIN_VERSION="1.2.07-astlinux" PLUGIN_CONF_FILE="traffic-shaper.conf" # -# Last changed : December 19, 2010 +# Last changed : December 26, 2012 # Requirements : kernel 2.6 + iproute # Comments : This plugin will shape traffic. It borrows heavily on # the logic of Maciej's original script (below), with This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2012-12-29 21:30:23
|
Revision: 5844 http://astlinux.svn.sourceforge.net/astlinux/?rev=5844&view=rev Author: abelbeck Date: 2012-12-29 21:30:16 +0000 (Sat, 29 Dec 2012) Log Message: ----------- AIF traffic-shaper, change ingress shaping to use 'estimator 500ms 2sec police avrate - drop' Modified Paths: -------------- branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh Modified: branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh =================================================================== --- branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh 2012-12-28 23:58:16 UTC (rev 5843) +++ branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh 2012-12-29 21:30:16 UTC (rev 5844) @@ -198,12 +198,12 @@ # filter *everything* to it (0.0.0.0/0), drop everything that's # coming in too fast: - tc filter add dev $1 parent ffff: protocol ip prio 100 u32 match ip src \ - 0.0.0.0/0 police rate ${DOWNLINK}kbit burst $((1*$DOWNLINK/10))k drop flowid :1 + tc filter add dev $1 parent ffff: protocol ip prio 100 estimator 500ms 2sec \ + u32 match ip src 0.0.0.0/0 police avrate ${DOWNLINK}kbit drop flowid :1 if [ "$IPV6_SUPPORT" = "1" ]; then - tc filter add dev $1 parent ffff: protocol ipv6 prio 101 u32 match ip6 src \ - ::/0 police rate ${DOWNLINK}kbit burst $((1*$DOWNLINK/10))k drop flowid :1 + tc filter add dev $1 parent ffff: protocol ipv6 prio 101 estimator 500ms 2sec \ + u32 match ip6 src ::/0 police avrate ${DOWNLINK}kbit drop flowid :1 fi } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-07-31 13:46:36
|
Revision: 7169 http://sourceforge.net/p/astlinux/code/7169 Author: abelbeck Date: 2015-07-31 13:46:34 +0000 (Fri, 31 Jul 2015) Log Message: ----------- arnofw, traffic shaper, try nf_nat first and remove single interface restriction Modified Paths: -------------- branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh Modified: branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh =================================================================== --- branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh 2015-07-30 17:02:25 UTC (rev 7168) +++ branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh 2015-07-31 13:46:34 UTC (rev 7169) @@ -2,11 +2,11 @@ # -= Arno's iptables firewall - HTB & HFSC traffic shaper plugin =- # PLUGIN_NAME="Traffic-Shaper plugin" -PLUGIN_VERSION="1.2.07-astlinux" +PLUGIN_VERSION="1.2.08-astlinux" PLUGIN_CONF_FILE="traffic-shaper.conf" # -# Last changed : December 26, 2012 -# Requirements : kernel 2.6 + iproute +# Last changed : July 31, 2015 +# Requirements : kernel 2.6 + iproute2 # Comments : This plugin will shape traffic. It borrows heavily on # the logic of Maciej's original script (below), with # some minor changes to the actual bins that traffic @@ -223,8 +223,7 @@ plugin_start_hfsc() { # Some required modules are already loaded by the main script: - modprobe ip_nat - # modprobe ip_table + modprobe_multi nf_nat ip_nat modprobe sch_hfsc @@ -297,7 +296,7 @@ plugin_start_htb() { # Some required modules are already loaded by the main script: - modprobe ip_nat + modprobe_multi nf_nat ip_nat printf "${INDENT}Shaping as (Down/Up) %d/%d kb/s using '%s' for interface: %s\n" $DOWNLINK $UPLINK htb "$SHAPER_IF" @@ -417,16 +416,6 @@ return 1 fi - count=0 - IFS=' ,' - for eif in $SHAPER_IF; do - count=$((count+1)) - done - if [ "$count" -ne 1 ]; then - printf "\033[40m\033[1;31m${INDENT}ERROR: Only one external interface is supported!\n\033[0m" >&2 - return 1 - fi - if ! check_command tc; then printf "\033[40m\033[1;31m${INDENT}ERROR: Required binary \"tc\" is not available!\n\033[0m" >&2 return 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2015-12-30 21:54:27
|
Revision: 7432 http://sourceforge.net/p/astlinux/code/7432 Author: abelbeck Date: 2015-12-30 21:54:25 +0000 (Wed, 30 Dec 2015) Log Message: ----------- arnofw, traffic shaper plugin, automatically disable ethernet offloading on the shaper interface Modified Paths: -------------- branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh Modified: branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh =================================================================== --- branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh 2015-12-27 22:22:20 UTC (rev 7431) +++ branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh 2015-12-30 21:54:25 UTC (rev 7432) @@ -2,10 +2,10 @@ # -= Arno's iptables firewall - HTB & HFSC traffic shaper plugin =- # PLUGIN_NAME="Traffic-Shaper plugin" -PLUGIN_VERSION="1.2.08-astlinux" +PLUGIN_VERSION="1.2.09-astlinux" PLUGIN_CONF_FILE="traffic-shaper.conf" # -# Last changed : July 31, 2015 +# Last changed : December 30, 2015 # Requirements : kernel 2.6 + iproute2 # Comments : This plugin will shape traffic. It borrows heavily on # the logic of Maciej's original script (below), with @@ -207,6 +207,16 @@ fi } +disable_ethernet_offloading() +{ + local eth="$1" + + # Disable offloading on ethernet devices + if [ "$eth" != "${eth#eth}" ]; then + ethtool -K $eth tso off gso off gro off 2>/dev/null + fi +} + # Plugin start function plugin_start() { @@ -283,6 +293,8 @@ ul rate ${UPLINK}kbit incoming_traffic_limit $eif1 + + disable_ethernet_offloading $eif1 done # add SHAPER_CHAIN chain to mangle table in iptables @@ -348,6 +360,8 @@ tc qdisc add dev $eif1 parent 1:60 handle 60: sfq perturb 10 incoming_traffic_limit $eif1 + + disable_ethernet_offloading $eif1 done # add SHAPER_CHAIN chain to mangle table in iptables @@ -421,6 +435,11 @@ return 1 fi + if ! check_command ethtool; then + printf "\033[40m\033[1;31m${INDENT}ERROR: Required binary \"ethtool\" is not available!\n\033[0m" >&2 + return 1 + fi + return 0 } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2017-06-01 16:15:13
|
Revision: 8362 http://sourceforge.net/p/astlinux/code/8362 Author: abelbeck Date: 2017-06-01 16:15:11 +0000 (Thu, 01 Jun 2017) Log Message: ----------- arnofw, traffic-shaper plugin, add fq_codel to both 'htb' and 'hfsc'. Give 'hfsc' another look with this addition. Modified Paths: -------------- branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh Modified: branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh =================================================================== --- branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh 2017-06-01 13:02:20 UTC (rev 8361) +++ branches/1.0/package/arnofw/traffic-shaper/60traffic-shaper.plugin.sh 2017-06-01 16:15:11 UTC (rev 8362) @@ -2,11 +2,11 @@ # -= Arno's iptables firewall - HTB & HFSC traffic shaper plugin =- # PLUGIN_NAME="Traffic-Shaper plugin" -PLUGIN_VERSION="1.2.09-astlinux" +PLUGIN_VERSION="1.3.00" PLUGIN_CONF_FILE="traffic-shaper.conf" # -# Last changed : December 30, 2015 -# Requirements : kernel 2.6 + iproute2 +# Last changed : June 1, 2017 +# Requirements : kernel 3.16 + iproute2 # Comments : This plugin will shape traffic. It borrows heavily on # the logic of Maciej's original script (below), with # some minor changes to the actual bins that traffic @@ -15,6 +15,7 @@ # transfer). # [LRA]: Added htb support from astshape in AstLinux # [LRA]: Classify by DSCP class +# [LRA]: Use sch_fq_codel instead of sch_sfq # Author : (C) Copyright 2008-2010 by Philip Prindeville # Credits : Maciej Blizinski # Credits : Kristian Kielhofner @@ -185,6 +186,16 @@ iptables -t mangle -A SHAPER_CHAIN -m dscp --dscp-class CS1 -j CLASSIFY --set-class 1:60 } +outgoing_fair_queueing_codel() +{ + tc qdisc add dev $1 parent 1:10 handle 10: fq_codel quantum 300 noecn + tc qdisc add dev $1 parent 1:20 handle 20: fq_codel quantum 300 noecn + tc qdisc add dev $1 parent 1:30 handle 30: fq_codel quantum 300 noecn + tc qdisc add dev $1 parent 1:40 handle 40: fq_codel noecn + tc qdisc add dev $1 parent 1:50 handle 50: fq_codel noecn + tc qdisc add dev $1 parent 1:60 handle 60: fq_codel noecn +} + incoming_traffic_limit() { # Skip if DOWNLINK is 0 @@ -236,6 +247,7 @@ modprobe_multi nf_nat ip_nat modprobe sch_hfsc + modprobe sch_fq_codel printf "${INDENT}Shaping as (Down/Up) %d/%d kb/s using '%s' for interface: %s\n" $DOWNLINK $UPLINK hfsc "$SHAPER_IF" @@ -292,6 +304,8 @@ sc m1 0 d 4s m2 1kbit \ ul rate ${UPLINK}kbit + outgoing_fair_queueing_codel $eif1 + incoming_traffic_limit $eif1 disable_ethernet_offloading $eif1 @@ -310,6 +324,9 @@ # Some required modules are already loaded by the main script: modprobe_multi nf_nat ip_nat + modprobe sch_htb + modprobe sch_fq_codel + printf "${INDENT}Shaping as (Down/Up) %d/%d kb/s using '%s' for interface: %s\n" $DOWNLINK $UPLINK htb "$SHAPER_IF" iptables -t mangle -N SHAPER_CHAIN @@ -351,13 +368,7 @@ # p2p class 1:60 tc class add dev $eif1 parent 1:1 classid 1:60 htb rate $((5*$UPLINK/10))kbit burst 6k prio 6 - # all get Stochastic Fairness - tc qdisc add dev $eif1 parent 1:10 handle 10: sfq perturb 10 - tc qdisc add dev $eif1 parent 1:20 handle 20: sfq perturb 10 - tc qdisc add dev $eif1 parent 1:30 handle 30: sfq perturb 10 - tc qdisc add dev $eif1 parent 1:40 handle 40: sfq perturb 10 - tc qdisc add dev $eif1 parent 1:50 handle 50: sfq perturb 10 - tc qdisc add dev $eif1 parent 1:60 handle 60: sfq perturb 10 + outgoing_fair_queueing_codel $eif1 incoming_traffic_limit $eif1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |