Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Werner Almesberger <wa@almesberger.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] marking packets vs. tc filter
Date: Sun, 15 Sep 2002 18:50:11 +0000	[thread overview]
Message-ID: <marc-lartc-103213889219141@msgid-missing> (raw)
In-Reply-To: <marc-lartc-103211309101155@msgid-missing>

curt brune wrote:
> Using tc filter is there a way to direct a range of ports (say ports 5000
> to 5100) to a particular flowid ?

You can translate relational operators (<, >=, etc.) into individual
tests of bits or prefixes, which can then be used by u32.
For the algorithms, see tcng's tcng/tcc/iflib_arith.c:rel_general
and the functions it calls.

If using tcc to generate such classifiers, you can speed up
configuration-time processing considerably with -Oprefix -Onocse

> Theoretical question:  Has anyone done an experiment to test wether
> filtering with "tc" or "iptables" is more performant?

In this case, iptables should win hands down, because it uses
CPU instructions that accomplish the task much more directly.

I don't know how iptables and tc compare in cases where the
actual classifications have similar cost. If somebody's going
to run some comparisons, the results may be interesting,
though.

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

      reply	other threads:[~2002-09-15 18:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-15 18:03 [LARTC] marking packets vs. tc filter curt brune
2002-09-15 18:50 ` Werner Almesberger [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=marc-lartc-103213889219141@msgid-missing \
    --to=wa@almesberger.net \
    --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