On Tue, Jul 23, 2002 at 02:57:14AM +0400, kuznet@xxxxxxxxxxxxx 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
|