From: alopumo@gmail.com Date: Thu, 03 Sep 2015 13:46:18 +0000 Subject: tc filter add command successful but filter not added in chain Message-Id: <20150903134618.GA15467@taccuino.freaknet.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org 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