[PATCH 24.11] net/iavf: fix duplicate VF reset during PF reset recovery

Luca Boccassi luca.boccassi at gmail.com
Wed Jul 8 12:40:16 CEST 2026


On Wed, 8 Jul 2026 at 11:14, Anurag Mandal <anurag.mandal at intel.com> wrote:
>
> [ upstream commit ece7d7eef04f82503faa148f46ad296d30b5880f]
>
> During PF initiated reset recovery, iavf_dev_close() sends an
> extra 'VIRTCHNL_OP_RESET_VF' while recovery is already in progress.
> That second reset can leave PF/VF virtchnl state inconsistent and
> cause 'VIRTCHNL_OP_CONFIG_VSI_QUEUES' to fail with 'ERR_PARAM' after
> ToR link flap/power-cycle, leaving the VF unable to recover.
> This results in connection loss.
>
> This patch introduces a new flag 'pf_reset_in_progress', which
> is set only when iavf_handle_hw_reset() is entered for a
> PF-initiated reset (vf_initiated_reset is false), and
> it is cleared on exit.
> The aforesaid flag is used to prevent sending close-time VF
> reset and related close-time virtchnl operation messages to the
> AdminQ when PF triggered reset recovery is set.
> This is done to avoid duplicate VF reset requests while preserving
> normal behavior for application-driven close or VF-initiated reinit.
>
> Fixes: 675a104 ("net/iavf: fix abnormal disable HW interrupt")
> Fixes: b34fe66 ("net/iavf: delay VF reset command")
> Fixes: 5e03e31 ("net/iavf: handle virtchnl event message without interrupt")
> Cc: stable at dpdk.org
>
> Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
> Acked-by: Ciara Loftus <ciara.loftus at intel.com>
> ---
>  drivers/net/iavf/iavf.h        |  1 +
>  drivers/net/iavf/iavf_ethdev.c | 42 ++++++++++++++++++++++------------
>  drivers/net/iavf/iavf_vchnl.c  | 18 ++++++++++++---
>  3 files changed, 44 insertions(+), 17 deletions(-)

Thanks for the backport, but this fails to build:

../drivers/net/iavf/iavf_ethdev.c: In function ‘iavf_handle_hw_reset’:
../drivers/net/iavf/iavf_ethdev.c:3164:37: error: ‘vf_initiated_reset’
undeclared (first use in this function)
 3164 |         vf->pf_reset_in_progress = !vf_initiated_reset;

Please test the patches before sending them. Thanks


More information about the stable mailing list