Skip to contentSkip to conversation

ice: alter feature support check for SRIOV and LAG

PATCH In review Dave Ertman 3 participants 3 messages Dec 11, 2023 – Dec 18, 2023

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

PATCH v2 1/1 ice: alter feature support check for SRIOV and LAG

Previously, the ice driver had support for using a hanldler for bonding netdev events to ensure that conflicting features were not allowed to be activated at the same time. While this was still in place, additional support was added to specifically support SRIOV and LAG together. These both utilized the netdev event handler, but the SRIOV and LAG feature was behind a capabilities feature check to make sure the current NVM has support.

The exclusion part of the event handler should be removed since there are users who have custom made solutions that depend on the non-exclusion of features.

Wrap the creation/registration and cleanup of the event handler and associated structs in the probe flow with a feature check so that the only systems that support the full implementation of LAG features will initialize support. This will leave other systems unhindered with functionality as it existed before any LAG code was added.

Fixes bb52f42acef6 ("ice: Add driver support for firmware changes for LAG")

---

v2: Added Fixes tag

---
 drivers/net/ethernet/intel/ice/ice_lag.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/intel/ice/ice_lag.c +2 -0
index 280994ee5933..b47cd43ae871 100644
@@ -1981,6 +1981,8 @@ int ice_init_lag(struct ice_pf *pf)
 	int n, err;
 
 	ice_lag_init_feature_support_flag(pf);
+	if (!ice_is_feature_supported(pf, ICE_F_SRIOV_LAG))
+		return 0;
 
 	pf->lag = kzalloc(sizeof(*lag), GFP_KERNEL);
 	if (!pf->lag)
Signature · 1 line
2.40.1
reviewer Reviewed-by on v2 1/1
#1 lore raw
Quoted 18 lines · Dave Ertman

Previously, the ice driver had support for using a hanldler for bonding netdev events to ensure that conflicting features were not allowed to be activated at the same time. While this was still in place, additional support was added to specifically support SRIOV and LAG together. These both utilized the netdev event handler, but the SRIOV and LAG feature was behind a capabilities feature check to make sure the current NVM has support.

The exclusion part of the event handler should be removed since there are users who have custom made solutions that depend on the non-exclusion of features.

Wrap the creation/registration and cleanup of the event handler and associated structs in the probe flow with a feature check so that the only systems that support the full implementation of LAG features will initialize support. This will leave other systems unhindered with functionality as it existed before any LAG code was added.

Quoted 3 lines
Fixes bb52f42acef6 ("ice: Add driver support for firmware changes for LAG")

Hi Dave,

I'm interpreting this as fixing a regression of an existing feature. In that context:

Tested-by on v2 1/1
#2 lore raw
In reply to Dave Ertman
Quoted 29 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Dave Ertman
Sent: Tuesday, December 12, 2023 2:49 AM
To: [email protected]
Cc: [email protected]; Brandeburg, Jesse <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net v2] ice: alter feature support check for SRIOV and LAG

Previously, the ice driver had support for using a hanldler for bonding netdev events to ensure that conflicting features were not allowed to be activated at the same time. While this was still in place, additional support was added to specifically support SRIOV and LAG together. These both utilized the netdev event handler, but the SRIOV and LAG feature was behind a capabilities feature check to make sure the current NVM has support.

The exclusion part of the event handler should be removed since there are users who have custom made solutions that depend on the non-exclusion of features.

Wrap the creation/registration and cleanup of the event handler and associated structs in the probe flow with a feature check so that the only systems that support the full implementation of LAG features will initialize support. This will leave other systems unhindered with functionality as it existed before any LAG code was added.

Fixes bb52f42acef6 ("ice: Add driver support for firmware changes for LAG")
Quoted 7 lines

---

v2: Added Fixes tag

---
 drivers/net/ethernet/intel/ice/ice_lag.c | 2 ++
 1 file changed, 2 insertions(+)