mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[XFRM]: Optimize MTU calculation
Replace the probing based MTU estimation, which usually takes 2-3 iterations to find a fitting value and may underestimate the MTU, by an exact calculation. Also fix underestimation of the XFRM trailer_len, which causes unnecessary reallocations. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
557922584d
commit
c5c2523893
4 changed files with 39 additions and 51 deletions
|
|
@ -279,7 +279,7 @@ struct xfrm_type
|
|||
xfrm_address_t *(*local_addr)(struct xfrm_state *, xfrm_address_t *);
|
||||
xfrm_address_t *(*remote_addr)(struct xfrm_state *, xfrm_address_t *);
|
||||
/* Estimate maximal size of result of transformation of a dgram */
|
||||
u32 (*get_max_size)(struct xfrm_state *, int size);
|
||||
u32 (*get_mtu)(struct xfrm_state *, int size);
|
||||
};
|
||||
|
||||
extern int xfrm_register_type(struct xfrm_type *type, unsigned short family);
|
||||
|
|
|
|||
Loading…
Reference in a new issue