Browse Source

[SQM] Fix changes relating to cake lnk layer adjustments

The last batch of changes tried to teach the GUI to pass link layer
options to cake but forgot to actually call the function that parses
the GUI variables and used it as a string insteead. So this fixes that
it also tries to allow the use of the tc_stab link layer adjustment
method with cake so the implementations can be validated against each other
easily. Needs testing...

Signed-off-by: Sebastian Moeller <moeller0@gmx.de>
lilik-openwrt-22.03
Sebastian Moeller 10 years ago
committed by Toke Høiland-Jørgensen
parent
commit
a754eb7a74
2 changed files with 38 additions and 37 deletions
  1. +36
    -35
      net/sqm-scripts/files/usr/lib/sqm/simple.qos
  2. +2
    -2
      net/sqm-scripts/files/usr/lib/sqm/simplest.qos

+ 36
- 35
net/sqm-scripts/files/usr/lib/sqm/simple.qos View File

@ -92,7 +92,7 @@ LQ="quantum `get_mtu $IFACE $CEIL`"
$TC qdisc del dev $IFACE root 2> /dev/null
case $QDISC in
cake*)
$TC qdisc add dev $IFACE root $QDISC bandwidth ${CEIL}kbit get_cake_lla_string ${EQDISC_OPTS}
$TC qdisc add dev $IFACE root `get_stab_string` $QDISC bandwidth ${CEIL}kbit `get_cake_lla_string` ${EQDISC_OPTS}
;;
*)
$TC qdisc add dev $IFACE root handle 1: `get_stab_string` htb default 12
@ -159,42 +159,43 @@ $TC qdisc del dev $DEV root 2> /dev/null
if [ "$SQUASH_INGRESS" = "1" ]
then
sqm_logger "Do not perform DSCP based filtering on ingress. (1-tier classification)"
# Revert to no dscp based filtering
case $QDISC in
cake*)
$TC qdisc add dev $DEV root $QDISC bandwidth ${DOWNLINK}kbit besteffort get_cake_lla_string ${IQDISC_OPTS}
;;
*)
$TC qdisc add dev $DEV root handle 1: `get_stab_string` htb default 10
$TC class add dev $DEV parent 1: classid 1:1 htb $LQ rate ${DOWNLINK}kbit ceil ${DOWNLINK}kbit `get_htb_adsll_string`
$TC class add dev $DEV parent 1:1 classid 1:10 htb $LQ rate ${DOWNLINK}kbit ceil ${DOWNLINK}kbit prio 0 `get_htb_adsll_string`
$TC qdisc add dev $DEV parent 1:10 handle 110: $QDISC `get_limit ${ILIMIT}` `get_target "${ITARGET}" ${DOWNLINK}` `get_ecn ${IECN}` `get_flows ${DOWNLINK}` ${IQDISC_OPTS}
;;
esac
sqm_logger "Do not perform DSCP based filtering on ingress. (1-tier classification)"
# Revert to no dscp based filtering
case $QDISC in
cake*)
$TC qdisc add dev $DEV root `get_stab_string` $QDISC bandwidth ${DOWNLINK}kbit besteffort `get_cake_lla_string` ${IQDISC_OPTS}
;;
*)
$TC qdisc add dev $DEV root handle 1: `get_stab_string` htb default 10
$TC class add dev $DEV parent 1: classid 1:1 htb $LQ rate ${DOWNLINK}kbit ceil ${DOWNLINK}kbit `get_htb_adsll_string`
$TC class add dev $DEV parent 1:1 classid 1:10 htb $LQ rate ${DOWNLINK}kbit ceil ${DOWNLINK}kbit prio 0 `get_htb_adsll_string`
$TC qdisc add dev $DEV parent 1:10 handle 110: $QDISC `get_limit ${ILIMIT}` `get_target "${ITARGET}" ${DOWNLINK}` `get_ecn ${IECN}` `get_flows ${DOWNLINK}` ${IQDISC_OPTS}
;;
esac
else
sqm_logger "Perform DSCP based filtering on ingress. (3-tier classification)"
case $QDISC in
cake*) $TC qdisc add dev $IFACE root $QDISC bandwidth ${DOWNLINK}kbit $CAKE_OPTS;;
*)
$TC qdisc add dev $DEV root handle 1: `get_stab_string` htb default 12
$TC class add dev $DEV parent 1: classid 1:1 htb $LQ rate ${CEIL}kbit ceil ${CEIL}kbit `get_htb_adsll_string`
$TC class add dev $DEV parent 1:1 classid 1:10 htb $LQ rate ${CEIL}kbit ceil ${CEIL}kbit prio 0 `get_htb_adsll_string`
$TC class add dev $DEV parent 1:1 classid 1:11 htb $LQ rate 32kbit ceil ${PRIO_RATE}kbit prio 1 `get_htb_adsll_string`
$TC class add dev $DEV parent 1:1 classid 1:12 htb $LQ rate ${BE_RATE}kbit ceil ${BE_CEIL}kbit prio 2 `get_htb_adsll_string`
$TC class add dev $DEV parent 1:1 classid 1:13 htb $LQ rate ${BK_RATE}kbit ceil ${BE_CEIL}kbit prio 3 `get_htb_adsll_string`
# I'd prefer to use a pre-nat filter but that causes permutation...
$TC qdisc add dev $DEV parent 1:11 handle 110: $QDISC `get_limit ${ILIMIT}` `get_target "${ITARGET}" ${DOWNLINK}` `get_ecn ${IECN}` `get_quantum 500` `get_flows ${PRIO_RATE}` ${IQDISC_OPTS}
$TC qdisc add dev $DEV parent 1:12 handle 120: $QDISC `get_limit ${ILIMIT}` `get_target "${ITARGET}" ${DOWNLINK}` `get_ecn ${IECN}` `get_quantum 1500` `get_flows ${BE_RATE}` ${IQDISC_OPTS}
$TC qdisc add dev $DEV parent 1:13 handle 130: $QDISC `get_limit ${ILIMIT}` `get_target "${ITARGET}" ${DOWNLINK}` `get_ecn ${IECN}` `get_quantum 300` `get_flows ${BK_RATE}` ${IQDISC_OPTS}
diffserv $DEV
;;
esac
sqm_logger "Perform DSCP based filtering on ingress. (3-tier classification)"
case $QDISC in
cake*)
$TC qdisc add dev $IFACE root `get_stab_string` $QDISC bandwidth ${DOWNLINK}kbit `get_cake_lla_string` $CAKE_OPTS ${IQDISC_OPTS}
;;
*)
$TC qdisc add dev $DEV root handle 1: `get_stab_string` htb default 12
$TC class add dev $DEV parent 1: classid 1:1 htb $LQ rate ${CEIL}kbit ceil ${CEIL}kbit `get_htb_adsll_string`
$TC class add dev $DEV parent 1:1 classid 1:10 htb $LQ rate ${CEIL}kbit ceil ${CEIL}kbit prio 0 `get_htb_adsll_string`
$TC class add dev $DEV parent 1:1 classid 1:11 htb $LQ rate 32kbit ceil ${PRIO_RATE}kbit prio 1 `get_htb_adsll_string`
$TC class add dev $DEV parent 1:1 classid 1:12 htb $LQ rate ${BE_RATE}kbit ceil ${BE_CEIL}kbit prio 2 `get_htb_adsll_string`
$TC class add dev $DEV parent 1:1 classid 1:13 htb $LQ rate ${BK_RATE}kbit ceil ${BE_CEIL}kbit prio 3 `get_htb_adsll_string`
# I'd prefer to use a pre-nat filter but that causes permutation...
$TC qdisc add dev $DEV parent 1:11 handle 110: $QDISC `get_limit ${ILIMIT}` `get_target "${ITARGET}" ${DOWNLINK}` `get_ecn ${IECN}` `get_quantum 500` `get_flows ${PRIO_RATE}` ${IQDISC_OPTS}
$TC qdisc add dev $DEV parent 1:12 handle 120: $QDISC `get_limit ${ILIMIT}` `get_target "${ITARGET}" ${DOWNLINK}` `get_ecn ${IECN}` `get_quantum 1500` `get_flows ${BE_RATE}` ${IQDISC_OPTS}
$TC qdisc add dev $DEV parent 1:13 handle 130: $QDISC `get_limit ${ILIMIT}` `get_target "${ITARGET}" ${DOWNLINK}` `get_ecn ${IECN}` `get_quantum 300` `get_flows ${BK_RATE}` ${IQDISC_OPTS}
diffserv $DEV
;;
esac
fi
ifconfig $DEV up


