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(-)


Reply via email to