From: Frederic Lens <flens@linux.lu>
To: lartc@vger.kernel.org
Subject: [LARTC] Weird Filter problem ?
Date: Fri, 11 May 2001 09:01:03 +0000 [thread overview]
Message-ID: <marc-lartc-98957166320119@msgid-missing> (raw)
Hello,
We have a strange problem with the filters on our setup...
We have a PERL module which creates, upon connection of a user, a new
class for bandwidth limiting. We then create a filter for that user
based on his IP address.
Code :
"$TC class add dev $this->{device} parent $this->{parent} " .
"classid 1:$pid cbq bandwidth $this->{MaxRate} rate
$rlimit " .
"allot $this->{allot} weight $weight$runit prio 5 " .
"avpkt $this->{avpkt} bounded" ;
"$TC filter add dev $this->{device} protocol ip parent " .
"$this->{root} prio $pid u32 match ip dst $ipdst " .
"flowid 1:$pid 2>/dev/null" ;
Where : $this->{device} is eth1
$this->{allot} = 1514
$this->{avgpkt} = 1000
$weight is a 10% of $rlimit
$this->{maxrate} is the rate of the eth interface
$pid is a number between 300 and 16000 specific for each
class/filter
$this->{root} is 1:
$this->parent is 1:1
Example :
class cbq 1: root rate 100Mbit (bounded,isolated) prio no-transmit
class cbq 1:1 parent 1: rate 100Mbit prio 1
class cbq 1:516 parent 1:1 rate 400Kbit (bounded) prio 5
class cbq 1:460 parent 1:1 rate 400Kbit (bounded) prio 5
Ok.. .the problem we have is with the filters. Limiting is working
beautifully but when we do a tc filter ls dev eth1 | grep 516 (to see
the number of filters with that particular priority), we should normally
see only one filter related to our flowid, right ? However, we have one
copy of the filter **for each** priority...
Example for prio 516 :
filter parent 1: protocol ip pref 450 u32 fh 8d7::800 order 2048 key ht
8d7 bkt 0 flowid 1:516
filter parent 1: protocol ip pref 460 u32 fh 8d7::800 order 2048 key ht
8d7 bkt 0 flowid 1:516
filter parent 1: protocol ip pref 516 u32
filter parent 1: protocol ip pref 516 u32 fh 878: ht divisor 1
filter parent 1: protocol ip pref 516 u32 fh 878::800 order 2048 key ht
878 bkt 0 flowid 1:2467
filter parent 1: protocol ip pref 516 u32 fh 877: ht divisor 1
filter parent 1: protocol ip pref 516 u32 fh 877::800 order 2048 key ht
877 bkt 0 flowid 1:2466
....
....
....
filter parent 1: protocol ip pref 2463 u32 fh 8d7::800 order 2048 key ht
8d7 bkt 0 flowid 1:516
filter parent 1: protocol ip pref 2464 u32 fh 8d7::800 order 2048 key ht
8d7 bkt 0 flowid 1:516
filter parent 1: protocol ip pref 2465 u32 fh 8d7::800 order 2048 key ht
8d7 bkt 0 flowid 1:516
filter parent 1: protocol ip pref 2466 u32 fh 8d7::800 order 2048 key ht
8d7 bkt 0 flowid 1:516
filter parent 1: protocol ip pref 2467 u32 fh 8d7::800 order 2048 key ht
8d7 bkt 0 flowid 1:516
Any idea what we are doing wrong ? Or maybe it is a problem in the tc
filter ls command ?
BTW, we are using kernel 2.4.3 with iproute2 version 2.2.4-10 (from
RH7.1)
Thanks and best regards,
Frederic Lens & Thierry Coutelier
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
reply other threads:[~2001-05-11 9:01 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-98957166320119@msgid-missing \
--to=flens@linux.lu \
--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.