[Bloat] Per flow ingress limit ?
Etienne Champetier
champetier.etienne at gmail.com
Tue Jan 19 12:22:21 EST 2016
Hi,
found my mistake :)
classid are hex number !!!
here an exemple that work
($num -> $(printf "%x" $num))
(baseclass 1:10 -> baseclass 1:a)
modprobe ifb numifbs=1
> ip link set dev ifb0 up
> tc qdisc add dev ifb0 root handle 1 hfsc default 1
> tc class add dev ifb0 parent 1: classid 1:1 hfsc sc rate 100mbit ul rate
> 100mbit
>
> for num in {10..1034}
> do
> tc class add dev ifb0 parent 1: classid 1:$(printf "%x" $num) hfsc sc
> rate 1200kbit ul rate 1200kbit
> tc qdisc add dev ifb0 parent 1:$(printf "%x" $num) handle $(printf "%x"
> $num): codel
> done
>
> tc filter add dev ifb0 parent 1: handle 5 prio 1 flow map key proto-src
> divisor 1024 baseclass 1:a
>
> tc qdisc add dev eno16780032 handle ffff: ingress
> tc filter add dev eno16780032 parent ffff: protocol ip u32 match ip dport
> 443 0xffff action mirred egress redirect dev ifb0
> tc filter add dev eno16780032 parent ffff: protocol ip u32 match ip dport
> 10000 0xffff action mirred egress redirect dev ifb0
>
Regards
Etienne
2016-01-19 10:32 GMT+01:00 Etienne Champetier <champetier.etienne at gmail.com>
:
> Hi all,
>
> (this is a bit off topic but i'm sure AQM experts here can help me)
>
> I'm playing with jitsi meet lately, which use up to 1800 kbits/s upload
> bandwidth (and auto adapt to the available bandwith).
> I'm trying to limit the bandwidth of each client to a smaller value (1200
> kbits), i can't do it in the client (firefox doesn't have the api right
> now), so i'm trying with TC to do per flow ingress limit.
>
> Here is my test:
>
> modprobe ifb numifbs=1
>> ip link set dev ifb0 up
>> #ip link set ifb0 txqueuelen 1000
>> tc qdisc add dev ifb0 root handle 1 hfsc default 1
>> tc class add dev ifb0 parent 1: classid 1:1 hfsc sc rate 100mbit ul
>> rate 100mbit
>>
>> for num in {10..1034}
>> do
>> tc class add dev ifb0 parent 1: classid 1:$num hfsc sc rate 1200kbit
>> ul rate 1200kbit
>> tc qdisc add dev ifb0 parent 1:$num handle $num: codel
>> done
>> tc filter add dev ifb0 parent 1: handle 5 prio 1 flow map key proto-src
>> divisor 1024 baseclass 1:10
>>
>> tc qdisc add dev eno16780032 handle ffff: ingress
>> tc filter add dev eno16780032 parent ffff: protocol ip u32 match ip dport
>> 10000 0xffff action mirred egress redirect dev ifb0
>>
>
> I know it's not working properly because a lot of traffic end up in HFSC
> default (1:1), but from what i understand all traffic should be caught by
> the flow map filter and end up in 1:10 to 1:1034 class
> I've tried with/without txqueuelen, with/without codel qdisc, with HTB
> instead of HFSC, but no luck so far.
> I'm on centos 7 (kernel 3.10 +)
>
> Thanks in advance
> Etienne
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.bufferbloat.net/pipermail/bloat/attachments/20160119/fa889d7d/attachment-0002.html>
More information about the Bloat
mailing list