Re: adding filter to non-root qdisc does not work

Linux Advanced Routing and Traffic Control

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

 



Hauke Laging wrote:
Hello,

I have a tc configuration with two levels of classful qdiscs:

1: HTB
1:1
1:11
111: PRIO

First I used only filters which are attached to 1:. I filter using both fw and
u32 and it seems that everything works as intended.

I noticed that most packets don't have TOS/DSCP bits set. Thus I wanted to
help the PRIO qdisc by adding filters. I ran into one question and one
problem:

How is the relationship of the priomap to filters? Is the priomap used only if
there are no (matching) filters?

The problem is that my filter command seems not to cause anything. There is no
error message, though:

start cmd: # tc qdisc show dev eth1
qdisc htb 1: root refcnt 2 r2q 1 default 122 direct_packets_stat 0
qdisc prio 111: parent 1:11 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1

start cmd: # tc class show dev eth1
class htb 1:1 root rate 210000bit ceil 210000bit burst 1599b cburst 1491b
class htb 1:11 parent 1:1 leaf 111: prio 2 rate 90000bit ceil 210000bit burst
2983b cburst 1491b
class prio 111:1 parent 111:
class prio 111:2 parent 111:
class prio 111:3 parent 111:


It seems not to be possible to add filters to classful qdiscs except for the
root qdisc:

tc filter add dev eth1 protocol ip parent 111:0 prio 1 u32 \
match ip src 192.168.0.0/16 flowid 111:1

The command exits with code 0 (no dmesg output either) but
tc filter show dev eth1
shows no change. I am confused anyway that I get statistics for the u32
filters but not fot the fw filters.

I haven't got time to test to remind myself at the moment - but it should work.

In your examples -

tc filter show dev eth1

needs parent XXXX on the end to show filters below root (use tc -s .... to see counters to confirm it gets traffic).

IIRC the filter for prio needs adding to 1:11.

--
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