diff options
author | Vlad Yasevich <vyasevic@redhat.com> | 2014-03-26 15:47:56 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-27 19:00:37 (GMT) |
commit | fc0d48b8fb449ca007b2057328abf736cb516168 (patch) | |
tree | 9c0a39d0db9ee11261c6261035ff355157720668 /net/8021q/vlan_dev.c | |
parent | 14a0d635d18d0fb552dcc979d6d25106e6541f2e (diff) | |
download | linux-fc0d48b8fb449ca007b2057328abf736cb516168.tar.xz |
vlan: Set hard_header_len according to available acceleration
Currently, if the card supports CTAG acceleration we do not
account for the vlan header even if we are configuring an
8021AD vlan. This may not be best since we'll do software
tagging for 8021AD which will cause data copy on skb head expansion
Configure the length based on available hw offload capabilities and
vlan protocol.
CC: Patrick McHardy <kaber@trash.net>
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r-- | net/8021q/vlan_dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 4b65aa4..a9591ff 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -592,7 +592,8 @@ static int vlan_dev_init(struct net_device *dev) #endif dev->needed_headroom = real_dev->needed_headroom; - if (real_dev->features & NETIF_F_HW_VLAN_CTAG_TX) { + if (vlan_hw_offload_capable(real_dev->features, + vlan_dev_priv(dev)->vlan_proto)) { dev->header_ops = &vlan_passthru_header_ops; dev->hard_header_len = real_dev->hard_header_len; } else { |