Re: [PATCH net-next] netfilter: use jump_label for nf_hooks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Eric Dumazet <eric.dumazet@xxxxxxxxx>
Date: Sat, 19 Nov 2011 04:32:46 +0100

> On configs where CONFIG_JUMP_LABEL=y, we can replace in fast path a
> load/compare/conditional jump by a single jump with no dcache reference.
> 
> Jump target is modified as soon as nf_hooks[pf][hook] switches from
> empty state to non empty states. jump_label state is kept outside of
> nf_hooks array so has no cost on cpu caches.
> 
> This patch removes the test on CONFIG_NETFILTER_DEBUG : No need to call
> nf_hook_slow() at all if nf_hooks[pf][hook] is empty, this didnt give
> useful information, but slowed down things a lot.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@xxxxxxxxx>
> CC: Patrick McHardy <kaber@xxxxxxxxx>
> CC: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
> ---
> This is obviously a netfilter patch, but since David committed two other
> jump_label patches lately, maybe its better he takes this patch as well
> directly ? Thanks !

I've applied this.

Originally I was at first concerned because you changed the logic that
forced nf_hook_slow() to be invoked when NETFILTER_DEBUG is enabled but
these days that has no real purpose so that part of the change is fine.

Someone might want to double-check this ;-)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux