From: Stephen Hemminger <shemminger@vyatta.com>
To: Patrick McHardy <kaber@trash.net>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] TBF: stop qdisc infanticide
Date: Thu, 13 May 2010 09:27:28 -0700 [thread overview]
Message-ID: <20100513092728.766ee059@nehalam> (raw)
In-Reply-To: <4BEC2760.7080704@trash.net>
On Thu, 13 May 2010 18:22:56 +0200
Patrick McHardy <kaber@trash.net> wrote:
> Stephen Hemminger wrote:
> > Several netem users have complained that when using TBF for rate control
> > that any change to TBF parameters destroys the child qdisc. A typical
> > use is to have a test that sets up netem + TBF then changes bandwidth
> > setting. But every time the parameters of TBF are changed it destroys
> > the child qdisc, requiring reconfiguration. Other qdisc's like HTB
> > don't do this.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> >
> >
> > --- a/net/sched/sch_tbf.c 2010-05-12 20:41:06.257006386 -0700
> > +++ b/net/sched/sch_tbf.c 2010-05-12 20:52:35.671216316 -0700
> > @@ -273,7 +273,11 @@ static int tbf_change(struct Qdisc* sch,
> > if (max_size < 0)
> > goto done;
> >
> > - if (qopt->limit > 0) {
> > + if (q->qdisc) {
> > + err = fifo_set_limit(q->qdisc, qopt->limit);
> > + if (err)
> > + goto done;
>
> q->qdisc is never NULL since a noop_qdisc is assigned by default. Also
> this should check that the child is in fact one of the *fifos.
But the child will be netem and fifo_set_limit ignores non-fifo.
next prev parent reply other threads:[~2010-05-13 16:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 16:17 [PATCH] TBF: stop qdisc infanticide Stephen Hemminger
2010-05-13 16:22 ` Patrick McHardy
2010-05-13 16:27 ` Stephen Hemminger [this message]
2010-05-13 16:30 ` Patrick McHardy
2010-05-15 0:38 ` [PATCH] tbf: stop wanton destruction of children (v2) Stephen Hemminger
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=20100513092728.766ee059@nehalam \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).