From: "David S. Miller" <davem@davemloft.net>
To: Thomas Graf <tgraf@suug.ch>
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH 2.6] CBQ: Destroy filters before destroying classes
Date: Tue, 19 Oct 2004 21:39:06 -0700 [thread overview]
Message-ID: <20041019213906.2aced91d.davem@davemloft.net> (raw)
In-Reply-To: <20041007175313.GA19628@postel.suug.ch>
On Thu, 7 Oct 2004 19:53:13 +0200
Thomas Graf <tgraf@suug.ch> wrote:
> CBQ destroys its classes by traversing the hashtable and thus classes
> are not destroyed from root to leafs which means that class Y being
> a subclass of class X may be destroyed before X. This is a problem
> if a filter is attached to class X (parent) classifying into class Y
> (result). In case Y gets deleted before X the filter references an
> already deleted class while trying to unbind (cbq_unbind_filter).
> Therefore all filters must be destroyed before destroying classes. An
> additional BUG_TRAP has been added to document this not so obvious case.
Applied, thanks a lot Thomas.
> Patch is relative to "Convert Qdiscs to use generic network
> statistics/estimator" patchset.
BTW, that patch set forgot to handle sch_atm.c, I'm beginning to
believe that I'm the only developer with this packet scheduler
enabled in his test builds :-) Most people don't have it enabled
because it requires CONFIG_ATM to be on.
Anyways, I fixed that up as follows.
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/10/19 21:11:02-07:00 davem@nuts.davemloft.net
# [PKT_SCHED]: Fix sch_atm build.
#
# Move it over to use qstats/bstats.
#
# Signed-off-by: David S. Miller <davem@davemloft.net>
#
# net/sched/sch_atm.c
# 2004/10/19 21:10:26-07:00 davem@nuts.davemloft.net +4 -4
# [PKT_SCHED]: Fix sch_atm build.
#
diff -Nru a/net/sched/sch_atm.c b/net/sched/sch_atm.c
--- a/net/sched/sch_atm.c 2004-10-19 21:21:59 -07:00
+++ b/net/sched/sch_atm.c 2004-10-19 21:21:59 -07:00
@@ -449,12 +449,12 @@
result == TC_POLICE_SHOT ||
#endif
(ret = flow->q->enqueue(skb,flow->q)) != 0) {
- sch->stats.drops++;
+ sch->qstats.drops++;
if (flow) flow->stats.drops++;
return ret;
}
- sch->stats.bytes += skb->len;
- sch->stats.packets++;
+ sch->bstats.bytes += skb->len;
+ sch->bstats.packets++;
flow->stats.bytes += skb->len;
flow->stats.packets++;
/*
@@ -547,7 +547,7 @@
ret = p->link.q->ops->requeue(skb,p->link.q);
if (!ret) sch->q.qlen++;
else {
- sch->stats.drops++;
+ sch->qstats.drops++;
p->link.stats.drops++;
}
return ret;
next prev parent reply other threads:[~2004-10-20 4:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-07 17:53 [PATCH 2.6] CBQ: Destroy filters before destroying classes Thomas Graf
2004-10-20 4:39 ` David S. Miller [this message]
2004-10-20 6:40 ` Thomas Graf
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=20041019213906.2aced91d.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@oss.sgi.com \
--cc=tgraf@suug.ch \
/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).