From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 1D2E83B2AE; Tue, 19 Jan 2016 12:22:42 -0500 (EST) Received: by mail-wm0-x233.google.com with SMTP id n5so123551059wmn.0; Tue, 19 Jan 2016 09:22:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=HAtcEX+5FWq4UsIkf2KhT+3kwAigyRd7YCfT4tu7JDU=; b=GsBOdGZTShH+0uRF1Snb+nGsSKEqV7h0dbdGB9HooGr6E25LnCSvEmAqYlXhlnQblr Wx26wPGCVRRlLl1j7SXpe4o8v3W+9zwdyDvbW1NPo7FKZROGALX4rpJ6yZC+hCJCXGxq r6Pwt15FHPpK87KFZ4XaB0El2q7rnGXPUei1JeWlLV1ymDmAw1ZrdwJQOn4qLKGMm1Yp IJjrTlWeIwGBlJPfKQNCiQJyujOl3Gbm9sUUvpyzJnvpuzBkCxqpqq4eBTboNuEw00S3 i0N8zGB2P2upGlYj433d5JWUFA8mdwR1y/ive1S/Qi1F+/7KPnK9UMOAc8XQ3CF1Rb1L RxHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=HAtcEX+5FWq4UsIkf2KhT+3kwAigyRd7YCfT4tu7JDU=; b=M8HbWG3Gbv2FzS+BfRsydaLUtm0rjUxuIug0/X3QHONqoTy1li/+sfn7vOSjwevalw uR/xqqlc+jqDCouc1f4jIzcNxoL6doNugEzW/3Oet9H5yOlIFxedl9C+NHidDimSEwrN sVptAYmNskKxXFalQEApsyZHWfAjJ3dCblLLx79Lr8IoGooGNxAimFrPWmEyhTo2jP/J ufQ5xSZzRGRXtUDZbZZ4bNmwSfFZYcsTseIDKGt7yJq3Fc4QHCCWCnER78VfyN/WTKSh nce7/PyCDxf8N7lNzruyh0sLZswsHizoRaf3Np1nFy1UyMNv2YZwr7zLwfafY8RNznAd FtMA== X-Gm-Message-State: AG10YORMjwNuz6oYChb/KHFw/YsE5GYQrfsnZm8kczqeQoG8FVP4NfpTzuQlaFu7f7UQZRjs7m8oQrSWp17gLQ== X-Received: by 10.194.7.67 with SMTP id h3mr2576308wja.44.1453224160729; Tue, 19 Jan 2016 09:22:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.129.193 with HTTP; Tue, 19 Jan 2016 09:22:21 -0800 (PST) In-Reply-To: References: From: Etienne Champetier Date: Tue, 19 Jan 2016 18:22:21 +0100 Message-ID: To: bloat@lists.bufferbloat.net, cerowrt-users@lists.bufferbloat.net Content-Type: multipart/alternative; boundary=047d7b450aa2e11e660529b31da6 Subject: Re: [Cerowrt-users] Per flow ingress limit ? X-BeenThere: cerowrt-users@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Support for user problems regarding cerowrt List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2016 17:22:43 -0000 --047d7b450aa2e11e660529b31da6 Content-Type: text/plain; charset=UTF-8 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 : > 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 > --047d7b450aa2e11e660529b31da6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

found my mistake :)
classid are hex number !!!
here an exemple that work
($num -> $(printf "%x" $num))
(baseclass 1:10 -> bas= eclass 1:a)

modpr= obe ifb numifbs=3D1
ip link set dev ifb0 up
tc qdisc add dev ifb0 roo= t handle 1 hfsc default 1
tc class add dev ifb0 parent 1: =C2=A0classid = 1:1 =C2=A0hfsc sc rate 100mbit ul rate 100mbit

for num in {10..1034}=
do
=C2=A0 tc class add dev ifb0 parent 1: =C2=A0classid 1:$(printf &= quot;%x" $num) =C2=A0hfsc sc rate 1200kbit ul rate 1200kbit
=C2=A0 = tc qdisc add dev ifb0 parent 1:$(printf "%x" $num) handle $(print= f "%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 eno= 16780032 parent ffff: protocol ip u32 match ip dport 443 0xffff action mirr= ed egress redirect dev ifb0
tc filter add dev eno16780032 parent ffff: p= rotocol ip u32 match ip dport 10000 0xffff action mirred egress redirect de= v ifb0

Regards
= Etienne


2016-01-19 10:32 GMT+01:00 Etienne Champetier &l= t;champet= ier.etienne@gmail.com>:
Hi all,

(this is a = bit off topic but i'm sure AQM experts here can help me)

<= div>I'm playing with jitsi meet lately, which use up to 1800 kbits/s up= load bandwidth (and auto adapt to the available bandwith).
I'm tryin= g 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=3D1
ip link set dev ifb0 up
#ip link s= et ifb0 txqueuelen 1000
tc qdisc add dev ifb0 root handle 1 hfsc default= 1
tc class add dev ifb0 parent 1: =C2=A0classid 1:1 =C2=A0hfsc sc rate = 100mbit ul rate 100mbit

for num in {10..1034}
do
=C2=A0tc clas= s add dev ifb0 parent 1: =C2=A0classid 1:$num =C2=A0hfsc sc rate 1200kbit u= l rate 1200kbit
=C2=A0tc qdisc add dev ifb0 parent 1:$num handle $num: c= odel
done
tc filter add dev ifb0 parent 1: handle 5 prio 1 flow map k= ey proto-src divisor 1024 baseclass 1:10

tc qdisc add dev eno1678003= 2 handle ffff: ingress
tc filter add dev eno16780032 parent ffff: protoc= ol ip u32 match ip dport 10000 0xffff action mirred egress redirect dev ifb= 0

I know it's not working properly = because a lot of traffic end up in HFSC default (1:1), but from what i unde= rstand 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, wi= th/without codel qdisc, with HTB instead of HFSC, but no luck so far.
I'm on centos 7 (kernel 3.10 +)

Thanks in ad= vance
Etienne

--047d7b450aa2e11e660529b31da6--