ice: Add initial support for QinQ
authorBrett Creeley <brett.creeley@intel.com>
Wed, 22 Jan 2020 15:21:24 +0000 (07:21 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 16 Feb 2020 00:24:33 +0000 (16:24 -0800)
commit42f3efef3554ea141f14234bf80d287ccb9f5a5e
treef3a8758dd802d989e65d13f961d5c4ad9e31acf1
parent2019fc96af228b412bdb2e8e0ad4b1fc12046a51
ice: Add initial support for QinQ

Allow support for S-Tag + C-Tag VLAN traffic by disabling pruning when
there are no 0x8100 VLAN interfaces currently created on top of the PF.
When an 0x8100 VLAN interface is configured, enable pruning and only
support single and double C-Tag VLAN traffic. If all of the 0x8100
interfaces that were created on top of the PF are removed via
ethtool -K <iface> rx-vlan-filter off or via ip tools, then disable
pruning and allow S-Tag + C-Tag traffic again.

Add VLAN 0 filter by default for the PF. This is because a bridge
sets the default_pvid to 1, sends the request down to
ice_vlan_rx_add_vid(), and we never get the request to add VLAN 0 via
the 8021q module which causes all untagged traffic to be dropped.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_lib.c
drivers/net/ethernet/intel/ice/ice_lib.h
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c