[Top] [All Lists]

Re: Frozen machine with adding a tc filter

To: kuznet@xxxxxxxxxxxxx
Subject: Re: Frozen machine with adding a tc filter
From: bert hubert <ahu@xxxxxxx>
Date: Wed, 24 Jul 2002 00:11:42 +0200
Cc: albertogli@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx, jdike@xxxxxxxxxx
In-reply-to: <200207232156.BAA16799@xxxxxxxxxxxxx>
Mail-followup-to: bert hubert <ahu@xxxxxxx>, kuznet@xxxxxxxxxxxxx, albertogli@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx, jdike@xxxxxxxxxx
References: <20020723212803.GA14546@xxxxxxxxxxxxxxx> <200207232156.BAA16799@xxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
User-agent: Mutt/1.3.28i
On Wed, Jul 24, 2002 at 01:56:22AM +0400, kuznet@xxxxxxxxxxxxx wrote:
> Hello!
> > However, with the commandlines specified, the classifier returns.. head,
> This is strange. cbq_bind_filter() is supposed to return nil class,
> unless reference has deeper level.

These are the commandlines:

tc qdisc add dev eth0 handle 1:0 root cbq bandwidth 12500000bps avpkt 1000      
tc class add dev eth0 parent 1:0 classid 1:2 cbq bandwidth 12500000bps rate \
        10000bps allot 1500 avpkt 1000 maxburst 5 bounded                       
tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 1:0:0 u32 \
          divisor 1
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match u32 \            
        0xd5f4a8d2 0xffffffff at 16 classid 1:0  

In the last command, cbq_bind_filter is called with parent==0:

static unsigned long cbq_bind_filter(struct Qdisc *sch, unsigned long parent,
                                     u32 classid)
        struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data;
        struct cbq_class *p = (struct cbq_class*)parent;
        struct cbq_class *cl = cbq_class_lookup(q, classid);

        if (cl) {
                if (p && p->level <= cl->level)
                        return 0;
                return (unsigned long)cl;
        return 0;

cl->level is in fact 1.



--          Versatile DNS Software & Services                              the dot in .tk           Linux Advanced Routing & Traffic Control HOWTO

<Prev in Thread] Current Thread [Next in Thread>