Skip to content

Commit

Permalink
ice: alter feature support check for SRIOV and LAG
Browse files Browse the repository at this point in the history
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: bb52f42 ("ice: Add driver support for firmware changes for LAG")
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
  • Loading branch information
Dave Ertman authored and Tony Nguyen committed Dec 18, 2023
1 parent 7d88134 commit 4d50fcd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/intel/ice/ice_lag.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4d50fcd

Please sign in to comment.