patch 'net/iavf: defer device start when PF VSI not ready' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:00:23 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/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/e9fd565fe9b8c7da614c42ef4cae062af336c435

Thanks.

Kevin

---
>From e9fd565fe9b8c7da614c42ef4cae062af336c435 Mon Sep 17 00:00:00 2001
From: Anurag Mandal <anurag.mandal at intel.com>
Date: Tue, 18 Aug 2026 04:57:27 +0000
Subject: [PATCH] net/iavf: defer device start when PF VSI not ready

[ upstream commit 9aac2219dc2afd9dd740918944615b5880b0da6e ]

During reset recovery iavf_dev_start() might fail (typically -EIO from
VIRTCHNL_OP_CONFIG_VSI_QUEUES) because the PF VSI is not yet active,
leaving the VF down and requiring manual intervention to recover.

Added a start_pending flag: when device start fails during recovery,
defer it instead of erroring out and resume it from newly added
iavf_resume_pending_start() on the next link-up event, so the VF comes
back automatically.

Fixes: 3e6a5d2d310a ("net/iavf: add devargs to enable VF auto-reset")

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        |  2 +
 drivers/net/intel/iavf/iavf_ethdev.c | 61 ++++++++++++++++++++++++++--
 drivers/net/intel/iavf/iavf_vchnl.c  |  3 ++
 3 files changed, 62 insertions(+), 4 deletions(-)

diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
index 845aa97787..d2d6b8cc39 100644
--- a/drivers/net/intel/iavf/iavf.h
+++ b/drivers/net/intel/iavf/iavf.h
@@ -288,4 +288,5 @@ struct iavf_info {
 	bool reset_pending;
 	bool pf_reset_in_progress;
+	bool start_pending;
 
 	uint32_t ptp_caps;
@@ -577,3 +578,4 @@ void iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset);
 void iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change);
 bool is_iavf_supported(struct rte_eth_dev *dev);
+void iavf_resume_pending_start(struct rte_eth_dev *dev);
 #endif /* _IAVF_ETHDEV_H_ */
diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
index 125ca7a766..f96c2bf9d0 100644
--- a/drivers/net/intel/iavf/iavf_ethdev.c
+++ b/drivers/net/intel/iavf/iavf_ethdev.c
@@ -1095,4 +1095,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
 	iavf_phc_sync_alarm_start(dev);
 
+	/* An explicit start supersedes any pending deferred start */
+	vf->start_pending = false;
+
 	return 0;
 
@@ -1133,4 +1136,7 @@ iavf_dev_stop(struct rte_eth_dev *dev)
 	dev->data->dev_started = 0;
 
+	/* An explicit stop cancels any pending deferred start */
+	vf->start_pending = false;
+
 	return 0;
 }
@@ -3321,4 +3327,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;
+	vf->start_pending = false;
 	iavf_set_no_poll(adapter, false);
 
@@ -3337,8 +3344,15 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
 		/* start the device */
 		ret = iavf_dev_start(dev);
-		if (ret)
-			goto error;
-
-		dev->data->dev_started = 1;
+		if (ret == 0) {
+			dev->data->dev_started = 1;
+		} else {
+			PMD_DRV_LOG(WARNING,
+				    "dev_start failed during reset recovery (rc=%d);"
+				    "deferring to next link-up event",
+				    ret);
+			vf->start_pending = true;
+			dev->data->dev_started = 0;
+			ret = 0;
+		}
 	}
 	goto exit;
@@ -3463,4 +3477,43 @@ bool is_iavf_supported(struct rte_eth_dev *dev)
 }
 
