From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, netfilter-devel@vger.kernel.org,
kaber@trash.net, pablo@netfilter.org
Subject: Re: [PATCH net-next] netfilter: use jump_label for nf_hooks
Date: Mon, 21 Nov 2011 16:39:03 -0500 (EST) [thread overview]
Message-ID: <20111121.163903.1188643166689254222.davem@davemloft.net> (raw)
In-Reply-To: <1321673566.3157.14.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.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@gmail.com>
> CC: Patrick McHardy <kaber@trash.net>
> CC: Pablo Neira Ayuso <pablo@netfilter.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 ;-)
prev parent reply other threads:[~2011-11-21 21:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-19 3:32 [PATCH net-next] netfilter: use jump_label for nf_hooks Eric Dumazet
2011-11-21 21:39 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111121.163903.1188643166689254222.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).