From: "Dmytro O. Redchuk" <dor@ldc.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] filter performance/optimization questions
Date: Wed, 08 Feb 2006 18:43:50 +0000 [thread overview]
Message-ID: <20060208184350.GO4916@ldc.net> (raw)
In-Reply-To: <43EA2A95.1000307@astral.ro>
On Wed, Feb 08, 2006 at 07:58:48PM +0200, Imre Gergely wrote:
> at first, there is that default table 800::, where i create these 'hashing
> filters'. if i have 300 of them, how are they processed? if a packet comes in,
> what happens? are they looked up in the same order i created them? like in
> iptables?
Yes, if i understood you correctly.
You can create a hash to match a network (hashkey mask 0x0000ff00), then
match an address (in another hash table). Or even match with hashkey mask
0x000ff000 (or another bits), then... etc. You can cascade them, in other
words.
> then, if say, one filter matched, the more specific filter table is looked up,
> the key being the last octet of the ip address (specified by the mask
> 0x000000ff). it looks up the right entry in the table, and it know in which
> flow (in which class) it should put the packet in. right?
>
> now what if i have to filters? one with, say, a source port of 25 specified,
> the other one with port 80.
Mmm... If I understood you... :-) Sorry, that's my english.
Every hash table cell may contain many filters, they will be processed in
sequence. And if the packet will not match any of them, it'll be dropped
to default class.
>
> these are some 'subquestions' :) the main question is the optimisation of
> course :) i was just wondering how things are done.
--
_,-=._ /|_/|
`-.} `=._,.-=-._., @ @._,
`._ _,-. ) _,.-'
` G.m-"^m`m' Dmytro O. Redchuk
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next prev parent reply other threads:[~2006-02-08 18:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-08 17:29 [LARTC] filter performance/optimization questions Imre Gergely
2006-02-08 17:37 ` Andreas Klauer
2006-02-08 17:58 ` Imre Gergely
2006-02-08 18:43 ` Dmytro O. Redchuk [this message]
2006-02-12 1:32 ` Andreas Klauer
2006-02-12 11:30 ` Jakub Wartak
2006-02-14 11:08 ` Imre Gergely
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=20060208184350.GO4916@ldc.net \
--to=dor@ldc.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 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.