diff mbox series

[2/2] vxlan: Copy needed_tailroom from lowerdev

Message ID 20201126125247.1047977-2-sven@narfation.org
State Not Applicable, archived
Delegated to: Simon Wunderlich
Headers show
Series [1/2] vxlan: Add needed_headroom for lower device | expand

Commit Message

Sven Eckelmann Nov. 26, 2020, 12:52 p.m. UTC
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>
---
 drivers/net/vxlan.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 25b5b5a2dfea..44bb02122526 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -3801,6 +3801,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)