diff options
author | Brett Creeley <brett.creeley@intel.com> | 2020-02-27 10:14:59 -0800 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2020-03-10 13:10:32 -0700 |
commit | 345be791abd11f24449b77cd2a64d18e29bb9f1b (patch) | |
tree | 2d9d9755cd5993101712463ce11f8de4e1d27931 /drivers | |
parent | 35e935617e6eed7f2b8e707bd594f04a663aadb7 (diff) |
ice: Correct setting VLAN pruning
VLAN pruning is not always being set correctly due to a previous change
that set Tx antispoof off. ice_vsi_is_vlan_pruning_ena() currently checks
for both Tx antispoof and Rx pruning. The expectation for this function is
to only check Rx pruning so fix the check.
Fixes: cd6d6b83316a ("ice: Fix VF spoofchk")
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_lib.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index 9230abdb4ee8..1ee6a86f507d 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c @@ -1877,20 +1877,14 @@ int ice_vsi_stop_xdp_tx_rings(struct ice_vsi *vsi) * ice_vsi_is_vlan_pruning_ena - check if VLAN pruning is enabled or not * @vsi: VSI to check whether or not VLAN pruning is enabled. * - * returns true if Rx VLAN pruning and Tx VLAN anti-spoof is enabled and false - * otherwise. + * returns true if Rx VLAN pruning is enabled and false otherwise. */ bool ice_vsi_is_vlan_pruning_ena(struct ice_vsi *vsi) { - u8 rx_pruning = ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA; - u8 tx_pruning = ICE_AQ_VSI_SEC_TX_VLAN_PRUNE_ENA << - ICE_AQ_VSI_SEC_TX_PRUNE_ENA_S; - if (!vsi) return false; - return ((vsi->info.sw_flags2 & rx_pruning) && - (vsi->info.sec_flags & tx_pruning)); + return (vsi->info.sw_flags2 & ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA); } /** |