Commit 345be791 authored by Brett Creeley's avatar Brett Creeley Committed by Jeff Kirsher

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: cd6d6b83 ("ice: Fix VF spoofchk")
Signed-off-by: default avatarBrett Creeley <brett.creeley@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 35e93561
...@@ -1877,20 +1877,14 @@ int ice_vsi_stop_xdp_tx_rings(struct ice_vsi *vsi) ...@@ -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 * 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. * @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 * returns true if Rx VLAN pruning is enabled and false otherwise.
* otherwise.
*/ */
bool ice_vsi_is_vlan_pruning_ena(struct ice_vsi *vsi) 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) if (!vsi)
return false; return false;
return ((vsi->info.sw_flags2 & rx_pruning) && return (vsi->info.sw_flags2 & ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA);
(vsi->info.sec_flags & tx_pruning));
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment