From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next] netfilter: x_tables: don't extract flow keys on early demuxed sks in socket match
Date: Wed, 8 Apr 2015 18:58:45 +0200 [thread overview]
Message-ID: <20150408165845.GA3827@salvia> (raw)
In-Reply-To: <11bd4dd88cf6bf5a91b70ef80185c4778fa41364.1427972980.git.daniel@iogearbox.net>
On Thu, Apr 02, 2015 at 02:28:30PM +0200, Daniel Borkmann wrote:
> Currently in xt_socket, we take advantage of early demuxed sockets
> since commit 00028aa37098 ("netfilter: xt_socket: use IP early demux")
> in order to avoid a second socket lookup in the fast path, but we
> only make partial use of this:
>
> We still unnecessarily parse headers, extract proto, {s,d}addr and
> {s,d}ports from the skb data, accessing possible conntrack information,
> etc even though we were not even calling into the socket lookup via
> xt_socket_get_sock_{v4,v6}() due to skb->sk hit, meaning those cycles
> can be spared.
>
> After this patch, we only proceed the slower, manual lookup path
> when we have a skb->sk miss, thus time to match verdict for early
> demuxed sockets will improve further, which might be i.e. interesting
> for use cases such as mentioned in 681f130f39e1 ("netfilter: xt_socket:
> add XT_SOCKET_NOWILDCARD flag").
Applied, thanks.
prev parent reply other threads:[~2015-04-08 16:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-02 12:28 [PATCH nf-next] netfilter: x_tables: don't extract flow keys on early demuxed sks in socket match Daniel Borkmann
2015-04-08 16:58 ` Pablo Neira Ayuso [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=20150408165845.GA3827@salvia \
--to=pablo@netfilter.org \
--cc=daniel@iogearbox.net \
--cc=netfilter-devel@vger.kernel.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).