Re: tc filter add command successful but filter not added in chain

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



works.

specifying "parent 9002:" in "tc filter show dev eth0"

shows the filter.

thanks Lee :)


On Thu, Sep 03, 2015 at 08:51:16AM -0700, Lee Brown wrote (verbatim):
> I tried replying to the list but it bounced, so simply:
> 
> try adding root to the end of the command line, so something like:
> 
> tc filter show dev eth0 root
> 
> Depending on the type of device (NIC, VLAN, IFB, etc.) it appears to use a
> different root handle (my vlan requires ffff: as root handle, while my
> IFB's require 0)
> 
> Hope that helps -- lee
> 
> On Thu, Sep 3, 2015 at 6:46 AM, <alopumo@xxxxxxxxx> wrote:
> 
> >
> > I would like to use sfq in a htb class with a custom hashing (flow hash or
> > flow map).
> >
> > SFQ with custom hasing works,
> >
> >
> >   1.  tc qdisc add dev eth0 root sfq perturb 10
> >
> >   2.  tc add filter dev eth0 handle 1 flow hash keys src perturb 10
> > divisor 1024
> > or
> >   2.  tc add filter dev eth0 handle 1 flow map key src and 0x000000ff
> >
> > When I add the sfq qdisc to an htb class and try to do 2. I get no error
> > from tc (and the kernel)
> >
> > but the filter does not get added. There is no filter in tc -s filter show
> > dev eth0 .
> >
> > The commands:
> >
> >       tc qdisc add dev eth0 root handle 9001: htb default 20
> >       tc class add dev eth0 parent 9001: classid 9001:1 htb rate 4mbit
> > burst 15k
> >       tc class add dev eth0 parent 9001:1 classid 9001:10 htb rate 3mbit
> >       tc class add dev eth0 parent 9001:1 classid 9001:20 htb rate 1mbit
> >       tc qdisc add dev eth0 parent 9001:10 sfq perturb 10
> >
> >       tc filter add dev eth0 parent 9002: handle 1 flow map key src and
> > 0x000000ff
> >       (where 9002: is the class of the sfq qdisc)
> >
> > I also tried with a basic filter (tc filter add .. parent 9002: basic ...)
> > and same result.
> >
> > I added printk in cls_api.c, cls_flow.c, sch_api.c to see what was going
> > on. Linux kernel version
> >
> > 3.13.0 (this is the version installed in the embedded system I am working
> > on).
> >
> > No errors are generated. The class op ->change() returns with err = 0.
> >
> >
> > Anyone ?
> >
> >
> > P.S. adding "handle 1" in tc filter add ... flow ... is something that is
> > not well documented.
> >
> > If tc filter add ... flow ... is run with handle 1 it returns with error
> > but does not says anything.
> >
> >
> > Thanks
> >
> > Andrea
> > --
> > To unsubscribe from this list: send the line "unsubscribe lartc" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >

-- 
--
To unsubscribe from this list: send the line "unsubscribe lartc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux