From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH v3 nf-next 5/5] netfilter: reduce NF_MAX_HOOKS define
Date: Thu, 7 Dec 2017 16:28:27 +0100 [thread overview]
Message-ID: <20171207152827.24317-6-fw@strlen.de> (raw)
In-Reply-To: <20171207152827.24317-1-fw@strlen.de>
This can be same as NF_INET_NUMHOOKS if we don't support DECNET.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
new in v3.
include/linux/netfilter_defs.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/linux/netfilter_defs.h b/include/linux/netfilter_defs.h
index fdcdf2bf34df..8dddfb151f00 100644
--- a/include/linux/netfilter_defs.h
+++ b/include/linux/netfilter_defs.h
@@ -4,13 +4,17 @@
#include <uapi/linux/netfilter.h>
-/* Largest hook number + 1, see uapi/linux/netfilter_decnet.h */
-#define NF_MAX_HOOKS 8
-
/* in/out/forward only */
#define NF_ARP_NUMHOOKS 3
/* max hook is NF_DN_ROUTE (6), also see uapi/linux/netfilter_decnet.h */
#define NF_DN_NUMHOOKS 7
+#if IS_ENABLED(CONFIG_DECNET)
+/* Largest hook number + 1, see uapi/linux/netfilter_decnet.h */
+#define NF_MAX_HOOKS NF_DN_NUMHOOKS
+#else
+#define NF_MAX_HOOKS NF_INET_NUMHOOKS
+#endif
+
#endif
--
2.13.6
prev parent reply other threads:[~2017-12-07 15:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 15:28 [PATCH v3 nf-next 0/5] netfilter: reduce hook array sizes Florian Westphal
2017-12-07 15:28 ` [PATCH v3 nf-next 1/5] netfilter: add defines for arp/decnet max hooks Florian Westphal
2017-12-07 15:28 ` [PATCH v3 nf-next 2/5] netfilter: reduce hook array sizes to what is needed Florian Westphal
2017-12-07 15:28 ` [PATCH v3 nf-next 3/5] netfilter: don't allocate space for decnet hooks unless needed Florian Westphal
2017-12-07 15:28 ` [PATCH v3 nf-next 4/5] netfilter: don't allocate space for arp/bridge " Florian Westphal
2017-12-07 15:28 ` Florian Westphal [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=20171207152827.24317-6-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).