Skip to content

Commit a9d45c2

Browse files
dmertmananguy11
authored andcommitted
ice: Avoid detrimental cleanup for bond during interface stop
When the user issues an administrative down to an interface that is the primary for an aggregate bond, the prune lists are being purged. This breaks communication to the secondary interface, which shares a prune list on the main switch block while bonded together. For the primary interface of an aggregate, avoid deleting these prune lists during stop, and since they are hardcoded to specific values for the default vlan and QinQ vlans, the attempt to re-add them during the up phase will quietly fail without any additional problem. Fixes: 1e0f988 ("ice: Flesh out implementation of support for SRIOV on bonded interface") Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com> Signed-off-by: Dave Ertman <david.m.ertman@intel.com> Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent 8439016 commit a9d45c2

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

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

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3809,22 +3809,31 @@ int ice_vsi_add_vlan_zero(struct ice_vsi *vsi)
38093809
int ice_vsi_del_vlan_zero(struct ice_vsi *vsi)
38103810
{
38113811
struct ice_vsi_vlan_ops *vlan_ops = ice_get_compat_vsi_vlan_ops(vsi);
3812+
struct ice_pf *pf = vsi->back;
38123813
struct ice_vlan vlan;
38133814
int err;
38143815

3815-
vlan = ICE_VLAN(0, 0, 0);
3816-
err = vlan_ops->del_vlan(vsi, &vlan);
3817-
if (err && err != -EEXIST)
3818-
return err;
3816+
if (pf->lag && pf->lag->primary) {
3817+
dev_dbg(ice_pf_to_dev(pf), "Interface is primary in aggregate - not deleting prune list\n");
3818+
} else {
3819+
vlan = ICE_VLAN(0, 0, 0);
3820+
err = vlan_ops->del_vlan(vsi, &vlan);
3821+
if (err && err != -EEXIST)
3822+
return err;
3823+
}
38193824

38203825
/* in SVM both VLAN 0 filters are identical */
38213826
if (!ice_is_dvm_ena(&vsi->back->hw))
38223827
return 0;
38233828

3824-
vlan = ICE_VLAN(ETH_P_8021Q, 0, 0);
3825-
err = vlan_ops->del_vlan(vsi, &vlan);
3826-
if (err && err != -EEXIST)
3827-
return err;
3829+
if (pf->lag && pf->lag->primary) {
3830+
dev_dbg(ice_pf_to_dev(pf), "Interface is primary in aggregate - not deleting QinQ prune list\n");
3831+
} else {
3832+
vlan = ICE_VLAN(ETH_P_8021Q, 0, 0);
3833+
err = vlan_ops->del_vlan(vsi, &vlan);
3834+
if (err && err != -EEXIST)
3835+
return err;
3836+
}
38283837

38293838
/* when deleting the last VLAN filter, make sure to disable the VLAN
38303839
* promisc mode so the filter isn't left by accident

0 commit comments

Comments
 (0)