summaryrefslogtreecommitdiff
path: root/drivers/net/vxlan.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2020-11-26 15:52:47 +0300
committerJakub Kicinski <kuba@kernel.org>2020-12-01 05:10:12 +0300
commita5e74021e84bb5eadf760aaf2c583304f02269be (patch)
treeb39ad57ece57a4bd0a8200da48dfc02a9470f835 /drivers/net/vxlan.c
parent0a35dc41fea67ac4495ce7584406bf9557a6e7d0 (diff)
downloadlinux-a5e74021e84bb5eadf760aaf2c583304f02269be.tar.xz
vxlan: Copy needed_tailroom from lowerdev
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 <sven@narfation.org> Link: https://lore.kernel.org/r/20201126125247.1047977-2-sven@narfation.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r--drivers/net/vxlan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 55fa3fbb80f1..032f78261913 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -3800,6 +3800,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)