patch 'net/iavf: fix VF reset detection on fast ARQ bit flip' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Oct 27 12:49:35 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/422b55da74ab5160e943b2df2cf244c03f785fcf

Thanks.

Luca Boccassi

---
>From 422b55da74ab5160e943b2df2cf244c03f785fcf Mon Sep 17 00:00:00 2001
From: Anurag Mandal <anurag.mandal at intel.com>
Date: Tue, 18 Aug 2026 04:57:30 +0000
Subject: [PATCH] net/iavf: fix VF reset detection on fast ARQ bit flip

[ upstream commit bdad52ff01b4530f109c32ec6bda37d5c909f51e ]

During PF-initiated reset or a remote/ToR switch link-flap, the PF
toggles the admin receive queue enable bit (ARQLEN1) so quickly around a
VF reset that the VF's sampling window misses it, leaving the PF and the
VF states out of sync and the data path stalled.

Complement the ARQLEN1 check with VFGEN_RSTAT (VIRTCHNL_VFR_INPROGRESS)
and shorten the poll interval to 5 ms (with a proportionally larger
count, keeping the ~10 s budget), matching the Linux kernel iavf driver.
When the VFR is still not observed, proceed with recovery instead of
bailing out so the PF and the VF states converge.

Fixes: 80fb3c920458 ("net/iavf: fix crash on VF start")

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 | 37 +++++++++++++++++++++++++---------
 2 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index 0b9153ddecb..5ebe06be101 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -20,6 +20,7 @@
 #define IAVF_AQ_BUF_SZ            4096
 #define IAVF_RESET_WAIT_CNT       2000
 #define IAVF_RESET_DETECTED_CNT   500
+#define IAVF_RESET_POLL_SCALE     4  /* Poll-interval scale for reset detection */
 #define IAVF_BUF_SIZE_MIN         1024
 #define IAVF_FRAME_SIZE_MAX       9728
 #define IAVF_QUEUE_BASE_ADDR_UNIT 128
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 8a589fc5579..1853230229c 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -3135,8 +3135,26 @@ iavf_dev_reset(struct rte_eth_dev *dev)
 static inline bool
 iavf_is_reset(struct iavf_hw *hw)
 {
-	return !(IAVF_READ_REG(hw, IAVF_VF_ARQLEN1) &
-		IAVF_VF_ARQLEN1_ARQENABLE_MASK);
+	uint32_t rstat;
+
+	/* ARQ has been disabled by the PF as part of the VFR. */
+	if (!(IAVF_READ_REG(hw, IAVF_VF_ARQLEN1) &
+		IAVF_VF_ARQLEN1_ARQENABLE_MASK))
+		return true;
+
+	/*
+	 * VFGEN_RSTAT reports VIRTCHNL_VFR_INPROGRESS.
+	 * At times, the PF flips ARQENABLE so quickly
+	 * around a VFR that the ARQLEN1 sample window
+	 * misses it. Using VFGEN_RSTAT, as a
+	 * complementary indicator, prevents from
+	 * missing a reset that really did happen.
+	 */
+	rstat = (IAVF_READ_REG(hw, IAVF_VFGEN_RSTAT) &
+		 IAVF_VFGEN_RSTAT_VFR_STATE_MASK) >>
+		IAVF_VFGEN_RSTAT_VFR_STATE_SHIFT;
+
+	return rstat == VIRTCHNL_VFR_INPROGRESS;
 }
 
 static bool
@@ -3145,11 +3163,14 @@ iavf_is_reset_detected(struct iavf_adapter *adapter)
 	struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(adapter);
 	int i;
 
-	/* poll until we see the reset actually happen */
-	for (i = 0; i < IAVF_RESET_DETECTED_CNT; i++) {
+	/*
+	 * Poll until the reset actually happen.
+	 * Poll every 5 ms to catch the fast ARQ flips.
+	 */
+	for (i = 0; i < IAVF_RESET_DETECTED_CNT * IAVF_RESET_POLL_SCALE; i++) {
 		if (iavf_is_reset(hw))
 			return true;
-		rte_delay_ms(20);
+		rte_delay_us(5000);
 	}
 
 	return false;
@@ -3168,10 +3189,8 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev)
 	if (!dev->data->dev_started)
 		return;
 
