From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Robert Malz <robert.malz@canonical.com>, <netdev@vger.kernel.org>,
<intel-wired-lan@lists.osuosl.org>,
<przemyslaw.kitszel@intel.com>, <andrew+netdev@lunn.ch>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <sylwesterx.dziedziuch@intel.com>,
<mateusz.palczewski@intel.com>, <jacob.e.keller@intel.com>
Subject: Re: [PATCH v2 1/2] i40e: return false from i40e_reset_vf if reset is in progress
Date: Mon, 19 May 2025 14:22:21 -0700 [thread overview]
Message-ID: <72004e1c-d327-4a69-98fe-24336aa66e8b@intel.com> (raw)
In-Reply-To: <20250516094726.20613-2-robert.malz@canonical.com>
On 5/16/2025 2:47 AM, Robert Malz wrote:
> The function i40e_vc_reset_vf attempts, up to 20 times, to handle a
> VF reset request, using the return value of i40e_reset_vf as an indicator
> of whether the reset was successfully triggered. Currently, i40e_reset_vf
> always returns true, which causes new reset requests to be ignored if a
> different VF reset is already in progress.
>
> This patch updates the return value of i40e_reset_vf to reflect when
> another VF reset is in progress, allowing the caller to properly use
> the retry mechanism.
>
> Fixes: 52424f974bc5 ("i40e: Fix VF hang when reset is triggered on another VF")
> Signed-off-by: Robert Malz <robert.malz@canonical.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 6 +++---
> 1 file changed, 3 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 1120f8e4bb67..2f1aa18bcfb8 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 the VF is in reset, resets successfully, or resets
> - * are disabled and false otherwise.
> + * Returns true if reset was performed successfully or if resets are
> + * disabled. False if reset is already in progress.
nit but if we are editing this, let's make kdoc happy. Please start with
Return: or Returns:
Thanks,
Tony
> **/
> bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
> {
> @@ -1566,7 +1566,7 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
>
> /* If VF is being reset already we don't need to continue. */
> if (test_and_set_bit(I40E_VF_STATE_RESETTING, &vf->vf_states))
> - return true;
> + return false;
>
> i40e_trigger_vf_reset(vf, flr);
>
next prev parent reply other threads:[~2025-05-19 21:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-16 9:47 [PATCH v2 0/2] improve i40e parallel VF reset handling Robert Malz
2025-05-16 9:47 ` [PATCH v2 1/2] i40e: return false from i40e_reset_vf if reset is in progress Robert Malz
2025-05-16 21:06 ` Nelson, Shannon
2025-05-19 21:22 ` Tony Nguyen [this message]
2025-05-20 8:33 ` Robert Malz
2025-05-16 9:47 ` [PATCH v2 2/2] i40e: retry VFLR handling if there is ongoing VF reset Robert Malz
2025-05-16 21:06 ` Nelson, Shannon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=72004e1c-d327-4a69-98fe-24336aa66e8b@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=mateusz.palczewski@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=robert.malz@canonical.com \
--cc=sylwesterx.dziedziuch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).