Skip to content

xfrm: remove three xfrm_afinfo_policy indirections

Florian Westphal netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3xfrm: remove tos indirection from afinfo_policyinclude/net/xfrm.h net/ipv4/xfrm4_policy.c net/ipv6/xfrm6_policy.c +1 more+3 -240 replies
2/3xfrm: remove init_path indirection from afinfo_policyinclude/net/xfrm.h net/ipv4/xfrm4_policy.c net/ipv6/xfrm6_policy.c +1 more+7 -380 replies
3/3xfrm: remove decode_session indirection from afinfo_policyinclude/net/xfrm.h net/ipv4/xfrm4_policy.c net/ipv6/xfrm6_policy.c +1 more+222 -2320 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH ipsec-next 0/3] xfrm: remove three xfrm_afinfo_policy indirections

This series removes three indirections from xfrm_afinfo_policy by folding them into their callers.

1. Tos is a one-liner only needed by ipv4
2. init_path is also small and only needed by ipv6
3. decode_session has no dependencies on ipv6 or ipv4, fold it.

The remaining indirections are necessary in the CONFIG_IPV6=m case. Its possible to fold only the ipv4 part and handle ipv6 based on CONFIG_IPV6_{MODULE,BUILTIN} but that increases complexity, so my intent is to go after indirections similar to the ones folded here first.

Florian Westphal (3):
xfrm: remove tos indirection from afinfo_policy
xfrm: remove init_path indirection from afinfo_policy
xfrm: remove decode_session indirection from afinfo_policy

 include/net/xfrm.h      |    7 -
 net/ipv4/xfrm4_policy.c |  127 ----------------------
 net/ipv6/xfrm6_policy.c |  126 ----------------------
 net/xfrm/xfrm_policy.c  |  266 +++++++++++++++++++++++++++++++++++++++++-------
 4 files changed, 232 insertions(+), 294 deletions(-)