patch 'net/iavf: fix duplicate VF reset during PF reset recovery' has been queued to stable release 25.11.3
Kevin Traynor
ktraynor at redhat.com
Tue Jul 28 17:56:35 CEST 2026
Hi,
FYI, your patch has been queued to stable release 25.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/01/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2f507b947d3ef26b900b396e8b5193a01c1ecb71
Thanks.
Kevin
---
>From 2f507b947d3ef26b900b396e8b5193a01c1ecb71 Mon Sep 17 00:00:00 2001
From: Anurag Mandal <anurag.mandal at intel.com>
Date: Wed, 10 Jun 2026 15:43:06 +0000
Subject: [PATCH] net/iavf: fix duplicate VF reset during PF reset recovery
[ 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: 675a104e2e94 ("net/iavf: fix abnormal disable HW interrupt")
Fixes: b34fe66ea893 ("net/iavf: delay VF reset command")
Fixes: 5e03e316c753 ("net/iavf: handle virtchnl event message without interrupt")
Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
Acked-by: Ciara Loftus <ciara.loftus at intel.com>
---
drivers/net/intel/iavf/iavf.h | 1 +
drivers/net/intel/iavf/iavf_ethdev.c | 42 ++++++++++++++++++----------
drivers/net/intel/iavf/iavf_vchnl.c | 18 ++++++++++--
3 files changed, 44 insertions(+), 17 deletions(-)
diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
index 211d32ef1d..845aa97787 100644
--- a/drivers/net/intel/iavf/iavf.h
+++ b/drivers/net/intel/iavf/iavf.h
@@ -287,4 +287,5 @@ struct iavf_info {
bool in_reset_recovery;
bool reset_pending;
+ bool pf_reset_in_progress;
uint32_t ptp_caps;
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index 89cb51d751..442e7959b7 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -3110,21 +3110,28 @@ iavf_dev_close(struct rte_eth_dev *dev)
/*
- * Release redundant queue resource when close the dev
- * so that other vfs can re-use the queues.
+ * Prevent sending close-time virtchnl messages to the AdminQ
+ * during PF-initiated reset recovery.
*/
- if (vf->lv_enabled) {
- ret = iavf_request_queues(dev, IAVF_MAX_NUM_QUEUES_DFLT);
- if (ret)
- PMD_DRV_LOG(ERR, "Reset the num of queues failed");
+ if (!vf->pf_reset_in_progress) {
- vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
+ /*
+ * Release redundant queue resource when close the dev
+ * so that other vfs can re-use the queues.
+ */
+ if (vf->lv_enabled) {
+ ret = iavf_request_queues(dev, IAVF_MAX_NUM_QUEUES_DFLT);
+ if (ret)
+ PMD_DRV_LOG(ERR, "Reset the num of queues failed");
+ vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT;
+ }
+
+ /*
+ * Disable promiscuous mode before resetting the VF. This is to avoid
+ * potential issues when the PF is bound to the kernel driver.
+ */
+ if (vf->promisc_unicast_enabled || vf->promisc_multicast_enabled)
+ iavf_config_promisc(adapter, false, false);
}
- /* Disable promiscuous mode before resetting the VF. This is to avoid
- * potential issues when the PF is bound to the kernel driver.
- */
- if (vf->promisc_unicast_enabled || vf->promisc_multicast_enabled)
- iavf_config_promisc(adapter, false, false);
-
adapter->closed = true;
@@ -3135,5 +3142,10 @@ iavf_dev_close(struct rte_eth_dev *dev)
iavf_flow_uninit(adapter);
- iavf_vf_reset(hw);
+ /*
+ * Prevent sending VIRTCHNL_OP_RESET_VF during PF-initiated
+ * reset recovery.
+ */
+ if (!vf->pf_reset_in_progress)
+ iavf_vf_reset(hw);
/*
* If a reset is pending, wait for the PF to disable the VF's admin
@@ -3293,4 +3305,5 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
vf->in_reset_recovery = true;
+ vf->pf_reset_in_progress = !vf_initiated_reset;
iavf_set_no_poll(adapter, false);
@@ -3320,4 +3333,5 @@ error:
exit:
vf->in_reset_recovery = false;
+ vf->pf_reset_in_progress = false;
iavf_set_no_poll(adapter, false);
diff --git a/drivers/net/intel/iavf/iavf_vchnl.c b/drivers/net/intel/iavf/iavf_vchnl.c
index 1098338749..316caa8c58 100644
--- a/drivers/net/intel/iavf/iavf_vchnl.c
+++ b/drivers/net/intel/iavf/iavf_vchnl.c
@@ -284,7 +284,19 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,
break;
case VIRTCHNL_EVENT_RESET_IMPENDING:
- vf->vf_reset = true;
- iavf_set_no_poll(adapter, false);
- PMD_DRV_LOG(INFO, "VF is resetting");
+ /*
+ * Force link down on impending reset to drop
+ * the cached link-up state; a fresh LSC up
+ * event will be re-issued by the PF once the
+ * VF is reinitialised.
+ */
+ vf->link_up = false;
+ if (!vf->vf_reset) {
+ vf->vf_reset = true;
+ iavf_set_no_poll(adapter, false);
+ iavf_dev_event_post(vf->eth_dev,
+ RTE_ETH_EVENT_INTR_RESET,
+ NULL, 0);
+ }
+ PMD_DRV_LOG(DEBUG, "VF is resetting");
break;
case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
--
2.55.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-07-28 16:54:52.690736240 +0100
+++ 0065-net-iavf-fix-duplicate-VF-reset-during-PF-reset-reco.patch 2026-07-28 16:54:50.813728854 +0100
@@ -1 +1 @@
-From ece7d7eef04f82503faa148f46ad296d30b5880f Mon Sep 17 00:00:00 2001
+From 2f507b947d3ef26b900b396e8b5193a01c1ecb71 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ece7d7eef04f82503faa148f46ad296d30b5880f ]
+
@@ -26 +27,0 @@
-Cc: stable at dpdk.org
@@ -37 +38 @@
-index 4444602a30..293adaf6c9 100644
+index 211d32ef1d..845aa97787 100644
@@ -40 +41 @@
-@@ -293,4 +293,5 @@ struct iavf_info {
+@@ -287,4 +287,5 @@ struct iavf_info {
@@ -47 +48 @@
-index ec1ad02826..4c8a1895e4 100644
+index 89cb51d751..442e7959b7 100644
@@ -50 +51 @@
-@@ -3169,21 +3169,28 @@ iavf_dev_close(struct rte_eth_dev *dev)
+@@ -3110,21 +3110,28 @@ iavf_dev_close(struct rte_eth_dev *dev)
@@ -92 +93 @@
-@@ -3197,5 +3204,10 @@ iavf_dev_close(struct rte_eth_dev *dev)
+@@ -3135,5 +3142,10 @@ iavf_dev_close(struct rte_eth_dev *dev)
@@ -104 +105 @@
-@@ -3381,4 +3393,5 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
+@@ -3293,4 +3305,5 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
@@ -110,2 +111,2 @@
-@@ -3431,4 +3444,5 @@ exit:
-
+@@ -3320,4 +3333,5 @@ error:
+ exit:
@@ -117 +118 @@
-index 0643a835d5..08ab11ccf1 100644
+index 1098338749..316caa8c58 100644
More information about the stable
mailing list