netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH nf-next 00/12] netfilter: remove xtables pointers from struct net
Date: Tue, 20 Apr 2021 14:24:55 +0200	[thread overview]
Message-ID: <20210420122507.505-1-fw@strlen.de> (raw)

This change removes all xt_table pointers from struct net.

The various ip(6)table_foo incarnations are updated to expect
that the table is passed as 'void *priv' argument that netfilter core
passes to the hook functions.

This reduces the struct net size by 2 cachelines on x86_64.

Florian Westphal (12):
  netfilter: ebtables: remove the 3 ebtables pointers from struct net
  netfilter: x_tables: remove ipt_unregister_table
  netfilter: add xt_find_table
  netfilter: iptables: unregister the tables by name
  netfilter: ip6tables: unregister the tables by name
  netfilter: arptables: unregister the tables by name
  netfilter: x_tables: remove paranoia tests
  netfilter: xt_nat: pass table to hookfn
  netfilter: ip_tables: pass table pointer via nf_hook_ops
  netfilter: arp_tables: pass table pointer via nf_hook_ops
  netfilter: ip6_tables: pass table pointer via nf_hook_ops
  netfilter: remove all xt_table anchors from struct net

 include/linux/netfilter/x_tables.h        |  4 ++
 include/linux/netfilter_arp/arp_tables.h  |  6 +-
 include/linux/netfilter_bridge/ebtables.h |  9 ++-
 include/linux/netfilter_ipv4/ip_tables.h  |  9 +--
 include/linux/netfilter_ipv6/ip6_tables.h |  9 +--
 include/net/netns/ipv4.h                  | 10 ----
 include/net/netns/ipv6.h                  |  9 ---
 include/net/netns/x_tables.h              |  8 ---
 net/bridge/netfilter/ebtable_broute.c     | 10 ++--
 net/bridge/netfilter/ebtable_filter.c     | 26 +++------
 net/bridge/netfilter/ebtable_nat.c        | 27 +++------
 net/bridge/netfilter/ebtables.c           | 42 ++++++++++----
 net/ipv4/netfilter/arp_tables.c           | 57 +++++++++++++------
 net/ipv4/netfilter/arptable_filter.c      | 17 ++----
 net/ipv4/netfilter/ip_tables.c            | 69 +++++++++++++++--------
 net/ipv4/netfilter/iptable_filter.c       | 17 ++----
 net/ipv4/netfilter/iptable_mangle.c       | 23 +++-----
 net/ipv4/netfilter/iptable_nat.c          | 59 ++++++++++++-------
 net/ipv4/netfilter/iptable_raw.c          | 17 ++----
 net/ipv4/netfilter/iptable_security.c     | 17 ++----
 net/ipv6/netfilter/ip6_tables.c           | 68 +++++++++++++---------
 net/ipv6/netfilter/ip6table_filter.c      | 17 ++----
 net/ipv6/netfilter/ip6table_mangle.c      | 24 +++-----
 net/ipv6/netfilter/ip6table_nat.c         | 58 +++++++++++++------
 net/ipv6/netfilter/ip6table_raw.c         | 17 ++----
 net/ipv6/netfilter/ip6table_security.c    | 17 ++----
 net/netfilter/x_tables.c                  | 18 ++++++
 27 files changed, 334 insertions(+), 330 deletions(-)

-- 
2.26.3


             reply	other threads:[~2021-04-20 12:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 12:24 Florian Westphal [this message]
2021-04-20 12:24 ` [PATCH nf-next 01/12] netfilter: ebtables: remove the 3 ebtables pointers from struct net Florian Westphal
2021-04-20 12:24 ` [PATCH nf-next 02/12] netfilter: x_tables: remove ipt_unregister_table Florian Westphal
2021-04-20 14:17   ` kernel test robot
2021-04-20 16:44   ` kernel test robot
2021-04-20 12:24 ` [PATCH nf-next 03/12] netfilter: add xt_find_table Florian Westphal
2021-04-20 12:24 ` [PATCH nf-next 04/12] netfilter: iptables: unregister the tables by name Florian Westphal
2021-04-20 12:25 ` [PATCH nf-next 05/12] netfilter: ip6tables: " Florian Westphal
2021-04-20 12:25 ` [PATCH nf-next 06/12] netfilter: arptables: " Florian Westphal
2021-04-20 12:25 ` [PATCH nf-next 07/12] netfilter: x_tables: remove paranoia tests Florian Westphal
2021-04-20 12:25 ` [PATCH nf-next 08/12] netfilter: xt_nat: pass table to hookfn Florian Westphal
2021-04-20 12:25 ` [PATCH nf-next 09/12] netfilter: ip_tables: pass table pointer via nf_hook_ops Florian Westphal
2021-04-20 12:25 ` [PATCH nf-next 10/12] netfilter: arp_tables: " Florian Westphal
2021-04-20 12:25 ` [PATCH nf-next 11/12] netfilter: ip6_tables: " Florian Westphal
2021-04-20 12:25 ` [PATCH nf-next 12/12] netfilter: remove all xt_table anchors from struct net 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=20210420122507.505-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).