mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
i40e/i40evf: Only offload VLAN tag if enabled
The driver was offloading the VLAN tag into the skb any time there was a VLAN tag and the hardware stripping was enabled. Just check to make sure it's enabled before put_tag. Change-Id: Ife95290c06edd9a616393b38679923938b382241 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
db0772782f
commit
a149f2c323
2 changed files with 4 additions and 2 deletions
|
@ -1370,7 +1370,8 @@ static void i40e_receive_skb(struct i40e_ring *rx_ring,
|
||||||
{
|
{
|
||||||
struct i40e_q_vector *q_vector = rx_ring->q_vector;
|
struct i40e_q_vector *q_vector = rx_ring->q_vector;
|
||||||
|
|
||||||
if (vlan_tag & VLAN_VID_MASK)
|
if ((rx_ring->netdev->features & NETIF_F_HW_VLAN_CTAG_RX) &&
|
||||||
|
(vlan_tag & VLAN_VID_MASK))
|
||||||
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
|
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
|
||||||
|
|
||||||
napi_gro_receive(&q_vector->napi, skb);
|
napi_gro_receive(&q_vector->napi, skb);
|
||||||
|
|
|
@ -842,7 +842,8 @@ static void i40e_receive_skb(struct i40e_ring *rx_ring,
|
||||||
{
|
{
|
||||||
struct i40e_q_vector *q_vector = rx_ring->q_vector;
|
struct i40e_q_vector *q_vector = rx_ring->q_vector;
|
||||||
|
|
||||||
if (vlan_tag & VLAN_VID_MASK)
|
if ((rx_ring->netdev->features & NETIF_F_HW_VLAN_CTAG_RX) &&
|
||||||
|
(vlan_tag & VLAN_VID_MASK))
|
||||||
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
|
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
|
||||||
|
|
||||||
napi_gro_receive(&q_vector->napi, skb);
|
napi_gro_receive(&q_vector->napi, skb);
|
||||||
|
|
Loading…
Reference in a new issue