shaping: tweak, bring back #flows

This commit is contained in:
Astro 2016-11-29 16:18:07 +01:00
parent f046e2ff88
commit 0a078d5115
4 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,5 @@
upstream:
interface: ipredator
up-bandwidth: 2000
up-bandwidth: 4000
flow-keys: nfct-src
flows: 4096

View File

@ -1,4 +1,5 @@
upstream:
interface: up1
up-bandwidth: 6000
up-bandwidth: 6200
flow-keys: nfct-src
flows: 2048

View File

@ -1,4 +1,5 @@
upstream:
interface: up2
up-bandwidth: 6000
up-bandwidth: 6200
flow-keys: nfct-src
flows: 2048

View File

@ -4,6 +4,6 @@ if [ "$IFACE" = "{{ pillar['upstream']['interface'] }}" ]; then
tc qdisc del dev $IFACE root 2> /dev/null > /dev/null
tc qdisc add dev $IFACE root handle 1 hfsc default 1
tc class add dev $IFACE parent 1: classid 1:1 hfsc sc rate {{ pillar['upstream']['up-bandwidth'] }}kbit ul rate {{ pillar['upstream']['up-bandwidth'] }}kbit
tc qdisc add dev $IFACE parent 1:1 handle 11: fq_codel
tc filter add dev $IFACE parent 11: handle 11 protocol all flow hash keys {{ pillar['upstream']['flow-keys'] }} divisor 1024
tc qdisc add dev $IFACE parent 1:1 handle 11: fq_codel flows {{ pillar['upstream']['flows'] }}
tc filter add dev $IFACE parent 11: handle 11 protocol all flow hash keys {{ pillar['upstream']['flow-keys'] }} divisor {{ pillar['upstream']['flows'] }}
fi