netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 nf-next 0/5] netfilter: reduce hook array sizes
@ 2017-12-07 15:28 Florian Westphal
  2017-12-07 15:28 ` [PATCH v3 nf-next 1/5] netfilter: add defines for arp/decnet max hooks Florian Westphal
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Florian Westphal @ 2017-12-07 15:28 UTC (permalink / raw)
  To: netfilter-devel

This series further reduces size of the hook arrays by only resevering space
for the hooks that are implemented/supported (e.g., arp only supports 3 different
hook points as it lacks PRE/POST_ROUTING).

Furthermore, add #ifdef guard to not declare arp/bridge/decnet hooks unless
they are needed.

At least Fedora has CONFIG_DECNET=n so this even reduces size for some
distro kernels.

I ran a few randconfig builds last night and it did not catch any
build errors.

See individual patches for changes since v2.

Florian Westphal (5):
      netfilter: add defines for arp/decnet max hooks
      netfilter: reduce hook array sizes to what is needed
      netfilter: don't allocate space for decnet hooks unless needed
      netfilter: don't allocate space for arp/bridge hooks unless needed
      netfilter: reduce NF_MAX_HOOKS define

 include/linux/netfilter.h             |    6 +++++
 include/linux/netfilter_defs.h        |   12 ++++++++++-
 include/net/netns/netfilter.h         |   16 ++++++++++-----
 include/uapi/linux/netfilter_arp.h    |    3 ++
 include/uapi/linux/netfilter_decnet.h |    4 ++-
 net/Kconfig                           |    1 
 net/bridge/netfilter/Kconfig          |    2 +
 net/ipv4/netfilter/Kconfig            |    2 +
 net/netfilter/Kconfig                 |    6 +++++
 net/netfilter/core.c                  |   36 +++++++++++++++++++++++++++-------
 net/netfilter/nf_queue.c              |    2 +
 11 files changed, 76 insertions(+), 14 deletions(-)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-12-07 15:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v3 nf-next 5/5] netfilter: reduce NF_MAX_HOOKS define Florian Westphal

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).