Commit 029f5fc3 authored by John Fastabend's avatar John Fastabend Committed by David S. Miller
Browse files

8021q: set hard_header_len when VLAN offload features are toggled

Toggling the vlan tx|rx hw offloads needs to set the hard_header_len
as well otherwise we end up using LL_RESERVED_SPACE incorrectly.
This results in pskb_expand_head() being used unnecessarily.

Signed-off-by: default avatarJohn Fastabend <>
Acked-by: default avatarJesse Gross <>
Signed-off-by: default avatarDavid S. Miller <>
parent 58e998c6
......@@ -334,6 +334,12 @@ static void vlan_transfer_features(struct net_device *dev,
vlandev->features &= ~dev->vlan_features;
vlandev->features |= dev->features & dev->vlan_features;
vlandev->gso_max_size = dev->gso_max_size;
if (dev->features & NETIF_F_HW_VLAN_TX)
vlandev->hard_header_len = dev->hard_header_len;
vlandev->hard_header_len = dev->hard_header_len + VLAN_HLEN;
#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment