]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: remove xmit indirection from xfrm_mode
authorFlorian Westphal <fw@strlen.de>
Fri, 29 Mar 2019 20:16:26 +0000 (21:16 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 8 Apr 2019 07:14:34 +0000 (09:14 +0200)
commitd45fdb6fa5bc61d6ae741f868eee3732569df375
tree2da5ad76fc2b3f9172c112f3377bed983c8a5724
parent75a2726b4c1f113fdeaaa546c23a3e437a192d9e
xfrm: remove xmit indirection from xfrm_mode

There are only two versions (tunnel and transport). The ip/ipv6 versions
are only differ in sizeof(iphdr) vs ipv6hdr.

Place this in the core and use x->outer_mode->encap type to call the
correct adjustment helper.

Before:
   text   data    bss     dec      filename
15730311  6937008 4046908 26714227 vmlinux

After:
15730428  6937008 4046908 26714344 vmlinux

(about 117 byte increase)

v2: use family from x->outer_mode, not inner

Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/xfrm.h
net/ipv4/xfrm4_mode_transport.c
net/ipv4/xfrm4_mode_tunnel.c
net/ipv6/xfrm6_mode_transport.c
net/ipv6/xfrm6_mode_tunnel.c
net/xfrm/xfrm_device.c