diff options
author | Florian Westphal <fw@strlen.de> | 2019-06-24 22:04:48 +0200 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2019-07-01 06:16:40 +0200 |
commit | c7b37c769d2a5e711106a3c793140a4f46768e04 (patch) | |
tree | 49ad85e5a624504acf57dd79b59f28a0913711e5 /net/xfrm/xfrm_device.c | |
parent | 8928aa6a007d0a58f500b79812ea8147ec477090 (diff) |
xfrm: remove get_mtu indirection from xfrm_type
esp4_get_mtu and esp6_get_mtu are exactly the same, the only difference
is a single sizeof() (ipv4 vs. ipv6 header).
Merge both into xfrm_state_mtu() and remove the indirection.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm/xfrm_device.c')
-rw-r--r-- | net/xfrm/xfrm_device.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/xfrm_device.c index b24cd86a02c3..f10a70388f72 100644 --- a/net/xfrm/xfrm_device.c +++ b/net/xfrm/xfrm_device.c @@ -275,9 +275,8 @@ bool xfrm_dev_offload_ok(struct sk_buff *skb, struct xfrm_state *x) return false; if ((!dev || (dev == xfrm_dst_path(dst)->dev)) && - (!xdst->child->xfrm && x->type->get_mtu)) { - mtu = x->type->get_mtu(x, xdst->child_mtu_cached); - + (!xdst->child->xfrm)) { + mtu = xfrm_state_mtu(x, xdst->child_mtu_cached); if (skb->len <= mtu) goto ok; |