PRIO and u32 matching problem

Linux Advanced Routing and Traffic Control

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

 



Hi to everybody
I'm trying to use PRIO qdisc to prioritize the traffic but i have
strange problem maybe I'm missing sometging.
First i add root qdisc like this
tc qdisc add dev eth0 root handle 1: prio

it's fine after this i try to match traffic by tos field but i get error
invalid match

tc filter add dev eth0 parent 1:0 prio 1 protocol ip u32 \
match ip tos 0x10 0xff \
match ip tos 0x12 0xff  \
match ip tos 0x14 0xff \
match ip tos 0x16 0xff \
flowid 1:1

if i use it with only one match it's working like this.
tc filter add dev eth0 parent 1:0 prio 1 protocol ip u32 \
match ip tos 0x10 0xff \
flowid 1:1

i match traffic by type of TOS and put it to different classes
but when i get statistic of the class there is no data.

What is wrong?

here is the example

# tc -s -d qdisc show
qdisc prio 1: dev eth0 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
 Sent 30140564 bytes 42329 pkts (dropped 0, overlimits 0)
qdisc prio 1: dev eth1 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
 Sent 2765825 bytes 29850 pkts (dropped 0, overlimits 0)

~# tc -s -d class show dev eth0
class prio 1:1 parent 1:
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
class prio 1:2 parent 1:
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
class prio 1:3 parent 1:
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)


tc -s -d filter show dev eth0
filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht
800 bkt 0 flowid 1:1  (rule hit 45901 success 3595)
  match 00100000/00ff0000 at 0 (success 3595 )
filter parent 1: protocol ip pref 1 u32 fh 800::801 order 2049 key ht
800 bkt 0 flowid 1:1  (rule hit 42306 success 0)
  match 00120000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 1 u32 fh 800::802 order 2050 key ht
800 bkt 0 flowid 1:1  (rule hit 42306 success 0)
  match 00140000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 1 u32 fh 800::803 order 2051 key ht
800 bkt 0 flowid 1:1  (rule hit 42306 success 0)
  match 00160000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 2 u32
filter parent 1: protocol ip pref 2 u32 fh 801: ht divisor 1
filter parent 1: protocol ip pref 2 u32 fh 801::800 order 2048 key ht
801 bkt 0 flowid 1:2  (rule hit 42306 success 17877)
  match 00000000/00ff0000 at 0 (success 17877 )
filter parent 1: protocol ip pref 2 u32 fh 801::801 order 2049 key ht
801 bkt 0 flowid 1:2  (rule hit 24429 success 0)
  match 00040000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 2 u32 fh 801::802 order 2050 key ht
801 bkt 0 flowid 1:2  (rule hit 24427 success 0)
  match 00060000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 2 u32 fh 801::803 order 2051 key ht
801 bkt 0 flowid 1:2  (rule hit 24426 success 0)
  match 00180000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 2 u32 fh 801::804 order 2052 key ht
801 bkt 0 flowid 1:2  (rule hit 24424 success 0)
  match 001a0000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 2 u32 fh 801::805 order 2053 key ht
801 bkt 0 flowid 1:2  (rule hit 24424 success 0)
  match 001c0000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 2 u32 fh 801::806 order 2054 key ht
801 bkt 0 flowid 1:2  (rule hit 24424 success 0)
  match 001e0000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 3 u32
filter parent 1: protocol ip pref 3 u32 fh 802: ht divisor 1
filter parent 1: protocol ip pref 3 u32 fh 802::800 order 2048 key ht
802 bkt 0 flowid 1:3  (rule hit 24424 success 0)
  match 00020000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 3 u32 fh 802::801 order 2049 key ht
802 bkt 0 flowid 1:3  (rule hit 24424 success 0)
  match 00080000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 3 u32 fh 802::802 order 2050 key ht
802 bkt 0 flowid 1:3  (rule hit 24424 success 0)
  match 000a0000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 3 u32 fh 802::803 order 2051 key ht
802 bkt 0 flowid 1:3  (rule hit 24424 success 0)
  match 000c0000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 3 u32 fh 802::804 order 2052 key ht
802 bkt 0 flowid 1:3  (rule hit 24424 success 0)
  match 000e0000/00ff0000 at 0 (success 0 )

_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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