vlan: Set hard_header_len according to available acceleration
authorVlad Yasevich <vyasevic@redhat.com>
Wed, 26 Mar 2014 15:47:56 +0000 (11:47 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 13:42:18 +0000 (06:42 -0700)
commit48f77355b32ab30456a0d6fda1ee2d367b9a3d25
treefe029e2fb04ebb2643b3f85ff2fe78ffaa4f2fb1
parent2d4cf3d6f36d88d30ce2186179fe2aa7e5c06c2e
vlan: Set hard_header_len according to available acceleration

[ Upstream commit fc0d48b8fb449ca007b2057328abf736cb516168 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/8021q/vlan.c
net/8021q/vlan_dev.c