Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: "Martin Schiøtz" <malinux@gmail.com>
To: lartc@vger.kernel.org
Subject: [LARTC] tc limit
Date: Wed, 19 Jan 2005 11:33:53 +0000	[thread overview]
Message-ID: <e208f5d10501190333173cb4a@mail.gmail.com> (raw)

Hi 

I have been playing with tc. I'm using htb and sfq. I tried to setup
shaping of every ip address  within a /20.
I found that there must be an upper limit of about 2096 on the number
of rules (classes, qdiscs or filters). I was testing a /20 which gives
4096 classes, qdiscs and filters. I'm using hashkey to optimize
processing of frames.

When executing the script below - it stops when adding rules for "ip
10.0.7.253" with this error:

handle 1:4097
handle 1:4099
handle 1:4101
RTNETLINK answers: File exists
We have an error talking to the kernel
handle 1:4103
RTNETLINK answers: File exists
We have an error talking to the kernel
handle 1:4105
...
...
etc.

Is there a limit with tc or I'm I doing something wrong ?
(I'm using iproute2-2.6.9-041019)

This is the script:
#!/bin/sh

/sbin/tc qdisc add dev eth1 root handle 1: htb
/sbin/tc class add dev eth1 parent 1: classid 1:3 htb rate 34mbit ceil
34mbit burst 0kbit cburst 0kbit
/sbin/tc filter add dev eth1 parent 1:3 protocol ip u32
/sbin/tc filter add dev eth1 parent 1:3 handle 3: protocol ip u32 divisor 256
/sbin/tc filter add dev eth1 protocol ip parent 1: u32 match ip dst
10.0.0.0/20 hashkey mask 0x000000ff at 16 link 3:

echo handle 1:13
/sbin/tc class add dev eth1 parent 1:3 classid 1:13 htb rate 512kbit
ceil 512kbit burst 0k cburst 0k
/sbin/tc qdisc add dev eth1 parent 1:13 handle 13: sfq perturb 4
/sbin/tc filter add dev eth1 protocol ip parent 1:3 u32 ht 3:1: match
ip dst 10.0.0.1 flowid 1:13

echo handle 1:15
/sbin/tc class add dev eth1 parent 1:3 classid 1:15 htb rate 512kbit
ceil 512kbit burst 0k cburst 0k
/sbin/tc qdisc add dev eth1 parent 1:15 handle 15: sfq perturb 4
/sbin/tc filter add dev eth1 protocol ip parent 1:3 u32 ht 3:2: match
ip dst 10.0.0.2 flowid 1:15
...
...
echo handle 1:4101
/sbin/tc class add dev eth1 parent 1:3 classid 1:4101 htb rate 512kbit
ceil 512kbit burst 0k cburst 0k
/sbin/tc qdisc add dev eth1 parent 1:4101 handle 4101: sfq perturb 4
/sbin/tc filter add dev eth1 protocol ip parent 1:3 u32 ht 3:fd: match
ip dst 10.0.7.253 flowid 1:4101
...
...
echo handle 1:8201
/sbin/tc class add dev eth1 parent 1:3 classid 1:8201 htb rate 512kbit
ceil 512kbit burst 0k cburst 0k
/sbin/tc qdisc add dev eth1 parent 1:8201 handle 8201: sfq perturb 4
/sbin/tc filter add dev eth1 protocol ip parent 1:3 u32 ht 3:ff: match
ip dst 10.0.15.255 flowid 1:8201
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

             reply	other threads:[~2005-01-19 11:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-19 11:33 Martin Schiøtz [this message]
2005-01-19 15:12 ` [LARTC] tc limit gypsy
2005-01-19 16:54 ` Martin Schiøtz
2005-01-20  6:51 ` gypsy

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=e208f5d10501190333173cb4a@mail.gmail.com \
    --to=malinux@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