-	if (!iavf_is_reset_detected(adapter)) {
-		PMD_DRV_LOG(DEBUG, "reset not start");
-		return;
-	}
+	if (!iavf_is_reset_detected(adapter))
+		PMD_DRV_LOG(WARNING, "VFR not observed; recovering anyway");
 
 	vf->in_reset_recovery = true;
 	vf->pf_reset_in_progress = true;
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-10-27 11:43:56.840674213 +0000
+++ 0081-net-iavf-fix-VF-reset-detection-on-fast-ARQ-bit-flip.patch	2026-10-27 11:43:53.602062172 +0000
@@ -1 +1 @@
-From bdad52ff01b4530f109c32ec6bda37d5c909f51e Mon Sep 17 00:00:00 2001
+From 422b55da74ab5160e943b2df2cf244c03f785fcf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bdad52ff01b4530f109c32ec6bda37d5c909f51e ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -23,2 +24,2 @@
- drivers/net/intel/iavf/iavf.h        |  1 +
- drivers/net/intel/iavf/iavf_ethdev.c | 37 +++++++++++++++++++++-------
+ drivers/net/iavf/iavf.h        |  1 +
+ drivers/net/iavf/iavf_ethdev.c | 37 +++++++++++++++++++++++++---------
@@ -27,5 +28,5 @@
-diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
-index 4a0ba44164..044de3cfd4 100644
---- a/drivers/net/intel/iavf/iavf.h
-+++ b/drivers/net/intel/iavf/iavf.h
-@@ -21,6 +21,7 @@
+diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
+index 0b9153ddecb..5ebe06be101 100644
+--- a/drivers/net/iavf/iavf.h
++++ b/drivers/net/iavf/iavf.h
+@@ -20,6 +20,7 @@
@@ -39,5 +40,5 @@
-diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c
-index 3a52038e09..833f13e758 100644
---- a/drivers/net/intel/iavf/iavf_ethdev.c
-+++ b/drivers/net/intel/iavf/iavf_ethdev.c
-@@ -3378,8 +3378,26 @@ iavf_dev_reset(struct rte_eth_dev *dev)
+diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
+index 8a589fc5579..1853230229c 100644
+--- a/drivers/net/iavf/iavf_ethdev.c
++++ b/drivers/net/iavf/iavf_ethdev.c
+@@ -3135,8 +3135,26 @@ iavf_dev_reset(struct rte_eth_dev *dev)
@@ -72 +73 @@
-@@ -3388,11 +3406,14 @@ iavf_is_reset_detected(struct iavf_adapter *adapter)
+@@ -3145,11 +3163,14 @@ iavf_is_reset_detected(struct iavf_adapter *adapter)
@@ -90,3 +91,3 @@
-@@ -3442,10 +3463,8 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset)
- 		if (!dev->data->dev_started)
- 			return;
+@@ -3168,10 +3189,8 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev)
+ 	if (!dev->data->dev_started)
+ 		return;
@@ -94,7 +95,6 @@
--		if (!iavf_is_reset_detected(adapter)) {
--			PMD_DRV_LOG(DEBUG, "reset not start");
--			return;
--		}
-+		if (!iavf_is_reset_detected(adapter))
-+			PMD_DRV_LOG(WARNING, "VFR not observed; recovering anyway");
- 	}
+-	if (!iavf_is_reset_detected(adapter)) {
+-		PMD_DRV_LOG(DEBUG, "reset not start");
+-		return;
+-	}
++	if (!iavf_is_reset_detected(adapter))
++		PMD_DRV_LOG(WARNING, "VFR not observed; recovering anyway");
@@ -102,0 +103 @@
+ 	vf->pf_reset_in_progress = true;


More information about the stable mailing list