public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei•com>
To: Hiroaki SHIMODA <shimoda.hiroaki@gmail•com>
Cc: <netdev@vger•kernel.org>
Subject: Re: [PATCH net-next 0/5] net_sched: Adjust qdisc_change() for command "#tc qdisc change/replace ..."
Date: Fri, 7 Mar 2014 10:29:44 +0800	[thread overview]
Message-ID: <53192F18.9020900@huawei.com> (raw)
In-Reply-To: <20140307060818.fa549a2981b601bcec517227@gmail.com>

On 2014/3/7 5:08, Hiroaki SHIMODA wrote:
> On Thu, 6 Mar 2014 21:08:36 +0800
> Yang Yingliang <yangyingliang@huawei•com> wrote:
> 
>> Current commands "#tc qdisc replace..." and "#tc qdisc change..."
>> are not doing what they're supposed to do.
>>
>> E.g.
>>
>> With "#tc qdisc replace ...", it won't clear old option if not specified in
>> qdisc of netem.
>>
>>    # tc qdisc add dev eth4 handle 1: root netem rate 10mbit
>>    # tc qdisc show
>>      qdisc netem 1: dev eth4 root refcnt 2 limit 1000 rate 10Mbit
>>
>>    # tc qdisc replace dev eth4 handle 1: root netem latency 10ms
>>    # tc qdisc show
>>      qdisc netem 1: dev eth4 root refcnt 2 limit 1000 delay 10.0ms rate 10Mbit
>> The old option "rate" is still there.
> 
> It looks like you are trying to replace existing qdisc 1: with
> the same qdisc 1:. So the effect is the same as change.
> If you want to do replace the existing qdisc, you should specify
> other handle or different qdisc.
> 
>> With "#tc qdisc change ... ", it will clear old options if not specified in
>> qdisc of tbf.
>>
>>   # tc qdisc add dev eth4 handle 1: root tbf rate 10mbit burst 10kb latency 50ms mtu 64kb peakrate 20mbit
>>   # tc qdisc show
>>     qdisc tbf 1: dev eth4 root refcnt 2 rate 10Mbit burst 10Kb peakrate 20Mbit minburst 64Kb lat 50.0ms
>>   # tc qdisc change dev eth4 handle 1: root tbf rate 20mbit burst 10kb latency 50ms
>>   # tc qdisc show
>>     qdisc tbf 1: dev eth4 root refcnt 2 rate 20Mbit burst 10Kb lat 50.0ms
>> The old peakrate and minburst are cleared.
> 
> You are assumed to implicitly specify "peakrate 0" at change.
> It seems that you are arguing the tc command, not kernel code.
> There would exist userland commmand whose rate and peakrate
> command options are always mandatory.
> How they support its command options is up to userland I think.
> 

peakrate is not specified, it should not be changed, I think.
peakrate is not mandatory.

I think tc command has no big problem and the real problem is kernel
code treats "change" as "replace", sometimes it treats "replace" as
"change".

Thanks!

      reply	other threads:[~2014-03-07  2:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-06 13:08 [PATCH net-next 0/5] net_sched: Adjust qdisc_change() for command "#tc qdisc change/replace ..." Yang Yingliang
2014-03-06 13:08 ` [PATCH net-next 1/5] net_sched: add flag parameter in qdisc_change Yang Yingliang
2014-03-06 13:08 ` [PATCH net-next 2/5] net_sched: add replace func in struct Qdisc_ops Yang Yingliang
2014-03-06 14:55   ` Eric Dumazet
2014-03-07  2:13     ` Yang Yingliang
2014-03-06 13:08 ` [PATCH net-next 3/5] sch_tbf: change name "tbf_change" to "tbf_replace" Yang Yingliang
2014-03-06 13:08 ` [PATCH net-next 4/5] sch_tbf: add tbf_change for #tc qdisc change Yang Yingliang
2014-03-06 13:08 ` [PATCH net-next 5/5] sch_netem: add netem_replace for #tc qdisc replace Yang Yingliang
2014-03-06 13:16 ` [PATCH net-next 0/5] net_sched: Adjust qdisc_change() for command "#tc qdisc change/replace ..." Hagen Paul Pfeifer
2014-03-07  2:16   ` Yang Yingliang
2014-03-06 21:08 ` Hiroaki SHIMODA
2014-03-07  2:29   ` Yang Yingliang [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=53192F18.9020900@huawei.com \
    --to=yangyingliang@huawei$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=shimoda.hiroaki@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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