<div dir="ltr"><div><div><div><div>Hi,<br><br></div>found my mistake :)<br></div>classid are hex number !!!<br></div>here an exemple that work<br></div>($num -> $(printf "%x" $num))<br>(baseclass 1:10 -> baseclass 1:a)<div><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">modprobe ifb numifbs=1<br>ip link set dev ifb0 up<br>tc qdisc add dev ifb0 root handle 1 hfsc default 1<br>tc class add dev ifb0 parent 1:  classid 1:1  hfsc sc rate 100mbit ul rate 100mbit<br><br>for num in {10..1034}<br>do<br>  tc class add dev ifb0 parent 1:  classid 1:$(printf "%x" $num)  hfsc sc rate 1200kbit ul rate 1200kbit<br>  tc qdisc add dev ifb0 parent 1:$(printf "%x" $num) handle $(printf "%x" $num): codel<br>done<br><br>tc filter add dev ifb0 parent 1: handle 5 prio 1 flow map key proto-src divisor 1024 baseclass 1:a<br><br>tc qdisc add dev eno16780032 handle ffff: ingress<br>tc filter add dev eno16780032 parent ffff: protocol ip u32 match ip dport 443 0xffff action mirred egress redirect dev ifb0<br>tc filter add dev eno16780032 parent ffff: protocol ip u32 match ip dport 10000 0xffff action mirred egress redirect dev ifb0<br></blockquote><div><div><div><br></div><div>Regards<br></div><div>Etienne<br></div><div><br><div class="gmail_extra"><br><div class="gmail_quote">2016-01-19 10:32 GMT+01:00 Etienne Champetier <span dir="ltr"><<a href="mailto:champetier.etienne@gmail.com" target="_blank">champetier.etienne@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi all,<br><br></div><div>(this is a bit off topic but i'm sure AQM experts here can help me)<br><br></div><div>I'm playing with jitsi meet lately, which use up to 1800 kbits/s upload bandwidth (and auto adapt to the available bandwith).<br>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.<br><br></div><div>Here is my test:<br><br></div><div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">modprobe ifb numifbs=1<br>ip link set dev ifb0 up<br>#ip link set ifb0 txqueuelen 1000<br>tc qdisc add dev ifb0 root handle 1 hfsc default 1<br>tc class add dev ifb0 parent 1:  classid 1:1  hfsc sc rate 100mbit ul rate 100mbit<br><br>for num in {10..1034}<br>do<br> tc class add dev ifb0 parent 1:  classid 1:$num  hfsc sc rate 1200kbit ul rate 1200kbit<br> tc qdisc add dev ifb0 parent 1:$num handle $num: codel<br>done<br>tc filter add dev ifb0 parent 1: handle 5 prio 1 flow map key proto-src divisor 1024 baseclass 1:10<br><br>tc qdisc add dev eno16780032 handle ffff: ingress<br>tc filter add dev eno16780032 parent ffff: protocol ip u32 match ip dport 10000 0xffff action mirred egress redirect dev ifb0<br></blockquote><div><br></div><div>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<br></div><div>I've tried with/without txqueuelen, with/without codel qdisc, with HTB instead of HFSC, but no luck so far.<br></div><div>I'm on centos 7 (kernel 3.10 +)<br><br></div><div>Thanks in advance<span class=""><font color="#888888"><br></font></span></div><span class=""><font color="#888888"><div>Etienne<br></div></font></span></div></div>
</blockquote></div><br></div></div></div></div></div></div>