+ 2
- 2
net/sqm-scripts/files/usr/lib/sqm/simplest.qos View File

@ -19,7 +19,7 @@ LQ="quantum `get_mtu $IFACE ${UPLINK}`"
$TC qdisc del dev $IFACE root 2>/dev/null
case $QDISC in
cake*)
$TC qdisc add dev $IFACE root cake bandwidth ${UPLINK}kbit besteffort get_cake_lla_string ${EQDISC_OPTS}
$TC qdisc add dev $IFACE root `get_stab_string` cake bandwidth ${UPLINK}kbit besteffort `get_cake_lla_string` ${EQDISC_OPTS}
;;
*)
$TC qdisc add dev $IFACE root handle 1: `get_stab_string` htb default 10
@ -42,7 +42,7 @@ LQ="quantum `get_mtu $IFACE ${DOWNLINK}`"
$TC qdisc del dev $DEV root 2>/dev/null
case $QDISC in
cake*)
$TC qdisc add dev $DEV root cake bandwidth ${DOWNLINK}kbit besteffort get_cake_lla_string ${IQDISC_OPTS}
$TC qdisc add dev $DEV root `get_stab_string` cake bandwidth ${DOWNLINK}kbit besteffort `get_cake_lla_string` ${IQDISC_OPTS}
;;
*)
$TC qdisc add dev $DEV root handle 1: `get_stab_string` htb default 10


Loading…
Cancel
Save