From: Sven Eckelmann Date: Thu, 26 Nov 2020 12:52:47 +0000 (+0100) Subject: vxlan: Copy needed_tailroom from lowerdev X-Git-Tag: v4.19.164~271 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=709392673a451c600b5e2db747a1528d39f8d7d4;p=users%2Fdwmw2%2Flinux.git vxlan: Copy needed_tailroom from lowerdev [ Upstream commit a5e74021e84bb5eadf760aaf2c583304f02269be ] While vxlan doesn't need any extra tailroom, the lowerdev might need it. In that case, copy it over to reduce the chance for additional (re)allocations in the transmit path. Signed-off-by: Sven Eckelmann Link: https://lore.kernel.org/r/20201126125247.1047977-2-sven@narfation.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 8481a21fe7afb..66fffbd64a33f 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -3182,6 +3182,8 @@ static void vxlan_config_apply(struct net_device *dev, needed_headroom = lowerdev->hard_header_len; needed_headroom += lowerdev->needed_headroom; + dev->needed_tailroom = lowerdev->needed_tailroom; + max_mtu = lowerdev->mtu - (use_ipv6 ? VXLAN6_HEADROOM : VXLAN_HEADROOM); if (max_mtu < ETH_MIN_MTU)