]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ice: Avoid detrimental cleanup for bond during interface stop
authorDave Ertman <david.m.ertman@intel.com>
Thu, 20 Nov 2025 17:58:26 +0000 (09:58 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jan 2026 09:27:32 +0000 (10:27 +0100)
[ Upstream commit a9d45c22ed120cdd15ff56d0a6e4700c46451901 ]

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: 1e0f9881ef79 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_lib.c

index 972c515d8789f65ff9ed6c677953ce3a6a2b4b21..7aef40b50b89896dcee7f84d7be8bc33365b3356 100644 (file)
@@ -3897,22 +3897,31 @@ int ice_vsi_add_vlan_zero(struct ice_vsi *vsi)
 int ice_vsi_del_vlan_zero(struct ice_vsi *vsi)
 {
        struct ice_vsi_vlan_ops *vlan_ops = ice_get_compat_vsi_vlan_ops(vsi);
+       struct ice_pf *pf = vsi->back;
        struct ice_vlan vlan;
        int err;
 
-       vlan = ICE_VLAN(0, 0, 0);
-       err = vlan_ops->del_vlan(vsi, &vlan);
-       if (err && err != -EEXIST)
-               return err;
+       if (pf->lag && pf->lag->primary) {
+               dev_dbg(ice_pf_to_dev(pf), "Interface is primary in aggregate - not deleting prune list\n");
+       } else {
+               vlan = ICE_VLAN(0, 0, 0);
+               err = vlan_ops->del_vlan(vsi, &vlan);
+               if (err && err != -EEXIST)
+                       return err;
+       }
 
        /* in SVM both VLAN 0 filters are identical */
        if (!ice_is_dvm_ena(&vsi->back->hw))
                return 0;
 
-       vlan = ICE_VLAN(ETH_P_8021Q, 0, 0);
-       err = vlan_ops->del_vlan(vsi, &vlan);
-       if (err && err != -EEXIST)
-               return err;
+       if (pf->lag && pf->lag->primary) {
+               dev_dbg(ice_pf_to_dev(pf), "Interface is primary in aggregate - not deleting QinQ prune list\n");
+       } else {
+               vlan = ICE_VLAN(ETH_P_8021Q, 0, 0);
+               err = vlan_ops->del_vlan(vsi, &vlan);
+               if (err && err != -EEXIST)
+                       return err;
+       }
 
        /* when deleting the last VLAN filter, make sure to disable the VLAN
         * promisc mode so the filter isn't left by accident