Vasudevan, Swaminathan (PNB Roseville)
2005-Oct-17 21:44 UTC
TC show filter command shows all u32 filters defined with different priority iin all priority.
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
Andy Furniss
2005-Oct-17 22:30 UTC
Re: TC show filter command shows all u32 filters defined with different priority iin all priority.
Vasudevan, Swaminathan (PNB Roseville) wrote:> 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.Your script is OK for me. I always put "tc qdisc del dev ethX root" at the beginning of scripts - maybe you reran yours without cleaning up first. [root@amd /home/andy/Qos]# uname -r 2.6.12-rc1 [root@amd /home/andy/Qos]# tc -V tc utility, iproute2-ss050330 [root@amd /home/andy/Qos]# tc filter show dev eth0 parent 13E: filter protocol ip pref 1 u32 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 Andy.
Vasudevan, Swaminathan (PNB Roseville)
2005-Oct-17 22:34 UTC
RE: TC show filter command shows all u32 filters defined with different priority iin all priority.
Hi Andy, Thanks for the reply. I am currently using Linux kernel 2.4.29. -bash-2.05b# tc filter ls -bash-2.05b# tc -V tc utility, iproute2-ss041019 -bash-2.05b# uname -r 2.4.29 I am seeing this problem in this kernel. Should I change the kernel or else should I change the iproute2 to a newer version. Thanks Swami -----Original Message----- From: Andy Furniss [mailto:andy.furniss@dsl.pipex.com] Sent: Monday, October 17, 2005 3:31 PM To: Vasudevan, Swaminathan (PNB Roseville) Cc: lartc@mailman.ds9a.nl Subject: Re: [LARTC] TC show filter command shows all u32 filters defined with different priority iin all priority. Vasudevan, Swaminathan (PNB Roseville) wrote:> 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.Your script is OK for me. I always put "tc qdisc del dev ethX root" at the beginning of scripts - maybe you reran yours without cleaning up first. [root@amd /home/andy/Qos]# uname -r 2.6.12-rc1 [root@amd /home/andy/Qos]# tc -V tc utility, iproute2-ss050330 [root@amd /home/andy/Qos]# tc filter show dev eth0 parent 13E: filter protocol ip pref 1 u32 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 Andy.
Andy Furniss
2005-Oct-17 23:05 UTC
Re: TC show filter command shows all u32 filters defined with different priority iin all priority.
Vasudevan, Swaminathan (PNB Roseville) wrote:> Hi Andy, > Thanks for the reply. > I am currently using Linux kernel 2.4.29. > > -bash-2.05b# tc filter ls > -bash-2.05b# tc -V > tc utility, iproute2-ss041019 > -bash-2.05b# uname -r > 2.4.29 > > I am seeing this problem in this kernel. > Should I change the kernel or else should I change the iproute2 to a > newer version.I don''t know really, I haven''t used 2.4s for a long time. There is a more recent iproute2-ss here http://developer.osdl.org/dev/iproute2/download/iproute2-ss050901.tar.bz2 I would try that first. Andy.
Vasudevan, Swaminathan (PNB Roseville)
2005-Oct-17 23:09 UTC
RE: TC show filter command shows all u32 filters defined with different priority iin all priority.
Hi Andy, I think the problem may reside in the Linux kernel 2.4.29. Because I even tried the "tc utility, iproute2-ss050816". But still the behaviour is same. So there may be some fix in 2.6 branch, which is missing in 2.4.29. Can anyone in the group suggest me if there is any fix for 2.4 kernel. Thanks Swami -----Original Message----- From: Andy Furniss [mailto:andy.furniss@dsl.pipex.com] Sent: Monday, October 17, 2005 4:06 PM To: Vasudevan, Swaminathan (PNB Roseville) Cc: lartc@mailman.ds9a.nl Subject: Re: [LARTC] TC show filter command shows all u32 filters defined with different priority iin all priority. Vasudevan, Swaminathan (PNB Roseville) wrote:> Hi Andy, > Thanks for the reply. > I am currently using Linux kernel 2.4.29. > > -bash-2.05b# tc filter ls > -bash-2.05b# tc -V > tc utility, iproute2-ss041019 > -bash-2.05b# uname -r > 2.4.29 > > I am seeing this problem in this kernel. > Should I change the kernel or else should I change the iproute2 to a > newer version.I don''t know really, I haven''t used 2.4s for a long time. There is a more recent iproute2-ss here http://developer.osdl.org/dev/iproute2/download/iproute2-ss050901.tar.bz 2 I would try that first. Andy.
Vasudevan, Swaminathan (PNB Roseville)
2005-Oct-18 17:56 UTC
RE: TC show filter command shows all u32 filters defined with different priority iin all priority.
Hi Andy, I found out the fix. There is patch in 2.4.30 for cls_32.c. If I apply the patch to my kernel 2.4.29. It seems to be working. Thanks Swami -----Original Message----- From: Andy Furniss [mailto:andy.furniss@dsl.pipex.com] Sent: Monday, October 17, 2005 4:06 PM To: Vasudevan, Swaminathan (PNB Roseville) Cc: lartc@mailman.ds9a.nl Subject: Re: [LARTC] TC show filter command shows all u32 filters defined with different priority iin all priority. Vasudevan, Swaminathan (PNB Roseville) wrote:> Hi Andy, > Thanks for the reply. > I am currently using Linux kernel 2.4.29. > > -bash-2.05b# tc filter ls > -bash-2.05b# tc -V > tc utility, iproute2-ss041019 > -bash-2.05b# uname -r > 2.4.29 > > I am seeing this problem in this kernel. > Should I change the kernel or else should I change the iproute2 to a > newer version.I don''t know really, I haven''t used 2.4s for a long time. There is a more recent iproute2-ss here http://developer.osdl.org/dev/iproute2/download/iproute2-ss050901.tar.bz 2 I would try that first. Andy.