Skip to content

Commit

Permalink
vxlan: Copy needed_tailroom from lowerdev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sven Eckelmann authored and Jakub Kicinski committed Dec 1, 2020
1 parent 0a35dc4 commit a5e7402
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a5e7402

Please sign in to comment.