From: bert hubert <ahu@ds9a.nl>
To: kuznet@ms2.inr.ac.ru
Cc: albertogli@telpin.COM.AR, netdev@oss.sgi.com, jdike@karaya.com
Subject: Re: Frozen machine with adding a tc filter
Date: Tue, 23 Jul 2002 23:28:04 +0200 [thread overview]
Message-ID: <20020723212803.GA14546@outpost.ds9a.nl> (raw)
In-Reply-To: <200207222257.CAA14506@sex.inr.ac.ru>
On Tue, Jul 23, 2002 at 02:57:14AM +0400, kuznet@ms2.inr.ac.ru wrote:
> > Please tell me your ideas,
>
> Well, before all figure out where it deadlocks.
I tried this in User Mode Linux and after some help by Jeff, I figured out
that the deadlock is within cbq_classify() in sch_cbq.c. The problem is that
the 'no upwards classifying' check:
if (cl == NULL || cl->level >= head->level)
goto fallback;
is only applied if the classifyer did not return an answer:
if (!head->filter_list || (result = tc_classify(skb,
head->filter_list, &res)) < 0)
goto fallback;
if ((cl = (void*)res.class) == NULL) {
if (TC_H_MAJ(res.classid))
cl = cbq_class_lookup(q, res.classid);
else if ((cl = defmap[res.classid&TC_PRIO_MAX]) == NULL)
cl = defmap[TC_PRIO_BESTEFFORT];
if (cl == NULL || cl->level >= head->level)
goto fallback;
}
However, with the commandlines specified, the classifier returns.. head, and
the loop prevention test is never performed.
Suggested fix is to move down the test to the end of the loop so it is
always invoked before iterating. Another test that might sense is to see if
head and cl differ before moving on. A loop is guaranteed in that case.
I can build this into a patch if needed, but I suspect Alexey will want to
write his own.
Thanks for your time.
Regards,
bert
--
http://www.PowerDNS.com Versatile DNS Software & Services
http://www.tk the dot in .tk
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
next prev parent reply other threads:[~2002-07-23 21:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-22 3:49 Frozen machine with adding a tc filter Alberto Bertogli
2002-07-22 20:46 ` kuznet
2002-07-22 21:21 ` bert hubert
2002-07-22 22:57 ` kuznet
2002-07-23 21:28 ` bert hubert [this message]
2002-07-23 21:56 ` kuznet
2002-07-23 22:11 ` bert hubert
2002-07-23 22:19 ` kuznet
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=20020723212803.GA14546@outpost.ds9a.nl \
--to=ahu@ds9a.nl \
--cc=albertogli@telpin.COM.AR \
--cc=jdike@karaya.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@oss.sgi.com \
/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).