提交 a5e74021 编写于 作者: S Sven Eckelmann 提交者: Jakub Kicinski

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: NSven Eckelmann <sven@narfation.org>
Link: https://lore.kernel.org/r/20201126125247.1047977-2-sven@narfation.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 0a35dc41
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册