From: Eric Dumazet Date: Fri, 18 Nov 2011 17:32:46 +0000 (+0000) Subject: netfilter: use jump_label for nf_hooks X-Git-Tag: v3.3-rc1~182^2~522 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2d7ec58ac09f30ab726f216827f7c7095b2a98f;p=pandora-kernel.git netfilter: use jump_label for nf_hooks 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 CC: Patrick McHardy CC: Pablo Neira Ayuso Signed-off-by: David S. Miller --- Reading git-diff-tree failed