I checked that the filters cannot classify the traffic -
all the traffics are enqueued to the default class,
so they cannot allocate their bandwidth.
I followed the cbq kernel source code line by line and here is a cbq_classify:
(see my comments between the lines)
// net/sched/sch_cbq.c (kernel version 2.4.19)
static struct cbq_class *
cbq_classify(struct sk_buff *skb, struct Qdisc *sch)
{
struct cbq_sched_data *q = (struct cbq_sched_data*)sch->data;
struct cbq_class *head = &q->link;
struct cbq_class **defmap;
struct cbq_class *cl = NULL;
u32 prio = skb->priority;
struct tcf_result res;
/*
* Step 1. If skb->priority points to one of our classes, use it.
*/
if (TC_H_MAJ(prio^sch->handle) == 0 &&
(cl = cbq_class_lookup(q, prio)) != NULL)
return cl;
for (;;) {
int result = 0;
defmap = head->defaults;
/*
* Step 2+n. Apply classifier.
*/
<<my comment>> in 'tc_classify' function, if the traffic has an appropriate
<<my comment>> filter, class is selected for the traffic.
<<my comment>> Normally, appropriate classes are selected on the Pentium CPU,
<<my comment>> but not on the MPC8250 (PowerPC based CPU) for the same traffic
<<my comment>> and the same tc configuration, so 'goto fallback'
<<my comment>> I used u32 filter for packet classification : Is u32_classify
<<my comment>> function eventually called?
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;
}
#ifdef CONFIG_NET_CLS_POLICE
switch (result) {
case TC_POLICE_RECLASSIFY:
return cbq_reclassify(skb, cl);
case TC_POLICE_SHOT:
return NULL;
default:
break;
}
#endif
<<my comment>> if the traffic founds its filters,
<<my comment>> class is returned at this point (on the Pentium CPU).
if (cl->level == 0)
return cl;
/*
* Step 3+n. If classifier selected a link sharing class,
* apply agency specific classifier.
* Repeat this procdure until we hit a leaf node.
*/
head = cl;
}
fallback:
cl = head;
/*
* Step 4. No success...
*/
if (TC_H_MAJ(prio) == 0 &&
!(cl = head->defaults[prio&TC_PRIO_MAX]) &&
!(cl = head->defaults[TC_PRIO_BESTEFFORT]))
return head;
return cl;
}
but one thing strange is when I check the filter list with the command
'tc filter show dev eth0' nothing wrong in the filter lists.
Any Idea or recommendation for more investigation?stef.coene@docum.org |