From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Subject: [PATCH nf-next 0/3] netfilter: remove pf argument from conntrack l4 packet function
Date: Wed, 11 Oct 2017 10:47:39 +0200 [thread overview]
Message-ID: <20171011084742.25989-1-fw@strlen.de> (raw)
We currently pass pf to the packet() function of the l4 trackers,
but this isn't needed -- its only required for the 'log invalid' check
and the l4 protocol is also available in the nf_conn entry.
This series adds helpers for logging invalid packets, similar
to nf_ct_helper_log().
I added a __cold annotation, it makes gcc rearrange the callsites as they
are then considered unlikely and moved away from hotpath.
After this change, packet() gets passed 5 instead of 6 arguments.
include/net/netfilter/nf_conntrack_l4proto.h | 21 +++++++--
net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 19 ++++----
net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 15 +++----
net/netfilter/nf_conntrack_core.c | 2
net/netfilter/nf_conntrack_proto.c | 47 ++++++++++++++++++++++
net/netfilter/nf_conntrack_proto_dccp.c | 21 ++-------
net/netfilter/nf_conntrack_proto_generic.c | 1
net/netfilter/nf_conntrack_proto_gre.c | 1
net/netfilter/nf_conntrack_proto_sctp.c | 4 -
net/netfilter/nf_conntrack_proto_tcp.c | 53 +++++++++----------------
net/netfilter/nf_conntrack_proto_udp.c | 41 ++++++++-----------
11 files changed, 128 insertions(+), 97 deletions(-)
next reply other threads:[~2017-10-11 8:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 8:47 Florian Westphal [this message]
2017-10-11 8:47 ` [PATCH nf-next 1/3] netfilter: conntrack: add and use nf_l4proto_log_invalid Florian Westphal
2017-10-11 8:47 ` [PATCH nf-next 2/3] netfilter: conntrack: add and use nf_ct_l4proto_log_invalid Florian Westphal
2017-10-11 8:47 ` [PATCH nf-next 3/3] netfilter: conntrack: remove pf argument from l4 packet functions Florian Westphal
2017-10-24 16:03 ` [PATCH nf-next 0/3] netfilter: remove pf argument from conntrack l4 packet function Pablo Neira Ayuso
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=20171011084742.25989-1-fw@strlen.de \
--to=fw@strlen.de \
--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).