All of lore.kernel.org
 help / color / mirror / Atom feed
From: JH <jrtweeter@yahoo.com>
To: lartc@vger.kernel.org
Subject: [LARTC] prio and filters
Date: Wed, 12 Feb 2003 05:49:50 +0000	[thread overview]
Message-ID: <marc-lartc-104502904601925@msgid-missing> (raw)

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
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

                 reply	other threads:[~2003-02-12  5:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-104502904601925@msgid-missing \
    --to=jrtweeter@yahoo.com \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.