Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Stanislav Nedelchev <stanislav.nedelchev@gmail.com>
To: lartc@vger.kernel.org
Subject: [LARTC] PRIO and u32 matching problem
Date: Fri, 07 Apr 2006 10:32:21 +0000	[thread overview]
Message-ID: <44363FB5.3020003@gmail.com> (raw)

Hi to everybody
I'm trying to use PRIO qdisc to prioritize the traffic but i have
strange problem maybe I'm missing sometging.
First i add root qdisc like this
tc qdisc add dev eth0 root handle 1: prio

it's fine after this i try to match traffic by tos field but i get error
invalid match

tc filter add dev eth0 parent 1:0 prio 1 protocol ip u32 \
match ip tos 0x10 0xff \
match ip tos 0x12 0xff  \
match ip tos 0x14 0xff \
match ip tos 0x16 0xff \
flowid 1:1

if i use it with only one match it's working like this.
tc filter add dev eth0 parent 1:0 prio 1 protocol ip u32 \
match ip tos 0x10 0xff \
flowid 1:1

i match traffic by type of TOS and put it to different classes
but when i get statistic of the class there is no data.

What is wrong?

here is the example

# tc -s -d qdisc show
qdisc prio 1: dev eth0 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
 Sent 30140564 bytes 42329 pkts (dropped 0, overlimits 0)
qdisc prio 1: dev eth1 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
 Sent 2765825 bytes 29850 pkts (dropped 0, overlimits 0)

~# tc -s -d class show dev eth0
class prio 1:1 parent 1:
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
class prio 1:2 parent 1:
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
class prio 1:3 parent 1:
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)


tc -s -d filter show 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  (rule hit 45901 success 3595)
  match 00100000/00ff0000 at 0 (success 3595 )
filter parent 1: protocol ip pref 1 u32 fh 800::801 order 2049 key ht
800 bkt 0 flowid 1:1  (rule hit 42306 success 0)
  match 00120000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 1 u32 fh 800::802 order 2050 key ht
800 bkt 0 flowid 1:1  (rule hit 42306 success 0)
  match 00140000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 1 u32 fh 800::803 order 2051 key ht
800 bkt 0 flowid 1:1  (rule hit 42306 success 0)
  match 00160000/00ff0000 at 0 (success 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  (rule hit 42306 success 17877)
  match 00000000/00ff0000 at 0 (success 17877 )
filter parent 1: protocol ip pref 2 u32 fh 801::801 order 2049 key ht
801 bkt 0 flowid 1:2  (rule hit 24429 success 0)
  match 00040000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 2 u32 fh 801::802 order 2050 key ht
801 bkt 0 flowid 1:2  (rule hit 24427 success 0)
  match 00060000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 2 u32 fh 801::803 order 2051 key ht
801 bkt 0 flowid 1:2  (rule hit 24426 success 0)
  match 00180000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 2 u32 fh 801::804 order 2052 key ht
801 bkt 0 flowid 1:2  (rule hit 24424 success 0)
  match 001a0000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 2 u32 fh 801::805 order 2053 key ht
801 bkt 0 flowid 1:2  (rule hit 24424 success 0)
  match 001c0000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 2 u32 fh 801::806 order 2054 key ht
801 bkt 0 flowid 1:2  (rule hit 24424 success 0)
  match 001e0000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 3 u32
filter parent 1: protocol ip pref 3 u32 fh 802: ht divisor 1
filter parent 1: protocol ip pref 3 u32 fh 802::800 order 2048 key ht
802 bkt 0 flowid 1:3  (rule hit 24424 success 0)
  match 00020000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 3 u32 fh 802::801 order 2049 key ht
802 bkt 0 flowid 1:3  (rule hit 24424 success 0)
  match 00080000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 3 u32 fh 802::802 order 2050 key ht
802 bkt 0 flowid 1:3  (rule hit 24424 success 0)
  match 000a0000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 3 u32 fh 802::803 order 2051 key ht
802 bkt 0 flowid 1:3  (rule hit 24424 success 0)
  match 000c0000/00ff0000 at 0 (success 0 )
filter parent 1: protocol ip pref 3 u32 fh 802::804 order 2052 key ht
802 bkt 0 flowid 1:3  (rule hit 24424 success 0)
  match 000e0000/00ff0000 at 0 (success 0 )

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

                 reply	other threads:[~2006-04-07 10:32 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=44363FB5.3020003@gmail.com \
    --to=stanislav.nedelchev@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox