X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/cbddbcdae45a9ab2e453d783a2cd6f8a21b8c1b0..f6c379666dc69617804a5d9aff19d866da9b42bd:/package/qos-scripts/files/usr/lib/qos/tcrules.awk diff --git a/package/qos-scripts/files/usr/lib/qos/tcrules.awk b/package/qos-scripts/files/usr/lib/qos/tcrules.awk index 7bef85b0d..90b4212e7 100644 --- a/package/qos-scripts/files/usr/lib/qos/tcrules.awk +++ b/package/qos-scripts/files/usr/lib/qos/tcrules.awk @@ -13,6 +13,8 @@ BEGIN { pktsize[n] = $4 delay[n] = $5 maxrate[n] = ($6 * linespeed / 100) + qdisc[n] = $7 + filter[n] = $8 } END { @@ -91,7 +93,10 @@ END { max = 3 * min limit = (min + max) * 3 - if (rtm1[i] > 0) { + if (qdisc[i] != "") { + # user specified qdisc + print qdisc[i] " limit " limit + } else if (rtm1[i] > 0) { # rt class - use sfq print "sfq perturb 2 limit " limit } else { @@ -118,6 +123,11 @@ END { # filter rule for (i = 1; i <= n; i++) { print "tc filter add dev "device" parent 1: prio "class[i]" protocol ip handle "class[i]" fw flowid 1:"class[i] "0" + filterc=1 + if (filter[i] != "") { + print " tc filter add dev "device" parent "class[i]"00: handle "filterc"0 "filter[i] + filterc=filterc+1 + } } }