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>
This commit is contained in:

committed by
Steffen Klassert

parent
8928aa6a00
commit
c7b37c769d
@@ -404,8 +404,6 @@ struct xfrm_type {
|
||||
int (*reject)(struct xfrm_state *, struct sk_buff *,
|
||||
const struct flowi *);
|
||||
int (*hdr_offset)(struct xfrm_state *, struct sk_buff *, u8 **);
|
||||
/* Estimate maximal size of result of transformation of a dgram */
|
||||
u32 (*get_mtu)(struct xfrm_state *, int size);
|
||||
};
|
||||
|
||||
int xfrm_register_type(const struct xfrm_type *type, unsigned short family);
|
||||
@@ -1546,7 +1544,7 @@ void xfrm_sad_getinfo(struct net *net, struct xfrmk_sadinfo *si);
|
||||
void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si);
|
||||
u32 xfrm_replay_seqhi(struct xfrm_state *x, __be32 net_seq);
|
||||
int xfrm_init_replay(struct xfrm_state *x);
|
||||
int xfrm_state_mtu(struct xfrm_state *x, int mtu);
|
||||
u32 xfrm_state_mtu(struct xfrm_state *x, int mtu);
|
||||
int __xfrm_init_state(struct xfrm_state *x, bool init_replay, bool offload);
|
||||
int xfrm_init_state(struct xfrm_state *x);
|
||||
int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type);
|
||||
|
Reference in New Issue
Block a user