netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netdev@vger.kernel.org>
Cc: steffen.klassert@secunet.com
Subject: [PATCH ipsec-next 00/11] xfrm: remove xfrm_mode indirections
Date: Wed, 27 Mar 2019 18:31:29 +0100	[thread overview]
Message-ID: <20190327173140.16891-1-fw@strlen.de> (raw)

This series removes all function pointers from the xfrm_mode struct.
They are either replaced by direct calls or a static helper.

This also reduces code size: even merging all xfrm{4,6}_,mode* modules
into the core reduces total size, as the infrastructure to maintain
dynamic (un)register can be removed.

There are more opportunities for indirection avoidance, e.g. in
xfrm_type.

I plan to follow up once/if this series is accepted.
This is quite some code churn, but I think its worth doing.

Tested with xfrm tunnel mode via netns with esp/aead.

Florian Westphal (11):
      xfrm: place af number into xfrm_mode struct
      xfrm: prefer family stored in xfrm_mode struct
      xfrm: remove input indirection from xfrm_mode
      xfrm: remove output indirection from xfrm_mode
      xfrm: remove xmit indirection from xfrm_mode
      xfrm: remove gso_segment indirection from xfrm_mode
      xfrm: remove input2 indirection from xfrm_mode
      xfrm: remove output2 indirection from xfrm_mode
      xfrm: remove afinfo pointer from xfrm_mode
      xfrm: make xfrm modes builtin
      xfrm: store xfrm_mode directly, not its address

 include/net/xfrm.h                 |  105 ++--------
 net/core/pktgen.c                  |    2 
 net/ipv4/Kconfig                   |   29 --
 net/ipv4/Makefile                  |    3 
 net/ipv4/esp4_offload.c            |   40 +++
 net/ipv4/ip_vti.c                  |    6 
 net/ipv4/xfrm4_output.c            |   26 --
 net/ipv6/Kconfig                   |   35 ---
 net/ipv6/Makefile                  |    4 
 net/ipv6/esp6_offload.c            |   40 +++
 net/ipv6/ip6_vti.c                 |    6 
 net/ipv6/xfrm6_output.c            |   36 +--
 net/xfrm/xfrm_device.c             |   58 +++++
 net/xfrm/xfrm_inout.h              |   38 +++
 net/xfrm/xfrm_input.c              |  283 ++++++++++++++++++++++++++-
 net/xfrm/xfrm_interface.c          |    6 
 net/xfrm/xfrm_output.c             |  359 ++++++++++++++++++++++++++++++++++-
 net/xfrm/xfrm_policy.c             |   11 -
 net/xfrm/xfrm_state.c              |  181 ++++++-----------
 tools/testing/selftests/net/config |    2 
 net/ipv4/xfrm4_mode_beet.c         |  155 ---------------
 net/ipv4/xfrm4_mode_transport.c    |  114 -----------
 net/ipv4/xfrm4_mode_tunnel.c       |  152 --------------
 net/ipv6/xfrm6_mode_beet.c         |  131 ------------
 net/ipv6/xfrm6_mode_ro.c           |   85 --------
 net/ipv6/xfrm6_mode_transport.c    |  121 -----------
 net/ipv6/xfrm6_mode_tunnel.c       |  151 --------------
 27 files changed, 937 insertions(+), 1242 deletions(-)


             reply	other threads:[~2019-03-27 17:30 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-27 17:31 Florian Westphal [this message]
2019-03-27 17:31 ` [PATCH ipsec-next 01/11] xfrm: place af number into xfrm_mode struct Florian Westphal
2019-03-27 17:31 ` [PATCH ipsec-next 02/11] xfrm: prefer family stored in " Florian Westphal
2019-03-27 17:31 ` [PATCH ipsec-next 03/11] xfrm: remove input indirection from xfrm_mode Florian Westphal
2019-03-28 11:39   ` Sabrina Dubroca
2019-03-28 11:46     ` Florian Westphal
2019-03-29 17:10   ` Eyal Birger
2019-03-29 17:19     ` Florian Westphal
2019-03-27 17:31 ` [PATCH ipsec-next 04/11] xfrm: remove output " Florian Westphal
2019-03-28 11:12   ` Sabrina Dubroca
2019-03-28 11:27     ` Florian Westphal
2019-03-28 11:35       ` Sabrina Dubroca
2019-03-27 17:31 ` [PATCH ipsec-next 05/11] xfrm: remove xmit " Florian Westphal
2019-03-27 17:31 ` [PATCH ipsec-next 06/11] xfrm: remove gso_segment " Florian Westphal
2019-03-27 17:31 ` [PATCH ipsec-next 07/11] xfrm: remove input2 " Florian Westphal
2019-03-27 17:31 ` [PATCH ipsec-next 08/11] xfrm: remove output2 " Florian Westphal
2019-03-28 22:28   ` kbuild test robot
2019-03-29  2:15   ` kbuild test robot
2019-03-27 17:31 ` [PATCH ipsec-next 09/11] xfrm: remove afinfo pointer " Florian Westphal
2019-03-28 14:13   ` Sabrina Dubroca
2019-03-27 17:31 ` [PATCH ipsec-next 10/11] xfrm: make xfrm modes builtin Florian Westphal
2019-03-29  3:54   ` kbuild test robot
2019-03-27 17:31 ` [PATCH ipsec-next 11/11] xfrm: store xfrm_mode directly, not its address Florian Westphal
2019-03-28 11:42 ` [PATCH ipsec-next 00/11] xfrm: remove xfrm_mode indirections Benedict Wong
2019-03-28 11:48   ` 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=20190327173140.16891-1-fw@strlen.de \
    --to=fw@strlen.de \
    --cc=netdev@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    /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).