ice: Avoid detrimental cleanup for bond during interface stop
Subsystems (2)
PATCH 1/1 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.
--- drivers/net/ethernet/intel/ice/ice_lib.c | 25 ++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-)
drivers/net/ethernet/intel/ice/ice_lib.c +17 -8
@@ -3805,22 +3805,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
Signature · 1 line
2.51.0
Quoted 62 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Dave Ertman
Sent: Thursday, November 20, 2025 6:58 PM
To: [email protected]
Cc: Keller, Jacob E <[email protected]>; Marcin Szycik <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net] ice: Avoid detrimental cleanup for bond during interface stopWhen 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 forSRIOV on bonded interface")
Reviewed-by Jacob Keller <[email protected]>Reviewed-by Marcin Szycik <[email protected]>Signed-off-by Dave Ertman <[email protected]>--- drivers/net/ethernet/intel/ice/ice_lib.c | 25 ++++++++++++++++----- --- 1 file changed, 17 insertions(+), 8 deletions(-)drivers/net/ethernet/intel/ice/ice_lib.c +9
-4@@ -3805,22 +3805,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))
drivers/net/ethernet/intel/ice/ice_lib.c int ice_vsi_add_vlan_zero(struct ice_vsi · line 3829
Quoted 10 lines
drivers/net/ethernet/intel/ice/ice_lib.c +3
-4return 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 {
Two identical pf->lag && pf->lag->primary guards are duplicated.
Can you consider factor into a single guard (e.g., bool primary = pf->lag && pf->lag->primary;) to reduce churn and keep net/* code minimal? Also, wording is slightly different "not deleting QinQ prune" / "not deleting prune"
Can you clarify the purpose in commit message or comment?
Thank you
Alex
Quoted 11 lines
drivers/net/ethernet/intel/ice/ice_lib.c +5
-0+ 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
--
2.51.0
Quoted 11 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Dave Ertman
Sent: 20 November 2025 23:28
To: [email protected]
Cc: Keller, Jacob E <[email protected]>; Marcin Szycik <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net] ice: Avoid detrimental cleanup for bond during interface stopWhen 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.
Quoted 8 lines
Fixes 1e0f9881ef79 ("ice: Flesh out implementation of support for SRIOV on bonded interface")Reviewed-by Jacob Keller <[email protected]>Reviewed-by Marcin Szycik <[email protected]>Signed-off-by Dave Ertman <[email protected]>---
drivers/net/ethernet/intel/ice/ice_lib.c| 25 ++++++++++++++++--------1 file changed, 17 insertions(+), 8 deletions(-)