xfrm: remove type and offload_type map from xfrm_state_afinfo
authorFlorian Westphal <fw@strlen.de>
Fri, 3 May 2019 15:46:19 +0000 (17:46 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 6 Jun 2019 06:34:50 +0000 (08:34 +0200)
commit4f518e802ccad30c9dccc895f2294398757b87c0
tree535aacd8a10b6030fd4c61a1897a2ddbbc4ae6ba
parent4c203b0454b5b6bfafe2c4ab1b5472d4a7a8a0f2
xfrm: remove type and offload_type map from xfrm_state_afinfo

Only a handful of xfrm_types exist, no need to have 512 pointers for them.

Reduces size of afinfo struct from 4k to 120 bytes on 64bit platforms.

Also, the unregister function doesn't need to return an error, no single
caller does anything useful with it.

Just place a WARN_ON() where needed instead.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
12 files changed:
include/net/xfrm.h
net/ipv4/ah4.c
net/ipv4/esp4.c
net/ipv4/esp4_offload.c
net/ipv4/ipcomp.c
net/ipv4/xfrm4_tunnel.c
net/ipv6/ah6.c
net/ipv6/esp6.c
net/ipv6/esp6_offload.c
net/ipv6/ipcomp6.c
net/ipv6/mip6.c
net/xfrm/xfrm_state.c