[LARTC] Re: prio and filters

Linux Advanced Routing and Traffic Control

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

 



Well I got more smartbits to my development bench and
tried out various precidence values from two ethernet
ports going out a t1 port.  The receiving smartbits on
the other end show that the low priority flows were
starved while I did 100 t1 load at the high priority. 
So this does work as advertised.  I guess the filter
listing is just a hash table view of things or
something.  It doesn't make sense from my current
understanding.

Thanks to you folks who have coded this tool and you
folks who are documenting it.  It's been a big help.

JR.
--- JH <jrtweeter@yahoo.com> wrote:
> 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
>  <I currently don't care about the TOS field bits.>
> 
> 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
> <output from ls above>
> 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
> <end ls output>
> 
> 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
> <output from ls above>
> 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
> <end ls output>
> 
> 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
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com


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