From mboxrd@z Thu Jan 1 00:00:00 1970 From: JH Date: Wed, 12 Feb 2003 05:49:50 +0000 Subject: [LARTC] prio and filters Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org I'm attempting to support prioritization of OSPF and similar protocols in a multiport router running linux. These protocols use the precedence field in the IP TOS byte (next to the TOS field). Currently I'm just focused on the two most significant bits of the precedence. I am using a prio qdisc and am applying filters. What I don't understand is the result I get when I list the filters. They make me think that things aren't really prioritized. Here is a beif list of what I've done: tc qdisc add dev eth0 root handle 1: prio bands 4 \ priomap 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 tc filter add dev eth0 parent 1:0 pref 1 protocol ip \ u32 match ip tos 0xc0 0xc0 flowid 1:1 tc filter ls 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 match 00c00000/00c00000 at 0 tc filter add dev eth0 parent 1:0 pref 2 protocol ip \ u32 match ip tos 0x80 0xc0 flowid 1:2 tc filter ls dev eth0 filter parent 1: protocol ip pref 1 u32 filter parent 1: protocol ip pref 1 u32 fh 801: ht divisor 1 filter parent 1: protocol ip pref 1 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:2 match 00800000/00c00000 at 0 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 match 00c00000/00c00000 at 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 match 00800000/00c00000 at 0 filter parent 1: protocol ip pref 2 u32 fh 800: ht divisor 1 filter parent 1: protocol ip pref 2 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1 match 00c00000/00c00000 at 0 With only 2 filters I get 4 in the list with both tests in each preference catagory. Shouldn't I just get one in each of there respective preference catagories? Is this just how the hash table sees things and it actually works like I expect? I have attached pfifo qdisc to the filters and the stats show them being used, but is prioritization actually happening based on the filter. I am using a smartbits to jam 100% line rate into the box and I doubt the box supports 100Mb ethernet line rate so I shoud see prioritization happening, but my capture shows it isn't or possibly the reverse of my desired result is happening. I noticed that the listing of filters above has 1:2 listed first then 1:1, even though I typed them in 1:1 first. Can someone explain this to me? Thanks for the help, JR. __________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/