+void
+iavf_resume_pending_start(struct rte_eth_dev *dev)
+{
+	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+	int ret;
+
+	if (!vf->start_pending)
+		return;
+
+	if (vf->vf_reset || vf->in_reset_recovery)
+		return;
+
+	/*
+	 * If the application has already (re)started the port itself, the
+	 * deferred start is stale, the application's action is honoured
+	 * and resume pending is dropped to avoid starting an
+	 * already-running port a second time.
+	 */
+	if (dev->data->dev_started) {
+		vf->start_pending = false;
+		return;
+	}
+
+	if (!vf->link_up)
+		return;
+
+	vf->start_pending = false;
+	PMD_DRV_LOG(DEBUG, "PF link back up; resuming deferred dev_start");
+	ret = iavf_dev_start(dev);
+	if (ret == 0) {
+		dev->data->dev_started = 1;
+	} else {
+		PMD_DRV_LOG(ERR,
+			    "deferred dev_start failed (ret=%d); will retry on next link-up",
+			    ret);
+		vf->start_pending = true;
+	}
+}
+
 RTE_PMD_REGISTER_PCI(net_iavf, rte_iavf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_iavf, pci_id_iavf_map);
diff --git a/drivers/net/intel/iavf/iavf_vchnl.c b/drivers/net/intel/iavf/iavf_vchnl.c
index b497363d81..9c1c17b63b 100644
--- a/drivers/net/intel/iavf/iavf_vchnl.c
+++ b/drivers/net/intel/iavf/iavf_vchnl.c
@@ -272,4 +272,7 @@ iavf_handle_link_change_event(struct rte_eth_dev *dev,
 	}
 
+	/* Retry a dev_start deferred by reset recovery, before the LSC post. */
+	iavf_resume_pending_start(dev);
+
 	iavf_dev_event_post(dev, RTE_ETH_EVENT_INTR_LSC, NULL, 0);
 
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:42.043673921 +0000
+++ 0097-net-iavf-defer-device-start-when-PF-VSI-not-ready.patch	2026-12-03 12:52:39.091938623 +0000
@@ -1 +1 @@
-From 9aac2219dc2afd9dd740918944615b5880b0da6e Mon Sep 17 00:00:00 2001
+From e9fd565fe9b8c7da614c42ef4cae062af336c435 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9aac2219dc2afd9dd740918944615b5880b0da6e ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index 6bf7121052..a811a8d2d4 100644
+index 845aa97787..d2d6b8cc39 100644
@@ -30 +31 @@
-@@ -294,4 +294,5 @@ struct iavf_info {
+@@ -288,4 +288,5 @@ struct iavf_info {
@@ -36 +37,2 @@
-@@ -533,3 +534,4 @@ void iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change);
+@@ -577,3 +578,4 @@ void iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset);
+ void iavf_set_no_poll(struct iavf_adapter *adapter, bool link_change);
@@ -38 +39,0 @@
- void iavf_hash_uninit(struct iavf_adapter *ad);
@@ -42 +43 @@
-index 2c686d8802..742fd22551 100644
+index 125ca7a766..f96c2bf9d0 100644
@@ -45 +46 @@
-@@ -1115,4 +1115,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
+@@ -1095,4 +1095,7 @@ iavf_dev_start(struct rte_eth_dev *dev)
@@ -53 +54 @@
-@@ -1153,4 +1156,7 @@ iavf_dev_stop(struct rte_eth_dev *dev)
+@@ -1133,4 +1136,7 @@ iavf_dev_stop(struct rte_eth_dev *dev)
@@ -61 +62 @@
-@@ -3445,4 +3451,5 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
+@@ -3321,4 +3327,5 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
@@ -67 +68 @@
-@@ -3465,8 +3472,15 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
+@@ -3337,8 +3344,15 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
@@ -86,2 +87,2 @@
- 
-@@ -3675,4 +3689,43 @@ bool is_iavf_supported(struct rte_eth_dev *dev)
+ 	goto exit;
+@@ -3463,4 +3477,43 @@ bool is_iavf_supported(struct rte_eth_dev *dev)
@@ -132 +133 @@
-index 23e4107743..b6864d8d69 100644
+index b497363d81..9c1c17b63b 100644



More information about the stable mailing list