Date: Fri, 7 Aug 1998 17:29:30 +0200 (MET DST) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: net@FreeBSD.ORG Subject: optimizing ipfw... Message-ID: <199808071529.RAA15460@labinfo.iet.unipi.it>
next in thread | raw e-mail | index | archive | help
Hi,
i was looking at if there is a need to optimize ipfw code, and tried to
instrument the code a little bit.
It turns out that on a P90, starting from the main loop to the exit
point:
for (; chain; chain = chain->chain.le_next) {
...
}
the code takes about 7us on a one-rule (accept) database
(including two calls to microtime).
Adding 3 not-matching rules (matching src/dst/interface, failing on port
number) to the database before the matching one, brings the
check time to about 16us per pass, or 3us per rule.
Just a data point i guess... i am not so sure on what to optimize,
suggestions ?
luigi
-----------------------------+--------------------------------------
Luigi Rizzo | Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it | Universita' di Pisa
tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/
_____________________________|______________________________________
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808071529.RAA15460>
