[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20111121.163903.1188643166689254222.davem@davemloft.net>
Date: Mon, 21 Nov 2011 16:39:03 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: netdev@...r.kernel.org, netfilter-devel@...r.kernel.org,
kaber@...sh.net, pablo@...filter.org
Subject: Re: [PATCH net-next] netfilter: use jump_label for nf_hooks
From: Eric Dumazet <eric.dumazet@...il.com>
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@...il.com>
> CC: Patrick McHardy <kaber@...sh.net>
> CC: Pablo Neira Ayuso <pablo@...filter.org>
> ---
> 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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists