diff options
author | John Fastabend <john.r.fastabend@intel.com> | 2010-10-30 10:22:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-15 13:11:39 -0500 |
commit | 029f5fc31cdb35d6c8a7fe9a54bf21556e175988 (patch) | |
tree | 6b30ca1d4e93095f8c0dce87f54a8f2bd55c4b53 /net/8021q | |
parent | 58e998c6d23988490162cef0784b19ea274d90bb (diff) |
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: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r-- | net/8021q/vlan.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 52077ca22072..55d2135889fc 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -334,6 +334,12 @@ static void vlan_transfer_features(struct net_device *dev, | |||
334 | vlandev->features &= ~dev->vlan_features; | 334 | vlandev->features &= ~dev->vlan_features; |
335 | vlandev->features |= dev->features & dev->vlan_features; | 335 | vlandev->features |= dev->features & dev->vlan_features; |
336 | vlandev->gso_max_size = dev->gso_max_size; | 336 | vlandev->gso_max_size = dev->gso_max_size; |
337 | |||
338 | if (dev->features & NETIF_F_HW_VLAN_TX) | ||
339 | vlandev->hard_header_len = dev->hard_header_len; | ||
340 | else | ||
341 | vlandev->hard_header_len = dev->hard_header_len + VLAN_HLEN; | ||
342 | |||
337 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) | 343 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) |
338 | vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid; | 344 | vlandev->fcoe_ddp_xid = dev->fcoe_ddp_xid; |
339 | #endif | 345 | #endif |