OSDN Git Service

i40e: fix VLAN.TCI == 0 RX HW offload
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Tue, 4 Dec 2018 17:31:14 +0000 (18:31 +0100)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 12 Dec 2018 23:40:42 +0000 (15:40 -0800)
commit2a508c64ad278d022543ec3360449c7f243eb56b
tree669aca43d96f652d5ed5c7e5045792386a310ac7
parent158daed16efb1170694e420ae06ba8ba954d82e5
i40e: fix VLAN.TCI == 0 RX HW offload

This fixes two bugs in hardware VLAN offload:
 1. VLAN.TCI == 0 was being dropped
 2. there was a race between disabling of VLAN RX feature in hardware
    and processing RX queue, where packets processed in this window
    could have their VLAN information dropped

Fix moves the VLAN handling into i40e_process_skb_fields() to save on
duplicated code. i40e_receive_skb() becomes trivial and so is removed.

Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40e/i40e_txrx_common.h
drivers/net/ethernet/intel/i40e/i40e_xsk.c