[PATCH v2 3/3][SRU][J] ice: alter feature support check for SRIOV and LAG

Robert Malz robert.malz at canonical.com
Thu Jan 11 15:03:21 UTC 2024


From: Dave Ertman <david.m.ertman at intel.com>

BugLink: https://bugs.launchpad.net/bugs/2036239

Previously, the ice driver had support for using a handler 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")
Reviewed-by: Jesse Brandeburg <jesse.brandeburg at intel.com>
Signed-off-by: Dave Ertman <david.m.ertman at intel.com>
Reviewed-by: Simon Horman <horms at kernel.org>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha at intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen at intel.com>

(cherry-picked from commit 4d50fcdc2476eef94c14c6761073af5667bb43b6)
Signed-off-by: Robert Malz <robert.malz at canonical.com>
---
 drivers/net/ethernet/intel/ice/ice_lag.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_lag.c b/drivers/net/ethernet/intel/ice/ice_lag.c
index e5cfeb7a5ec3..886907750667 100644
--- a/drivers/net/ethernet/intel/ice/ice_lag.c
+++ b/drivers/net/ethernet/intel/ice/ice_lag.c
@@ -390,6 +390,8 @@ int ice_init_lag(struct ice_pf *pf)
 	int 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)
-- 
2.34.1




More information about the kernel-team mailing list