Historic archive of defunct list cerowrt-users@lists.bufferbloat.net
 help / color / mirror / Atom feed
From: Etienne Champetier <champetier.etienne@gmail.com>
To: bloat@lists.bufferbloat.net, cerowrt-users@lists.bufferbloat.net
Subject: Re: [Cerowrt-users] Per flow ingress limit ?
Date: Tue, 19 Jan 2016 18:22:21 +0100	[thread overview]
Message-ID: <CAOdf3gpDoKM7NYDU1s56LLS8AD=QJC1-euoBVOhf8106-73O1Q@mail.gmail.com> (raw)
In-Reply-To: <CAOdf3goKU5TUTY5Y_ajDdJNDHco0Qfus_+u8wHYp1HeSxPz7uA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2650 bytes --]

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@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
>

[-- Attachment #2: Type: text/html, Size: 3736 bytes --]

      reply	other threads:[~2016-01-19 17:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19  9:32 Etienne Champetier
2016-01-19 17:22 ` Etienne Champetier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOdf3gpDoKM7NYDU1s56LLS8AD=QJC1-euoBVOhf8106-73O1Q@mail.gmail.com' \
    --to=champetier.etienne@gmail.com \
    --cc=bloat@lists.bufferbloat.net \
    --cc=cerowrt-users@lists.bufferbloat.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox