diff mbox series

[iwl-next] ice: Fix SRIOV LAG disable on non-compliant aggreagate

Message ID 20231006210211.1443696-1-david.m.ertman@intel.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [iwl-next] ice: Fix SRIOV LAG disable on non-compliant aggreagate | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit fail Errors and warnings before: 1364 this patch: 19
netdev/cc_maintainers fail 2 blamed authors not CCed: anthony.l.nguyen@intel.com daniel.machon@microchip.com; 7 maintainers not CCed: pabeni@redhat.com daniel.machon@microchip.com edumazet@google.com jesse.brandeburg@intel.com kuba@kernel.org anthony.l.nguyen@intel.com davem@davemloft.net
netdev/build_clang fail Errors and warnings before: 1464 this patch: 20
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn fail Errors and warnings before: 2410 this patch: 19
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 20 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Ertman, David M Oct. 6, 2023, 9:02 p.m. UTC
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")
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_lag.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

Comments

Simon Horman Oct. 8, 2023, 2:09 p.m. UTC | #1
On Fri, Oct 06, 2023 at 02:02:11PM -0700, Dave Ertman wrote:
> 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")
> Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_lag.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_lag.c b/drivers/net/ethernet/intel/ice/ice_lag.c
> index 2c96d1883e19..c9071228b1ea 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lag.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lag.c
> @@ -1513,17 +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);
>  	}
>  }

Hi Dave,

unfortunately applying this patch results in a build failure.
Ertman, David M Oct. 10, 2023, 5:28 p.m. UTC | #2
> -----Original Message-----
> From: Simon Horman <horms@kernel.org>
> Sent: Sunday, October 8, 2023 7:10 AM
> To: Ertman, David M <david.m.ertman@intel.com>
> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org
> Subject: Re: [PATCH iwl-next] ice: Fix SRIOV LAG disable on non-compliant
> aggreagate
> 
> On Fri, Oct 06, 2023 at 02:02:11PM -0700, Dave Ertman wrote:
> > 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")
> > Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
> > ---
> >  drivers/net/ethernet/intel/ice/ice_lag.c | 11 +++--------
> >  1 file changed, 3 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/intel/ice/ice_lag.c
> b/drivers/net/ethernet/intel/ice/ice_lag.c
> > index 2c96d1883e19..c9071228b1ea 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_lag.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_lag.c
> > @@ -1513,17 +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);
> >  	}
> >  }
> 
> Hi Dave,
> 
> unfortunately applying this patch results in a build failure.
> 
> --
> pw-bot: changes-requested
> 
> 
Sorry about the mix-up.  I fixed the braces issues, but then sent the wrong version of the patch out.

Correct version on the way with v2.
DaveE
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ice/ice_lag.c b/drivers/net/ethernet/intel/ice/ice_lag.c
index 2c96d1883e19..c9071228b1ea 100644
--- a/drivers/net/ethernet/intel/ice/ice_lag.c
+++ b/drivers/net/ethernet/intel/ice/ice_lag.c
@@ -1513,17 +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);
 	}
 }