All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH net v1] i40e: Fix VFs not created
@ 2020-11-27 11:23 Mateusz Palczewski
  2021-02-08 18:42 ` Jankowski, Konrad0
  2021-02-15  7:46 ` Paul Menzel
  0 siblings, 2 replies; 3+ messages in thread
From: Mateusz Palczewski @ 2020-11-27 11:23 UTC (permalink / raw)
  To: intel-wired-lan

From: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>

When creating VFs they were sometimes not getting resources.
It was caused by not executing i40e_reset_all_vfs due to
flag __I40E_VF_DISABLE being set on PF. Because of this
IAVF was never able to finish setup sequence never
getting reset indication from PF.
Changed test_and_set_bit __I40E_VF_DISABLE in
i40e_sync_filters_subtask to test_bit and removed clear_bit.
This function should not set this bit it should only check
if it hasn't been already set.

Fixes: a7542b876075 ("i40e: check __I40E_VF_DISABLE bit in i40e_sync_filters_subtask")
Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 5bee1de..a926331 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -2623,7 +2623,7 @@ static void i40e_sync_filters_subtask(struct i40e_pf *pf)
 		return;
 	if (!test_and_clear_bit(__I40E_MACVLAN_SYNC_PENDING, pf->state))
 		return;
-	if (test_and_set_bit(__I40E_VF_DISABLE, pf->state)) {
+	if (test_bit(__I40E_VF_DISABLE, pf->state)) {
 		set_bit(__I40E_MACVLAN_SYNC_PENDING, pf->state);
 		return;
 	}
@@ -2641,7 +2641,6 @@ static void i40e_sync_filters_subtask(struct i40e_pf *pf)
 			}
 		}
 	}
-	clear_bit(__I40E_VF_DISABLE, pf->state);
 }
 
 /**
-- 
2.17.1

---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Sowackiego 173 | 80-298 Gdask | Sd Rejonowy Gdask Pnoc | VII Wydzia Gospodarczy Krajowego Rejestru Sdowego - KRS 101882 | NIP 957-07-52-316 | Kapita zakadowy 200.000 PLN.
Ta wiadomo wraz z zacznikami jest przeznaczona dla okrelonego adresata i moe zawiera informacje poufne. W razie przypadkowego otrzymania tej wiadomoci, prosimy o powiadomienie nadawcy oraz trwae jej usunicie; jakiekolwiek przegldanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
 


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

* [Intel-wired-lan] [PATCH net v1] i40e: Fix VFs not created
  2020-11-27 11:23 [Intel-wired-lan] [PATCH net v1] i40e: Fix VFs not created Mateusz Palczewski
@ 2021-02-08 18:42 ` Jankowski, Konrad0
  2021-02-15  7:46 ` Paul Menzel
  1 sibling, 0 replies; 3+ messages in thread
From: Jankowski, Konrad0 @ 2021-02-08 18:42 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Mateusz Palczewski
> Sent: pi?tek, 27 listopada 2020 12:23
> To: intel-wired-lan at lists.osuosl.org
> Cc: Dziedziuch, SylwesterX <sylwesterx.dziedziuch@intel.com>
> Subject: [Intel-wired-lan] [PATCH net v1] i40e: Fix VFs not created
> 
> From: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
> 
> When creating VFs they were sometimes not getting resources.
> It was caused by not executing i40e_reset_all_vfs due to flag
> __I40E_VF_DISABLE being set on PF. Because of this IAVF was never able to
> finish setup sequence never getting reset indication from PF.
> Changed test_and_set_bit __I40E_VF_DISABLE in i40e_sync_filters_subtask
> to test_bit and removed clear_bit.
> This function should not set this bit it should only check if it hasn't been
> already set.
> 
> Fixes: a7542b876075 ("i40e: check __I40E_VF_DISABLE bit in
> i40e_sync_filters_subtask")
> Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c
> b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 5bee1de..a926331 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -2623,7 +2623,7 @@ static void i40e_sync_filters_subtask(struct i40e_pf
> *pf)
>  		return;
>  	if (!test_and_clear_bit(__I40E_MACVLAN_SYNC_PENDING, pf-
> >state))
>  		return;
> -	if (test_and_set_bit(__I40E_VF_DISABLE, pf->state)) {
> +	if (test_bit(__I40E_VF_DISABLE, pf->state)) {
>  		set_bit(__I40E_MACVLAN_SYNC_PENDING, pf->state);
>  		return;
>  	}
> @@ -2641,7 +2641,6 @@ static void i40e_sync_filters_subtask(struct i40e_pf
> *pf)
>  			}
>  		}
>  	}
> -	clear_bit(__I40E_VF_DISABLE, pf->state);
>  }
> 
>  /**
> --

Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>

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

* [Intel-wired-lan] [PATCH net v1] i40e: Fix VFs not created
  2020-11-27 11:23 [Intel-wired-lan] [PATCH net v1] i40e: Fix VFs not created Mateusz Palczewski
  2021-02-08 18:42 ` Jankowski, Konrad0
@ 2021-02-15  7:46 ` Paul Menzel
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2021-02-15  7:46 UTC (permalink / raw)
  To: intel-wired-lan

[+cc Stefan as author of commit under Fixes:]

Am 27.11.20 um 12:23 schrieb Mateusz Palczewski:
> From: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
> 
> When creating VFs they were sometimes not getting resources.
> It was caused by not executing i40e_reset_all_vfs due to
> flag __I40E_VF_DISABLE being set on PF. Because of this
> IAVF was never able to finish setup sequence never
> getting reset indication from PF.
> Changed test_and_set_bit __I40E_VF_DISABLE in
> i40e_sync_filters_subtask to test_bit and removed clear_bit.
> This function should not set this bit it should only check
> if it hasn't been already set.
> 
> Fixes: a7542b876075 ("i40e: check __I40E_VF_DISABLE bit in i40e_sync_filters_subtask")
> Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
> ---
>   drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 5bee1de..a926331 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -2623,7 +2623,7 @@ static void i40e_sync_filters_subtask(struct i40e_pf *pf)
>   		return;
>   	if (!test_and_clear_bit(__I40E_MACVLAN_SYNC_PENDING, pf->state))
>   		return;
> -	if (test_and_set_bit(__I40E_VF_DISABLE, pf->state)) {
> +	if (test_bit(__I40E_VF_DISABLE, pf->state)) {
>   		set_bit(__I40E_MACVLAN_SYNC_PENDING, pf->state);
>   		return;
>   	}
> @@ -2641,7 +2641,6 @@ static void i40e_sync_filters_subtask(struct i40e_pf *pf)
>   			}
>   		}
>   	}
> -	clear_bit(__I40E_VF_DISABLE, pf->state);
>   }
>   
>   /**

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

end of thread, other threads:[~2021-02-15  7:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27 11:23 [Intel-wired-lan] [PATCH net v1] i40e: Fix VFs not created Mateusz Palczewski
2021-02-08 18:42 ` Jankowski, Konrad0
2021-02-15  7:46 ` Paul Menzel

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.