All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Subject: [PATCH nf-next 0/3] netfilter: reduce hook array sizes to what is needed
Date: Thu,  7 Dec 2017 14:06:17 +0100	[thread overview]
Message-ID: <20171207130620.7585-1-fw@strlen.de> (raw)

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.

Florian Westphal (3):
      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

 include/linux/netfilter.h     |    6 ++++++
 include/net/netns/netfilter.h |   19 ++++++++++++++-----
 net/Kconfig                   |    1 +
 net/bridge/netfilter/Kconfig  |    2 ++
 net/ipv4/netfilter/Kconfig    |    2 ++
 net/netfilter/Kconfig         |    6 ++++++
 net/netfilter/core.c          |   22 ++++++++++++++++++++++
 net/netfilter/nf_queue.c      |    2 ++
 8 files changed, 55 insertions(+), 5 deletions(-)

             reply	other threads:[~2017-12-07 13:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 13:06 Florian Westphal [this message]
2017-12-07 13:06 ` [PATCH nf-next 1/3] netfilter: reduce hook array sizes to what is needed Florian Westphal
2017-12-07 13:14   ` Pablo Neira Ayuso
2017-12-07 13:24     ` Florian Westphal
2017-12-07 13:06 ` [PATCH nf-next 2/3] netfilter: don't allocate space for decnet hooks unless needed Florian Westphal
2017-12-07 13:06 ` [PATCH nf-next 3/3] netfilter: don't allocate space for arp/bridge " Florian Westphal

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=20171207130620.7585-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.