Skip to content

Commit cd186e5

Browse files
bcreeley13Jeff Kirsher
authored andcommitted
ice: Only disable VLAN pruning for the VF when all VLANs are removed
Currently if the VF adds a VLAN, VLAN pruning will be enabled for that VSI. Also, when a VLAN gets deleted it will disable VLAN pruning even if other VLAN(s) exists for the VF. Fix this by only disabling VLAN pruning on the VF VSI when removing the last VF (i.e. vf->num_vlan == 0). 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>
1 parent 03bba02 commit cd186e5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2767,8 +2767,9 @@ static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v)
27672767
}
27682768

27692769
vf->num_vlan--;
2770-
/* Disable VLAN pruning when removing VLAN */
2771-
ice_cfg_vlan_pruning(vsi, false, false);
2770+
/* Disable VLAN pruning when the last VLAN is removed */
2771+
if (!vf->num_vlan)
2772+
ice_cfg_vlan_pruning(vsi, false, false);
27722773

27732774
/* Disable Unicast/Multicast VLAN promiscuous mode */
27742775
if (vlan_promisc) {

0 commit comments

Comments
 (0)