[Bridge] Re: [PATCH/RFC] Reduce call chain length in netfilter
rusty at rustcorp.com.au
Thu Jan 27 16:29:29 PST 2005
On Thu, 2005-01-27 at 15:24 -0800, David S. Miller wrote:
> It is never the case that both indev and outdev are both
> set, so we can use some nf_hook_desc piece of state to
> indicate which (in or out) the passed device pointer is.
NF_IP_FORWARD... it's really *really* useful for filtering forwarded
packets. However, is it ever the case that indev != skb->dev? If not,
we can simply drop that arg and use skb->dev.
> Now, back to the compatability issue. We could create a
> new macro, NF_HOOK_DESC() and keep the existing ones around
> via some nf_hook_slow() that basically does:
No, let's just fix them all. Also, gcc 3.4 will discard unused static
variables, so I prefer the kernel start just declaring structs as
normal, and have them "used" in the !CONFIG case by an inline function
which allows gcc to realize that it can be eliminated, but suppresses
unused warnings. This also means you get type checking etc without the
BTW, someone should go through and start ripping out #ifdef
CONFIG_PROC_FS around those structs, too...
A bad analogy is like a leaky screwdriver -- Richard Braakman
More information about the Bridge