OSDN Git Service

ice: Refactor removal of VLAN promiscuous rules
authorBrett Creeley <brett.creeley@intel.com>
Fri, 8 Nov 2019 14:23:24 +0000 (06:23 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 22 Nov 2019 21:15:08 +0000 (13:15 -0800)
commit1bc7a4ab85ba0d874b193f2812a5e14e1ec6e9af
treebe4e5fd72bf8ee0f620baa4c5da19d5e8fd57f43
parente25f9152bc07de534b2b590ce6c052ea25dd8900
ice: Refactor removal of VLAN promiscuous rules

Currently ice_clear_vsi_promisc() detects if the VLAN ID sent is not 0
and sets the recipe_id to ICE_SW_LKUP_PROMISC_VLAN in that case and
ICE_SW_LKUP_PROMISC if the VLAN_ID is 0. However this doesn't allow VLAN
0 promiscuous rules to be removed, but they can be added. Fix this by
checking if the promisc_mask contains ICE_PROMISC_VLAN_RX or
ICE_PROMISC_VLAN_TX. This change was made to match what is being done
for ice_set_vsi_promisc().

Signed-off-by: Brett Creeley <brett.creeley@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_switch.c