netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nieścierowicz Adam" <adam.niescierowicz@justnet.pl>
To: Netdev <netdev@vger.kernel.org>
Subject: tc adding two filters with different protocols
Date: Mon, 12 Nov 2012 20:45:51 +0100	[thread overview]
Message-ID: <1ca4bd93df74882980e199ca3fcf83a3@justnet.pl> (raw)

Hello,

writes the qos where i want classify traffic for two protocol: ip and
pppoe. Example below

---
tc qdisc del root dev eth2
tc qdisc add dev eth2 root handle 1: htb
tc class add dev eth2 parent 1:0 classid 1:1 htb rate 500Mbit ceil 
500Mbit


tc filter add dev eth2 parent 1:0 prio 5 protocol ip u32
tc filter add dev eth2 parent 1:0 prio 5 handle 9: protocol ip u32 
divisor 256
tc filter add dev eth2 protocol ip parent 1:0 prio 5 u32 ht 800:: match 
ip dst 172.16.0.0/22 hashkey mask 0x000000ff at 16 link 9:


tc filter add dev eth2 parent 1:0 prio 6 protocol ppp_ses u32
tc filter add dev eth2 parent 1:0 prio 6 handle 4a: protocol ppp_ses 
u32 divisor 256
tc filter add dev eth2 protocol ppp_ses parent 1:0 prio 6 u32 ht 800:: 
match ip dst 31.41.209.0/24 at 24 hashkey mask 0x000000ff at 24 link 4a:
---

Unfortunately, when you add lines "tc filter add dev eth2 protocol 
ppp_ses parent 1:0 prio 6 u32 ht 800:: match ip dst 31.41.209.0/24 at 24 
hashkey mask 0x000000ff at 24 link 4a:" protocol change to ip

command "tc -s -d filter show dev eth2" shows
---
filter parent 1: protocol ip pref 5 u32
filter parent 1: protocol ip pref 5 u32 fh 9: ht divisor 256
filter parent 1: protocol ip pref 5 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 5 u32 fh 800::800 order 2048 key ht 
800 bkt 0 link 9:  (rule hit 557082 success 0)
   match ac100000/fffffc00 at 16 (success 267341 )
     hash mask 000000ff at 16
filter parent 1: protocol ip pref 5 u32 fh 800::801 order 2049 key ht 
800 bkt 0 link 4a:  (rule hit 557039 success 0)
   match 1f29d100/ffffff00 at 24 (success 0 )
     hash mask 000000ff at 24
filter parent 1: protocol ppp_ses pref 6 u32
filter parent 1: protocol ppp_ses pref 6 u32 fh 4a: ht divisor 256
filter parent 1: protocol ppp_ses pref 6 u32 fh 801: ht divisor 1
---
if i change order and first protocol is ppp_ses the hashkey for ip 
protocol is changed to ppp_ses.

Is this correct behavior and I do something wrong?


Thanks
Adam N.

             reply	other threads:[~2012-11-12 19:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12 19:45 Nieścierowicz Adam [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-11-15 15:04 tc adding two filters with different protocols Nieścierowicz Adam

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=1ca4bd93df74882980e199ca3fcf83a3@justnet.pl \
    --to=adam.niescierowicz@justnet.pl \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).