Skip to content

xfrm: remove three more indirect calls from packet path

Florian Westphal netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 1 replyIn review
  2. v17 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7xfrm: avoid extract_output indirection for ipv4include/net/xfrm.h net/ipv4/xfrm4_output.c net/ipv4/xfrm4_state.c +1 more+46 -420 replies
2/7xfrm: state: remove extract_input indirection from xfrm_state_afinfoinclude/net/xfrm.h net/ipv4/xfrm4_input.c net/ipv4/xfrm4_state.c +5 more+45 -490 replies
3/7xfrm: move xfrm4_extract_header to common helperinclude/net/xfrm.h net/ipv4/xfrm4_state.c net/xfrm/xfrm_inout.h+14 -220 replies
4/7xfrm: expose local_rxpmtu via ipv6_stubsinclude/net/ipv6_stubs.h include/net/xfrm.h net/ipv6/af_inet6.c +1 more+4 -10 replies
5/7xfrm: place xfrm6_local_dontfrag in xfrm.hinclude/net/xfrm.h net/ipv6/xfrm6_output.c+18 -190 replies
6/7xfrm: remove extract_output indirection from xfrm_state_afinfoinclude/net/xfrm.h net/ipv6/xfrm6_output.c net/ipv6/xfrm6_state.c +1 more+59 -700 replies
7/7xfrm: remove output_finish indirection from xfrm_state_afinfoinclude/net/xfrm.h net/ipv4/xfrm4_output.c net/ipv4/xfrm4_state.c +3 more+19 -570 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH ipsec-next v2 0/7] xfrm: remove three more indirect calls from packet path

v2: rebase on top of ipsec-next, no other changes.

This patch series removes three more indirect calls from the state_afinfo struct.

These are:
- extract_input (no dependencies on other modules)
- output_finish (same)
- extract_output (has dependency on ipv6 module, but that is only needed for pmtu detection, so the indirect call cost is not required for each packet).

Functions get moved to net/xfrm and the indirections are removed. pmtu detection will be handled via ipv6_stubs.

Florian Westphal (7):
xfrm: avoid extract_output indirection for ipv4
xfrm: state: remove extract_input indirection from xfrm_state_afinfo
xfrm: move xfrm4_extract_header to common helper
xfrm: expose local_rxpmtu via ipv6_stubs
xfrm: place xfrm6_local_dontfrag in xfrm.h
xfrm: remove extract_output indirection from xfrm_state_afinfo
xfrm: remove output_finish indirection from xfrm_state_afinfo

 include/net/ipv6_stubs.h |   1 +
 include/net/xfrm.h       |  26 ++++++----
 net/ipv4/xfrm4_input.c   |   5 --
 net/ipv4/xfrm4_output.c  |  63 +----------------------
 net/ipv4/xfrm4_state.c   |  24 ---------
 net/ipv6/af_inet6.c      |   1 +
 net/ipv6/xfrm6_input.c   |   5 --
 net/ipv6/xfrm6_output.c  |  98 ++---------------------------------
 net/ipv6/xfrm6_state.c   |  26 ----------
 net/xfrm/xfrm_inout.h    |  32 ++++++++++++
 net/xfrm/xfrm_input.c    |  21 ++++----
 net/xfrm/xfrm_output.c   | 129 ++++++++++++++++++++++++++++++++++++++++++++---
 12 files changed, 188 insertions(+), 243 deletions(-)