All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] question about filter priorities and "tc -d filter show" output
@ 2005-01-27 18:00 jacob martinson
  2005-01-27 22:04 ` jacob martinson
  0 siblings, 1 reply; 2+ messages in thread
From: jacob martinson @ 2005-01-27 18:00 UTC (permalink / raw)
  To: lartc

The interface is setup like this:
# tc qdisc del dev eth0 root
# tc qdisc add dev eth0 root handle 1: htb default 2
# tc class add dev eth0 parent 1: classid 1:2 htb rate 20mbit ceil 20mbit

If I add a second class and a filter to send traffic to it like this:
# tc class add dev eth0 parent 1: classid 1:130 htb rate 1Mbit ceil 1Mbit
# tc filter add dev eth0 protocol ip parent 1:0 prio 130 u32 match ip dst \
> 1.1.1.10 flowid 1:130

The output of "tc -d filter show dev eth0" makes sense to me and looks
like this:
filter parent 1: protocol ip pref 130 u32 
filter parent 1: protocol ip pref 130 u32 fh 800: ht divisor 1 
filter parent 1: protocol ip pref 130 u32 fh 800::800 order 2048 key
ht 800 bkt 0 flowid 1:130
  match 0101010a/ffffffff at 16

If I add a third class and a filter for it, things start looking weird to me:

# tc filter add dev eth0 protocol ip parent 1:0 prio 131 u32 match ip
dst 1.1.1.11 \
> flowid 1:131
# tc class add dev eth0 parent 1: classid 1:132 htb rate 1Mbit ceil 1Mbit
# tc -d filter show dev eth0
filter parent 1: protocol ip pref 130 u32 
filter parent 1: protocol ip pref 130 u32 fh 801: ht divisor 1 
filter parent 1: protocol ip pref 130 u32 fh 801::800 order 2048 key
ht 801 bkt 0 flowid 1:131
  match 0101010b/ffffffff at 16
filter parent 1: protocol ip pref 130 u32 fh 800: ht divisor 1 
filter parent 1: protocol ip pref 130 u32 fh 800::800 order 2048 key
ht 800 bkt 0 flowid 1:130
  match 0101010a/ffffffff at 16
filter parent 1: protocol ip pref 131 u32 
filter parent 1: protocol ip pref 131 u32 fh 801: ht divisor 1 
filter parent 1: protocol ip pref 131 u32 fh 801::800 order 2048 key
ht 801 bkt 0 flowid 1:131
  match 0101010b/ffffffff at 16
filter parent 1: protocol ip pref 131 u32 fh 800: ht divisor 1 
filter parent 1: protocol ip pref 131 u32 fh 800::800 order 2048 key
ht 800 bkt 0 flowid 1:130
  match 0101010a/ffffffff at 16

If N is the number of filters I have on the root qdisc, I get
N-squared entries from the "show filter" command.

Can someone explain how this works or point me to documentation that
explains it?  My system doesn't have a "tc-filters" manpage.

Thanks!

-Jacob
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-01-27 22:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-27 18:00 [LARTC] question about filter priorities and "tc -d filter show" output jacob martinson
2005-01-27 22:04 ` jacob martinson

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.