IPFW update frequency

Julian Elischer julian at elischer.org
Fri Mar 30 20:53:43 UTC 2007


I have been looking at the IPFW code recently, especially 
with respect to locking.
There are some things that could be done to improve IPFW's 
behaviour when processing packets, but some of these take a
toll (there is always a toll) on the 'updating' side of things.

For example. I can make IPFW lock-free during processing 
of packets (i.e. not holding any locks while traversing the
list) which would solve problems we have with lock-order reversals
when it needs to look at the socket layer (which needs socket 
layer locks). Unfortunatly this would make it a lot more expensive
in the case where new rules are being added to the list. possibly a LOT
more expensive. Now, this would only matter if one was adding (or deleting)
hundreds of rules per second to the firewall, but as I've discovered,
there's always SOMEONE that is doing the very thing you imagine that
no-one would ever do.

In my imagination, most of the people who did this sort of thing don't
need to do it any more as tables obviate the need for that sort of thing.

Is there anyone out there who is adding hundreds (or even dozens) of rules
per second on a continuous basis, or who wants rule changing to
be a really efficient operation?
(does it matter to you if it takes a few milliSecs to add a rule?)

Julian


More information about the freebsd-ipfw mailing list