Skip to contentSkip to conversation

ice: Fix SRIOV LAG disable on non-compliant aggreagate

PATCH In review Dave Ertman 4 participants 4 messages Oct 10, 2023 – Oct 30, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ice: Fix SRIOV LAG disable on non-compliant aggreagate

If an attribute of an aggregate interface disqualifies it from supporting SRIOV, the driver will unwind the SRIOV support. Currently the driver is clearing the feature bit for all interfaces in the aggregate, but this is not allowing the other interfaces to unwind successfully on driver unload.

Only clear the feature bit for the interface that is currently unwinding.

Fixes bf65da2eb279 ("ice: enforce interface eligibility and add messaging for SRIOV LAG")
---
 drivers/net/ethernet/intel/ice/ice_lag.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
drivers/net/ethernet/intel/ice/ice_lag.c +3 -9
index 2c96d1883e19..f405c07410a7 100644
@@ -1513,18 +1513,12 @@ static void ice_lag_chk_disabled_bond(struct ice_lag *lag, void *ptr)
  */
 static void ice_lag_disable_sriov_bond(struct ice_lag *lag)
 {
-	struct ice_lag_netdev_list *entry;
 	struct ice_netdev_priv *np;
-	struct net_device *netdev;
 	struct ice_pf *pf;
 
-	list_for_each_entry(entry, lag->netdev_head, node) {
-		netdev = entry->netdev;
-		np = netdev_priv(netdev);
-		pf = np->vsi->back;
-
-		ice_clear_feature_support(pf, ICE_F_SRIOV_LAG);
-	}
+	np = netdev_priv(lag->netdev);
+	pf = np->vsi->back;
+	ice_clear_feature_support(pf, ICE_F_SRIOV_LAG);
 }
 
 /**
Signature · 1 line
2.40.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 16 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Dave Ertman
Sent: Tuesday, October 10, 2023 7:32 PM
To: [email protected]
Cc: [email protected]
Subject: [Intel-wired-lan] [PATCH iwl-next v2] ice: Fix SRIOV LAG disable on non-compliant aggreagate

If an attribute of an aggregate interface disqualifies it from supporting SRIOV, the driver will unwind the SRIOV support. Currently the driver is clearing the feature bit for all interfaces in the aggregate, but this is not allowing the other interfaces to unwind successfully on driver unload.

Quoted 5 lines

Only clear the feature bit for the interface that is currently unwinding.

Fixes bf65da2eb279 ("ice: enforce interface eligibility and add messaging for

SRIOV LAG")

Thanks Dave!

Quoted 35 lines
---
 drivers/net/ethernet/intel/ice/ice_lag.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
drivers/net/ethernet/intel/ice/ice_lag.c +3 -9
index 2c96d1883e19..f405c07410a7 100644
@@ -1513,18 +1513,12 @@ static void ice_lag_chk_disabled_bond(struct
 ice_lag *lag, void *ptr)
  */
 static void ice_lag_disable_sriov_bond(struct ice_lag *lag)
 {
-	struct ice_lag_netdev_list *entry;
 	struct ice_netdev_priv *np;
-	struct net_device *netdev;
 	struct ice_pf *pf;
 
-	list_for_each_entry(entry, lag->netdev_head, node) {
-		netdev = entry->netdev;
-		np = netdev_priv(netdev);
-		pf = np->vsi->back;
-
-		ice_clear_feature_support(pf, ICE_F_SRIOV_LAG);
-	}
+	np = netdev_priv(lag->netdev);
+	pf = np->vsi->back;
+	ice_clear_feature_support(pf, ICE_F_SRIOV_LAG);
 }
 

/**
--
2.40.1

Quoted 4 lines

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

reviewer Reviewed-by on v2 1/1
#2 lore raw
In reply to Dave Ertman
Quoted 9 lines · Dave Ertman

If an attribute of an aggregate interface disqualifies it from supporting SRIOV, the driver will unwind the SRIOV support. Currently the driver is clearing the feature bit for all interfaces in the aggregate, but this is not allowing the other interfaces to unwind successfully on driver unload.

Only clear the feature bit for the interface that is currently unwinding.

Fixes bf65da2eb279 ("ice: enforce interface eligibility and add messaging for SRIOV LAG")
Tested-by on v2 1/1
#3 lore raw
In reply to Dave Ertman
Quoted 14 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Dave Ertman
Sent: Tuesday, October 10, 2023 11:02 PM
To: [email protected]
Cc: [email protected]
Subject: [Intel-wired-lan] [PATCH iwl-next v2] ice: Fix SRIOV LAG disable on non-compliant aggreagate

If an attribute of an aggregate interface disqualifies it from supporting SRIOV, the driver will unwind the SRIOV support. Currently the driver is clearing the feature bit for all interfaces in the aggregate, but this is not allowing the other interfaces to unwind successfully on driver unload.

Quoted 9 lines

Only clear the feature bit for the interface that is currently unwinding.

Fixes bf65da2eb279 ("ice: enforce interface eligibility and add messaging for

SRIOV LAG")

---
 drivers/net/ethernet/intel/ice/ice_lag.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)