All of lore.kernel.org
 help / color / mirror / Atom feed
From: GGounot <g.gounot@laposte.net>
To: lartc@vger.kernel.org
Subject: Re: PRIO qdisc traffic does not work as expected
Date: Sun, 29 Jun 2014 11:08:22 +0000	[thread overview]
Message-ID: <53AFF3A6.9010309@laposte.net> (raw)
In-Reply-To: <53A1697C.3040400@laposte.net>

I've made the following script.. It should redirect traffic according to 
TOS, but SSH, SCP, HTTP download, etc., but it does not and everything 
goes through 1:2.

Any idea ?

I can see that using :
  tc -s qdisc ls dev ifb0
  tc -s class ls dev ifb0

_________________
DOWNRATE\x1500

tc=/sbin/tc
EHT=eth0
IFB=ifb0
modprobe ifb
modprobe act_mirred
ethtool -K $EHT tso off gso off gro off

$tc qdisc del dev $EHT root 2>/dev/null
$tc qdisc del dev $EHT ingress 2>/dev/null
$tc qdisc del dev $IFB root 2>/dev/null
$tc qdisc del dev $IFB ingress 2>/dev/null

### INGRESS ###
$tc qdisc add dev $EHT handle ffff: ingress
ifconfig $IFB up
$tc filter add dev $EHT parent ffff: protocol all u32 match u32 0 0 
action mirred egress redirect dev $IFB

### HTB ##
$tc qdisc add dev $IFB root handle 1:0 htb default 1
$tc class add dev $IFB parent 1:0 classid 1:1 htb rate ${DOWNRATE}kbps

### PRIO ###
$tc qdisc add dev $IFB parent 1:1 handle 10: prio
$tc qdisc add dev $IFB parent 10:1 handle 101: sfq
$tc qdisc add dev $IFB parent 10:2 handle 102: sfq
$tc qdisc add dev $IFB parent 10:3 handle 103: sfq
___________________


Le 19/06/2014 21:06, Dave Taht a écrit :
> I'm not huge on strict prio queues. And you need to ratelimit in both
> directions, and ifb is best.
>
> On Thu, Jun 19, 2014 at 6:58 AM, Andy Furniss <adf.lists@gmail.com> wrote:
>> GGounot wrote:
>>
>>
>>> The diagram is : Internet <=> eth0 <=> eth1 <=> Client computer
>>> (which downloads using Firefox)
>>>
>>> So shaping on eth1 outgoing traffic should limit the rate Client
>>> receives data from Internet.
>>>
>>> Would shaping on eth0 using : tc qdisc add dev eth0handle ffff:
>>> ingress ifconfig ifb0 up tc filter add dev eth0 parent ffff: protocol
>>> all u32 match u32 0 0 action mirred egress redirect dev ifb0 and run
>>> the script on ifb0 be a better solution ?
>>
>> You could but don't need to as you can do it on eth1.
>>
>> Which ever way you are going to be shaping from the wrong end of the
>> bottleneck so will need to sacrifice some bandwidth for it to work.
>>
>> My previous answer 2. was a bit misleading as it would only have applied
>> if you were maxing eth speed.
>>
>>
>>> Other way : eth0 has a public IP (is directly connected to
>>> Internet).
>>>
>>> eth0 and eth1 are 100Mb/s network PCI cards.
>>>
>>> The Internet link has a rate of ~4000Kb/s.
>>>
>>> Is the use of PRIO qdisc the problem ? (since it (maybe) acts on the
>>>   network card rate, not the actual Internet connection rate)
>>
>> Yes, prio is the problem you need to send the traffic from the internet
>> to something like htb with the rate set to eg. 3500kbit then you can use
>> htb classes to give prio for some traffic over other. You could if you
>> wanted use prio qdisc as a child of htb.
>>
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe lartc" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>


  parent reply	other threads:[~2014-06-29 11:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 10:27 PRIO qdisc traffic does not work as expected GGounot
2014-06-19 10:33 ` Andy Furniss
2014-06-19 11:42 ` GGounot
2014-06-19 13:58 ` Andy Furniss
2014-06-19 19:06 ` Dave Taht
2014-06-29 11:08 ` GGounot [this message]
2014-07-06 17:14 ` Andy Furniss

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=53AFF3A6.9010309@laposte.net \
    --to=g.gounot@laposte.net \
    --cc=lartc@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.