From: Patrick McHardy <kaber@trash.net>
To: Martin Devera <devik@cdi.cz>
Cc: Jarek Poplawski <jarkao2@o2.pl>, netdev@vger.kernel.org
Subject: Re: [NET_SCHED 06/06]: Fix endless loops (part 4): HTB
Date: Thu, 23 Nov 2006 10:48:40 +0100 [thread overview]
Message-ID: <45656E78.6070108@trash.net> (raw)
In-Reply-To: <45656AAB.3080903@cdi.cz>
Martin Devera wrote:
>> In htb_graft it was necessary because the class could be
>> either active (qlen > 0) or inactive (qlen == 0). But since
>> qdisc_tree_decrease_qlen does nothing in case of a decrease
>> of zero the callback is only called for active classes and
>> the check becomes unnecessary.
>>
>
> Patrick is right here. prio_activity for leaf is set in htb's enqueue
> routines. The qlen callback is called when len changed and because
> that zero test in htb's callback it is sure the subclass was nonempty
> before.
BTW, I plan to remove the check for empty child qdiscs in
htb_dequeue_tree and the check for prio_activity after the
calls to qdisc_tree_decrease_len in htb_change_class as a
follow-up patch in 2.6.20, for now I kept them to be safe.
> The only problem might be if some subqdisc "creates" new packets,
> then htb might deactivate non-active class (leading to BUG()).
> IIRC no qdisc does it...
netem can duplicate packets, but it enqueues them at the root,
so it shouldn't be a problem. It might be preferable to do
something similar to qdisc_tree_decrease_qlen in that case to
make sure the packet really ends up in the netem qdisc, but for
now I just wanted to fix the endless loops.
next prev parent reply other threads:[~2006-11-23 9:48 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-20 13:08 [NET_SCHED 00/06]: Fix endless dequeue loops Patrick McHardy
2006-11-20 13:08 ` [NET_SCHED 01/06]: sch_htb: perform qlen adjustment immediately in ->delete Patrick McHardy
2006-11-30 1:35 ` David Miller
2006-11-20 13:08 ` [NET_SCHED 02/06]: Set parent classid in default qdiscs Patrick McHardy
2006-11-30 1:35 ` David Miller
2006-11-20 13:08 ` [NET_SCHED 03/06]: Fix endless loops caused by inaccurate qlen counters (part 1) Patrick McHardy
2006-11-20 14:23 ` Mika Penttilä
2006-11-20 14:31 ` Patrick McHardy
2006-11-20 14:44 ` Mika Penttilä
2006-11-20 14:51 ` Patrick McHardy
2006-11-20 16:07 ` Mika Penttilä
2006-11-20 16:42 ` Patrick McHardy
2006-11-30 1:35 ` David Miller
2006-11-20 13:08 ` [NET_SCHED 04/06]: Fix endless loops (part 2): "simple" qdiscs Patrick McHardy
2006-11-24 12:33 ` Jarek Poplawski
2006-11-24 13:07 ` Patrick McHardy
2006-11-24 13:37 ` Jarek Poplawski
2006-11-27 6:46 ` Jarek Poplawski
2006-11-30 1:36 ` David Miller
2006-11-20 13:08 ` [NET_SCHED 05/06]: Fix endless loops (part 3): HFSC Patrick McHardy
2006-11-30 1:36 ` David Miller
2006-11-20 13:08 ` [NET_SCHED 06/06]: Fix endless loops (part 4): HTB Patrick McHardy
2006-11-20 13:39 ` Martin Devera
2006-11-23 8:39 ` Jarek Poplawski
2006-11-23 8:44 ` Patrick McHardy
2006-11-23 9:01 ` Jarek Poplawski
2006-11-23 9:07 ` Patrick McHardy
2006-11-23 9:32 ` Martin Devera
2006-11-23 9:48 ` Patrick McHardy [this message]
2006-11-23 10:59 ` Jarek Poplawski
2006-11-30 1:37 ` David Miller
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=45656E78.6070108@trash.net \
--to=kaber@trash.net \
--cc=devik@cdi.cz \
--cc=jarkao2@o2.pl \
--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 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.