TC show filter command shows all u32 filters defined with different priority iin all priority.

Linux Advanced Routing and Traffic Control

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

 



Hi,
I am currently working on the TC.
I have seen some behaviour which seems to be odd.
I know someone in the mailing list would have seen this problem or may
have some fix for this problem.

When I try to include u32 filters with different priority or pref, I
could see the filters being set on all the priority's irrespective of
the priority number.

See my sample script below and the command "tc filter show dev eth1
parent yy:".

Can anyone suggest a fix for this. Is that a bug in just displaying - if
so has it been fixed or is there any fix available on the net.

Sample Script:

#! /bin/sh
tc qdisc add dev eth1 root handle 1:0 htb r2q 1
tc class add dev eth1 parent 1:0 classid 1:fffe htb rate 100mbit
tc filter add dev eth1 parent 1:0 prio 1 protocol ip u32
tc filter add dev eth1 parent 1:0 prio 1 handle ffe:0 protocol ip u32
divisor 256
tc filter add dev eth1 parent 1:0 prio 1 protocol ip u32 ht 800:: match
u32 \
       0x00000800 0x0000FFFF at -4 hashkey mask 0x00ff0000 at -8 link
ffe:

tc class add dev eth1 parent 1:fffe classid 1:13E htb rate 100mbit
tc qdisc add dev eth1 parent 1:13E handle 13E:0 htb r2q 1
tc class add dev eth1 parent 13E:0 classid 13E:1 htb rate 100mbit
tc class add dev eth1 parent 13E:0 classid 13E:2 htb rate 100mbit
tc qdisc add dev eth1 parent 13E:2 tbf rate 1bps burst 1 latency 50ms
tc filter add dev eth1 parent 1:0 prio 1 protocol ip u32 ht ffe:3E match
u32 \
    0x000bcd59 0xffffffff at -12 match u16 0x123E 0xffff at -8 flowid
1:13E

#### Queue 1
tc filter add dev eth1 parent 13E:0 prio 1 protocol ip u32 match ip
protocol 1 0xff flowid 13E:2
tc filter add dev eth1 parent 13E:0 prio 2 protocol ip u32 match ip
protocol 2 0xff flowid 13e:2

#### Queue 2
tc filter add dev eth1 parent 13E:0 prio 1 protocol ip u32 match ip
protocol 6 0xff flowid 13E:1


##### Command show filter shows all three filters under all three
priority's

-bash-2.05b# tc filter show dev eth1 parent 13E:
filter protocol ip pref 1 u32
filter protocol ip pref 1 u32 fh 801: ht divisor 1
filter protocol ip pref 1 u32 fh 801::800 order 2048 key ht 801 bkt 0
flowid 13e
:2
  match 00020000/00ff0000 at 8
filter protocol ip pref 1 u32 fh 800: ht divisor 1
filter protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0
flowid 13e
:2
  match 00010000/00ff0000 at 8
filter protocol ip pref 1 u32 fh 800::801 order 2049 key ht 800 bkt 0
flowid 13e
:1
  match 00060000/00ff0000 at 8
filter protocol ip pref 2 u32
filter protocol ip pref 2 u32 fh 801: ht divisor 1
filter protocol ip pref 2 u32 fh 801::800 order 2048 key ht 801 bkt 0
flowid 13e
:2
  match 00020000/00ff0000 at 8
filter protocol ip pref 2 u32 fh 800: ht divisor 1
filter protocol ip pref 2 u32 fh 800::800 order 2048 key ht 800 bkt 0
flowid 13e
:2
  match 00010000/00ff0000 at 8
filter protocol ip pref 2 u32 fh 800::801 order 2049 key ht 800 bkt 0
flowid 13e
:1
  match 00060000/00ff0000 at 8

Please can anyone tell me what to do.

Thanks
Swami
_______________________________________________
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