From: Patrick McHardy <kaber@trash.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] tc del class not working
Date: Wed, 10 May 2006 04:43:52 +0000 [thread overview]
Message-ID: <44616F88.4000304@trash.net> (raw)
In-Reply-To: <0633E0EDB4F25F43A2D7179CA11FAFAB25530F@xavier.staff.greatlakes.net>
Andreas Mueller wrote:
> I allways forget attachments. ;)
>
>
> ------------------------------------------------------------------------
>
> --- linux/net/sched/sch_hfsc.c~ 2006-01-15 07:16:02.000000000 +0100
> +++ linux/net/sched/sch_hfsc.c 2006-05-10 00:07:07.000000000 +0200
> @@ -970,14 +970,15 @@
> {
> struct hfsc_class *p;
> unsigned int level;
> -
> + int adj = 0;
> do {
> level = 0;
> list_for_each_entry(p, &cl->children, siblings) {
> if (p->level > level)
> level = p->level;
> + adj = 1;
> }
> - cl->level = level + 1;
> + cl->level = level + adj;
> } while ((cl = cl->cl_parent) != NULL);
> }
Nice catch, this could result in quite some undesirable behaviour.
The unconditional + 1 seems to be a thinko originating in class
addition. A slightly prettier fix would be to just change
if (p->level > level)
level = p->level
to
if (p->level >= level)
level = p->level + 1
If you send me a patch which does that and a proper Signed-off-by:
line I'll push it upstream for 2.6.17.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
prev parent reply other threads:[~2006-05-10 4:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-09 18:10 [LARTC] tc del class not working Eliot, Wireless and Server Administrator, Great Lakes Internet
2006-05-09 22:17 ` Andreas Mueller
2006-05-09 22:19 ` Andreas Mueller
2006-05-10 4:43 ` Patrick McHardy [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=44616F88.4000304@trash.net \
--to=kaber@trash.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.