All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH iwl-next] ice: Fix SRIOV LAG disable on non-compliant aggreagate
@ 2023-10-06 21:02 ` Dave Ertman
  0 siblings, 0 replies; 7+ messages in thread
From: Dave Ertman @ 2023-10-06 21:02 UTC (permalink / raw)
  To: intel-wired-lan; +Cc: netdev

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);
 	}
 }
 
-- 
2.40.1

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH iwl-next] ice: Fix SRIOV LAG disable on non-compliant aggreagate
@ 2023-10-06 21:02 ` Dave Ertman
  0 siblings, 0 replies; 7+ messages in thread
From: Dave Ertman @ 2023-10-06 21:02 UTC (permalink / raw)
  To: intel-wired-lan; +Cc: netdev

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);
 	}
 }
 
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-next] ice: Fix SRIOV LAG disable on non-compliant aggreagate
  2023-10-06 21:02 ` Dave Ertman
@ 2023-10-08 14:09   ` Simon Horman
  -1 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2023-10-08 14:09 UTC (permalink / raw)
  To: Dave Ertman; +Cc: netdev, intel-wired-lan

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


_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH iwl-next] ice: Fix SRIOV LAG disable on non-compliant aggreagate
@ 2023-10-08 14:09   ` Simon Horman
  0 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2023-10-08 14:09 UTC (permalink / raw)
  To: Dave Ertman; +Cc: intel-wired-lan, netdev

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-next] ice: Fix SRIOV LAG disable on non-compliant aggreagate
  2023-10-06 21:02 ` Dave Ertman
  (?)
  (?)
@ 2023-10-09 21:52 ` Jacob Keller
  -1 siblings, 0 replies; 7+ messages in thread
From: Jacob Keller @ 2023-10-09 21:52 UTC (permalink / raw)
  To: intel-wired-lan



On 10/6/2023 2:02 PM, 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.
> 

So, previously we had to go into each netdev associated with this bond
and disable SR-IOV? How does that happen now when we're doing this
disable on the non-unload case? Is that handled by having some other
flow? Does it just not need to happen at all and that was always a bug
to it this way?

Thanks,
Jake

> 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);
>  	}
>  }
>  
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-next] ice: Fix SRIOV LAG disable on non-compliant aggreagate
  2023-10-08 14:09   ` Simon Horman
@ 2023-10-10 17:28     ` Ertman, David M
  -1 siblings, 0 replies; 7+ messages in thread
From: Ertman, David M @ 2023-10-10 17:28 UTC (permalink / raw)
  To: Simon Horman; +Cc: netdev, intel-wired-lan

> -----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
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH iwl-next] ice: Fix SRIOV LAG disable on non-compliant aggreagate
@ 2023-10-10 17:28     ` Ertman, David M
  0 siblings, 0 replies; 7+ messages in thread
From: Ertman, David M @ 2023-10-10 17:28 UTC (permalink / raw)
  To: Simon Horman; +Cc: intel-wired-lan, netdev

> -----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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-10-10 17:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-06 21:02 [Intel-wired-lan] [PATCH iwl-next] ice: Fix SRIOV LAG disable on non-compliant aggreagate Dave Ertman
2023-10-06 21:02 ` Dave Ertman
2023-10-08 14:09 ` [Intel-wired-lan] " Simon Horman
2023-10-08 14:09   ` Simon Horman
2023-10-10 17:28   ` [Intel-wired-lan] " Ertman, David M
2023-10-10 17:28     ` Ertman, David M
2023-10-09 21:52 ` [Intel-wired-lan] " Jacob Keller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.