diff options
author | Travis Kemen <thepeople@openwrt.org> | 2010-02-26 17:22:53 +0000 |
---|---|---|
committer | Travis Kemen <thepeople@openwrt.org> | 2010-02-26 17:22:53 +0000 |
commit | de8394cc11c4f5dec1c94ee4f89a350fddcf44c2 (patch) | |
tree | a97e0e32fca3e7fdd6969668331c1e117f305de4 /package | |
parent | 812105bfb4de7e88dd3ffeb6158762ca13316460 (diff) | |
download | mtk-20170518-de8394cc11c4f5dec1c94ee4f89a350fddcf44c2.zip mtk-20170518-de8394cc11c4f5dec1c94ee4f89a350fddcf44c2.tar.gz mtk-20170518-de8394cc11c4f5dec1c94ee4f89a350fddcf44c2.tar.bz2 |
This patch allows the user to specify esfq as the leaf qdisc, as well as perturb and hash parameters, closes #1893
SVN-Revision: 19874
Diffstat (limited to 'package')
-rwxr-xr-x | package/qos-scripts/files/usr/lib/qos/generate.sh | 4 | ||||
-rw-r--r-- | package/qos-scripts/files/usr/lib/qos/tcrules.awk | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/package/qos-scripts/files/usr/lib/qos/generate.sh b/package/qos-scripts/files/usr/lib/qos/generate.sh index 9fc146b..02c3933 100755 --- a/package/qos-scripts/files/usr/lib/qos/generate.sh +++ b/package/qos-scripts/files/usr/lib/qos/generate.sh @@ -315,8 +315,10 @@ start_interface() { cls_var maxrate "$class" limitrate $dir 100 cls_var prio "$class" priority $dir 1 cls_var avgrate "$class" avgrate $dir 0 + cls_var qdisc_esfq "$class" qdisc_esfq $dir "" + [ "$qdisc_esfq" != "" ] && add_insmod sch_esfq config_get classnr "$class" classnr - append cstr "$classnr:$prio:$avgrate:$pktsize:$pktdelay:$maxrate" "$N" + append cstr "$classnr:$prio:$avgrate:$pktsize:$pktdelay:$maxrate:$qdisc_esfq" "$N" done append ${prefix}q "$(tcrules)" "$N" export dev_${dir}="ifconfig $dev up txqueuelen 5 >&- 2>&- diff --git a/package/qos-scripts/files/usr/lib/qos/tcrules.awk b/package/qos-scripts/files/usr/lib/qos/tcrules.awk index 7bef85b..ebda506 100644 --- a/package/qos-scripts/files/usr/lib/qos/tcrules.awk +++ b/package/qos-scripts/files/usr/lib/qos/tcrules.awk @@ -13,6 +13,7 @@ BEGIN { pktsize[n] = $4 delay[n] = $5 maxrate[n] = ($6 * linespeed / 100) + qdisc_esfq[n] = $7 } END { @@ -67,7 +68,11 @@ END { # main qdisc for (i = 1; i <= n; i++) { printf "tc class add dev "device" parent 1:1 classid 1:"class[i]"0 hfsc" - if (rtm1[i] > 0) { + if (qdisc_esfq[i] != "") { + # user requested esfq + print "esfq " qdisc_esfq[i] " limit " ql + } else if (rtm1[i] > 0) { + # rt class - use sfq printf " rt m1 " int(rtm1[i]) "kbit d " int(d[i] * 1000) "us m2 " int(rtm2[i])"kbit" } printf " ls m1 " int(lsm1[i]) "kbit d " int(d[i] * 1000) "us m2 " int(lsm2[i]) "kbit" |