lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fbf72244-873e-44f2-8974-76be6f7118e6@amd.com>
Date: Thu, 15 May 2025 15:40:51 -0700
From: "Nelson, Shannon" <shannon.nelson@....com>
To: Robert Malz <robert.malz@...onical.com>, netdev@...r.kernel.org,
 intel-wired-lan@...ts.osuosl.org, anthony.l.nguyen@...el.com,
 przemyslaw.kitszel@...el.com, andrew+netdev@...n.ch, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
 sylwesterx.dziedziuch@...el.com, mateusz.palczewski@...el.com,
 jacob.e.keller@...el.com
Subject: Re: [PATCH 2/2] i40e: retry VFLR handling if there is ongoing VF
 reset

On 5/14/2025 7:57 AM, Robert Malz wrote:
> 
> When a VFLR interrupt is received during a VF reset initiated from a
> different source, the VFLR may be not fully handled. This can
> leave the VF in an undefined state.
> To address this, set the I40E_VFLR_EVENT_PENDING bit again during VFLR
> handling if the reset is not yet complete. This ensures the driver
> will properly complete the VF reset in such scenarios.
> 
> Fixes: 52424f974bc5 ("i40e: Fix VF hang when reset is triggered on another VF")
> Signed-off-by: Robert Malz <robert.malz@...onical.com>
> ---
>   drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> index abd72ab36af7..6b13ac85016f 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> @@ -1546,8 +1546,8 @@ static void i40e_cleanup_reset_vf(struct i40e_vf *vf)
>    * @vf: pointer to the VF structure
>    * @flr: VFLR was issued or not
>    *
> - * Returns true if resets are disabled or was performed successfully,
> - * false if reset is already in progress.
> + * Returns true if reset was performed successfully or if resets are
> + * disabled. False if reset is already in progress.

You also changed this wording in patch 1/2.  Let's keep the 
i40e_reset_vf() description changes in the other patch where that 
function is changed.

sln

>    **/
>   bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
>   {
> @@ -4328,7 +4328,10 @@ int i40e_vc_process_vflr_event(struct i40e_pf *pf)
>                  reg = rd32(hw, I40E_GLGEN_VFLRSTAT(reg_idx));
>                  if (reg & BIT(bit_idx))
>                          /* i40e_reset_vf will clear the bit in GLGEN_VFLRSTAT */
> -                       i40e_reset_vf(vf, true);
> +                       if (!i40e_reset_vf(vf, true)) {
> +                               /* At least one VF did not finish resetting, retry next time */
> +                               set_bit(__I40E_VFLR_EVENT_PENDING, pf->state);
> +                       }
>          }
> 
>          return 0;
> --
> 2.34.1
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