summaryrefslogtreecommitdiffstats
path: root/main/iproute2-qos
diff options
context:
space:
mode:
Diffstat (limited to 'main/iproute2-qos')
-rw-r--r--main/iproute2-qos/APKBUILD4
-rw-r--r--main/iproute2-qos/qos.initd22
2 files changed, 13 insertions, 13 deletions
diff --git a/main/iproute2-qos/APKBUILD b/main/iproute2-qos/APKBUILD
index bb0b27a6f..cb5ef0920 100644
--- a/main/iproute2-qos/APKBUILD
+++ b/main/iproute2-qos/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Ilya Strelkin <iilluzion@gmail.com>
# Maintainer: Ilya Strelkin <iilluzion@gmail.com>
pkgname=iproute2-qos
-pkgver=0.3
+pkgver=0.4
pkgrel=0
pkgdesc="Scripts to set up quality of service with iproute2"
url="http://git.alpinelinux.org/cgit/aports"
@@ -19,7 +19,7 @@ build() {
"$pkgdir"/etc/conf.d/qos.ifb0.sample
}
-md5sums="dda96b445c6e4fe377e918f860825fb1 qos.initd
+md5sums="13d9c58253905f349b953593036b8134 qos.initd
79cecb47b3d1f623d2f6790044b3afee qos.eth0.sample
9f8d3514081624ea2ad2606c1564c759 qos.ifb0.sample
785aff5d4284c47038a009797c576e34 setup-qos"
diff --git a/main/iproute2-qos/qos.initd b/main/iproute2-qos/qos.initd
index 9986a8cce..09677353a 100644
--- a/main/iproute2-qos/qos.initd
+++ b/main/iproute2-qos/qos.initd
@@ -225,11 +225,11 @@ set_filters()
set_htb()
{
$ECHO tc qdisc add dev $DEV root handle 1 htb default 60
- $ECHO tc class add dev $DEV parent 1: classid 1:2 htb rate $DEV_RATE
- $ECHO tc class add dev $DEV parent 1:2 classid 1:30 htb rate $WAN_SUB_RATE
- $ECHO tc class add dev $DEV parent 1:30 classid 1:40 htb rate $INTERACTIVE_RATE prio 1
- $ECHO tc class add dev $DEV parent 1:30 classid 1:50 htb rate $PRIVILEGED_RATE ceil $WAN_SUB_RATE prio 3
- $ECHO tc class add dev $DEV parent 1:30 classid 1:60 htb rate $BESTEFFORT_RATE ceil $WAN_SUB_RATE prio 6
+ $ECHO tc class add dev $DEV parent 1: classid 1:2 htb rate $DEV_RATE burst $(($DEV_RATE*5/4))
+ $ECHO tc class add dev $DEV parent 1:2 classid 1:30 htb rate $WAN_SUB_RATE burst $(($WAN_SUB_RATE*5/4))
+ $ECHO tc class add dev $DEV parent 1:30 classid 1:40 htb rate $INTERACTIVE_RATE ceil $WAN_SUB_RATE prio 1
+ $ECHO tc class add dev $DEV parent 1:30 classid 1:50 htb rate $PRIVILEGED_RATE ceil $WAN_SUB_RATE prio 3 burst $(($WAN_SUB_RATE*5/4))
+ $ECHO tc class add dev $DEV parent 1:30 classid 1:60 htb rate $BESTEFFORT_RATE ceil $WAN_SUB_RATE prio 6 burst $(($WAN_SUB_RATE*5/4))
if [ $OUT_OF_WAN_RATE -gt 0 ]; then
$ECHO tc class add dev $DEV parent 1:2 classid 1:70 htb rate $OUT_OF_WAN_RATE prio 7
@@ -250,7 +250,7 @@ set_hfsc()
$ECHO tc qdisc add dev $DEV root handle 1 hfsc default 60
$ECHO tc class add dev $DEV parent 1: classid 1:2 hfsc sc rate $DEV_RATE ul rate $DEV_RATE
$ECHO tc class add dev $DEV parent 1:2 classid 1:30 hfsc sc rate $WAN_SUB_RATE ul rate $WAN_SUB_RATE
- $ECHO tc class add dev $DEV parent 1:30 classid 1:40 hfsc sc umax $INTERACTIVE_HFSC_UMAX dmax $INTERACTIVE_HFSC_DMAX rate $INTERACTIVE_RATE ul rate $INTERACTIVE_RATE
+ $ECHO tc class add dev $DEV parent 1:30 classid 1:40 hfsc sc umax $INTERACTIVE_HFSC_UMAX dmax $INTERACTIVE_HFSC_DMAX rate $INTERACTIVE_RATE ul rate $WAN_SUB_RATE
$ECHO tc class add dev $DEV parent 1:30 classid 1:50 hfsc sc umax $PRIVILEGED_HFSC_UMAX dmax $PRIVILEGED_HFSC_DMAX rate $PRIVILEGED_RATE ul rate $WAN_SUB_RATE
$ECHO tc class add dev $DEV parent 1:30 classid 1:60 hfsc sc rate $BESTEFFORT_RATE ul rate $WAN_SUB_RATE
@@ -272,7 +272,7 @@ set_prio()
{
PARENT_CLASSID=10
$ECHO tc qdisc add dev $DEV root handle 1 prio bands 2 priomap 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 # by default unclassified traffic goes to flowid 1:2
- $ECHO tc qdisc add dev $DEV parent 1:1 handle 40: tbf rate $INTERACTIVE_RATE burst $INTERACTIVE_PRIO_BURST latency $INTERACTIVE_PRIO_LATENCY
+ $ECHO tc qdisc add dev $DEV parent 1:1 handle 40: tbf rate $INTERACTIVE_RATE burst $WAN_SUB_RATE latency $INTERACTIVE_PRIO_LATENCY
$ECHO tc qdisc add dev $DEV parent 1:2 handle $PARENT_CLASSID: htb default 60
$ECHO tc class add dev $DEV parent $PARENT_CLASSID: classid $PARENT_CLASSID:30 htb rate $WAN_SUB_RATE
$ECHO tc class add dev $DEV parent $PARENT_CLASSID:30 classid $PARENT_CLASSID:50 htb rate $PRIVILEGED_RATE ceil $WAN_SUB_RATE prio 3
@@ -309,7 +309,7 @@ set_police()
# burst = rate / 17 (taken basing on experemental results)
POLICE_BURST_SCALE=17
- WAN_POLICE_BURST=$((WAN_RATE / POLICE_BURST_SCALE))
+ WAN_POLICE_BURST=$((WAN_RATE / POLICE_BURST_SCALE))
WAN_POLICE_FLOWID=1
@@ -329,9 +329,9 @@ set_cpolice()
# burst = rate / 17 (taken basing on experemental results)
POLICE_BURST_SCALE=17
- INTERACTIVE_POLICE_BURST=$((INTERACTIVE_RATE / POLICE_BURST_SCALE))
- PRIVILEGED_POLICE_BURST=$((PRIVILEGED_RATE / POLICE_BURST_SCALE))
- BESTEFFORT_POLICE_BURST=$((BESTEFFORT_RATE / POLICE_BURST_SCALE))
+ INTERACTIVE_POLICE_BURST=$((INTERACTIVE_RATE / POLICE_BURST_SCALE))
+ PRIVILEGED_POLICE_BURST=$((PRIVILEGED_RATE / POLICE_BURST_SCALE))
+ BESTEFFORT_POLICE_BURST=$((BESTEFFORT_RATE / POLICE_BURST_SCALE))
CLASS_TYPES="INTERACTIVE PRIVILEGED"
INTERACTIVE_POLICE_FLOWID=1