Message ID | 20101031002232.8691.41201.stgit@jf-dev1-dcblab |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Sat, Oct 30, 2010 at 5:22 PM, John Fastabend <john.r.fastabend@intel.com> wrote: > 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: John Fastabend <john.r.fastabend@intel.com> Acked-by: Jesse Gross <jesse@nicira.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: John Fastabend <john.r.fastabend@intel.com> Date: Sat, 30 Oct 2010 17:22:32 -0700 > 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: John Fastabend <john.r.fastabend@intel.com> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 05b867e..cb78b99 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -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; + else + 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; #endif
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: John Fastabend <john.r.fastabend@intel.com> --- net/8021q/vlan.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html