All of lore.kernel.org
 help / color / mirror / Atom feed
From: gypsy <gypsy@iswest.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] tc limit
Date: Thu, 20 Jan 2005 06:51:57 +0000	[thread overview]
Message-ID: <41EF550D.BF502865@iswest.com> (raw)
In-Reply-To: <e208f5d10501190333173cb4a@mail.gmail.com>

Martin Schiøtz wrote:
> 
> Thanks, with "prio #" on all filters - all rules can be added.
> :-)

You're welcome.
 
> Just curious - Is there a reason for the ~2K limit on filters with "prio 0"?
> 
> Martin

No reason I'm aware of.  Probably some OOPS! in the code that creates
filters.  Since I've never bothered to learn C, I've also never bothered
to read the source code.  So I'd never spot a programming mistake no
matter how obvious, and I suspect that this one is very subtle.

The real crime here is that the docs do not tell you that there is this
trap that "everyone" with a lot of users falls into.

> On Wed, 19 Jan 2005 07:12:56 -0800, gypsy <gypsy@iswest.com> wrote:
> > Martin Schiøtz wrote:
> > >
> > > Hi
> >
> > Hello.
> >
> > > 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.
> >
> > Filters.
> >
> > > Is there a limit with tc or I'm I doing something wrong ?
> >
> > Yes, sort of.  Yes.
> >
> > > This is the script:
> > > #!/bin/sh
> > >
> >
> > > /sbin/tc filter add dev eth1 parent 1:3 protocol ip u32
> >
> > 'prio #' must be included in all 'filter' lines where "#" is not zero
> > and is always the same; the "zero prio" has a limit and there is a limit
> > on '#' - but no limit on how many times '#' can be (e.g.) 5
> >
> > So, e.g.:
> > tc filter add dev eth1 parent 1: protocol ip prio 5 \
> >    u32 match ip src $IP flowid 1:40
> >
> > will run at least 64K times without complaint, but this will fail after
> > ~2K:
> > tc filter add dev eth1 parent 1: protocol ip prio 0 \
> >    u32 match ip src $IP flowid 1:40
> >
> > > /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:
> >
> > google LARTC please document
> >
> > gypsy
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

      parent reply	other threads:[~2005-01-20  6:51 UTC|newest]

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

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=41EF550D.BF502865@iswest.com \
    --to=gypsy@iswest.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 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.