patch 'net/ena: fix aenq timeout with low poll interval' has been queued to stable release 24.11.3

Kevin Traynor ktraynor at redhat.com
Fri Jul 18 21:31:49 CEST 2025


Hi,

FYI, your patch has been queued to stable release 24.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 07/23/25. 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/7cf4b46ba87fe83b7b66474ddcc9c36a4e020b6a

Thanks.

Kevin

---
>From 7cf4b46ba87fe83b7b66474ddcc9c36a4e020b6a Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran at amazon.com>
Date: Mon, 30 Jun 2025 14:16:00 +0300
Subject: [PATCH] net/ena: fix aenq timeout with low poll interval

[ upstream commit 7905edcda144899abebf1504036fde6b3439e398 ]

The driver can work in polling-based functionality of the admin
queue, eliminating the need for interrupts in the control-path.
This mode is mandatory when using the uio_pci_generic driver,
which lacks interrupt support.

The control_path_poll_interval devarg is being set within the range
[1..1000]. A value of 0 disables the polling mechanism.
This value defines the interval in milliseconds at which the driver
checks for asynchronous notifications from the device.

Testing revealed that setting this interval below 500 milliseconds
might lead to false detection of device unresponsiveness.
This patch clamps the user-defined value to the updated valid range
[500..1000] that ensures reliable aenq monitoring.

Fixes: ca1dfa85f0d3 ("net/ena: add control path pure polling mode")

Signed-off-by: Shai Brandes <shaibran at amazon.com>
Reviewed-by: Amit Bernstein <amitbern at amazon.com>
Reviewed-by: Yosef Raisman <yraisman at amazon.com>
---
 doc/guides/nics/ena.rst      |  4 +++-
 drivers/net/ena/ena_ethdev.c | 24 ++++++++++--------------
 drivers/net/ena/ena_ethdev.h |  3 ++-
 3 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst
index a34575dc9b..b1b85e6ab1 100644
--- a/doc/guides/nics/ena.rst
+++ b/doc/guides/nics/ena.rst
@@ -137,5 +137,7 @@ Runtime Configuration
      0 - Disable (Admin queue will work in interrupt mode).
 
-     [1..1000] - Number of milliseconds to wait between periodic inspection of the admin queues.
+     [500..1000] - Time in milliseconds to wait between periodic checks of the admin queues.
+     If a value outside this range is specified, the driver will automatically adjust it
+     to fit within the valid range.
 
      **A non-zero value for this devarg is mandatory for control path functionality
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 93dca8f146..160aa79137 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -31,4 +31,6 @@
 	((rte_pktmbuf_mtod_offset(mbuf,	struct rte_tcp_hdr *,	\
 		mbuf->l3_len + mbuf->l2_len)->data_off) >> 4)
+#define CLAMP_VAL(val, min, max)					\
+	(RTE_MIN(RTE_MAX((val), (typeof(val))(min)), (typeof(val))(max)))
 
 #define ETH_GSTRING_LEN	32
@@ -3746,23 +3748,17 @@ static int ena_process_uint_devarg(const char *key,
 		}
 	} else if (strcmp(key, ENA_DEVARG_CONTROL_PATH_POLL_INTERVAL) == 0) {
-		if (uint64_value > ENA_MAX_CONTROL_PATH_POLL_INTERVAL_MSEC) {
-			PMD_INIT_LOG_LINE(ERR,
-				"Control path polling interval is too long: %" PRIu64 " msecs. "
-				"Maximum allowed: %d msecs.",
-				uint64_value, ENA_MAX_CONTROL_PATH_POLL_INTERVAL_MSEC);
-			return -EINVAL;
-		} else if (uint64_value == 0) {
+		if (uint64_value == 0) {
 			PMD_INIT_LOG_LINE(INFO,
-				"Control path polling interval is set to zero. Operating in "
-				"interrupt mode.");
-				adapter->control_path_poll_interval = 0;
+				"Control path polling is disabled - Operating in interrupt mode");
 		} else {
+			uint64_value = CLAMP_VAL(uint64_value,
+				ENA_MIN_CONTROL_PATH_POLL_INTERVAL_MSEC,
+				ENA_MAX_CONTROL_PATH_POLL_INTERVAL_MSEC);
 			PMD_INIT_LOG_LINE(INFO,
-				"Control path polling interval is set to %" PRIu64 " msecs.",
+				"Control path polling interval is %" PRIu64 " msec",
 				uint64_value);
-				adapter->control_path_poll_interval = uint64_value * USEC_PER_MSEC;
 		}
+		adapter->control_path_poll_interval = uint64_value * (USEC_PER_MSEC);
 	}
-
 	return 0;
 }
@@ -4041,5 +4037,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_ena,
 	ENA_DEVARG_LLQ_POLICY "=<0|1|2|3> "
 	ENA_DEVARG_MISS_TXC_TO "=<uint>"
-	ENA_DEVARG_CONTROL_PATH_POLL_INTERVAL "=<0-1000>");
+	ENA_DEVARG_CONTROL_PATH_POLL_INTERVAL "= 0|<500-1000> ");
 RTE_LOG_REGISTER_SUFFIX(ena_logtype_init, init, NOTICE);
 RTE_LOG_REGISTER_SUFFIX(ena_logtype_driver, driver, NOTICE);
diff --git a/drivers/net/ena/ena_ethdev.h b/drivers/net/ena/ena_ethdev.h
index b8aead8f46..d3ec19957c 100644
--- a/drivers/net/ena/ena_ethdev.h
+++ b/drivers/net/ena/ena_ethdev.h
@@ -45,5 +45,6 @@
 #define ENA_DEFAULT_MISSING_COMP	256U
 
-#define ENA_MAX_CONTROL_PATH_POLL_INTERVAL_MSEC 1000
+#define ENA_MAX_CONTROL_PATH_POLL_INTERVAL_MSEC 1000U
+#define ENA_MIN_CONTROL_PATH_POLL_INTERVAL_MSEC 500U
 
 /* While processing submitted and completed descriptors (rx and tx path
-- 
2.50.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-07-18 20:29:17.111156786 +0100
+++ 0175-net-ena-fix-aenq-timeout-with-low-poll-interval.patch	2025-07-18 20:29:11.196908146 +0100
@@ -1 +1 @@
-From 7905edcda144899abebf1504036fde6b3439e398 Mon Sep 17 00:00:00 2001
+From 7cf4b46ba87fe83b7b66474ddcc9c36a4e020b6a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7905edcda144899abebf1504036fde6b3439e398 ]
+
@@ -22 +23,0 @@
-Cc: stable at dpdk.org
@@ -28,5 +29,4 @@
- doc/guides/nics/ena.rst                |  4 +++-
- doc/guides/rel_notes/release_25_07.rst |  2 ++
- drivers/net/ena/ena_ethdev.c           | 24 ++++++++++--------------
- drivers/net/ena/ena_ethdev.h           |  3 ++-
- 4 files changed, 17 insertions(+), 16 deletions(-)
+ doc/guides/nics/ena.rst      |  4 +++-
+ drivers/net/ena/ena_ethdev.c | 24 ++++++++++--------------
+ drivers/net/ena/ena_ethdev.h |  3 ++-
+ 3 files changed, 15 insertions(+), 16 deletions(-)
@@ -35 +35 @@
-index 41c22804e1..cfc78f1e6a 100644
+index a34575dc9b..b1b85e6ab1 100644
@@ -47,11 +46,0 @@
-diff --git a/doc/guides/rel_notes/release_25_07.rst b/doc/guides/rel_notes/release_25_07.rst
-index 017bada33e..6f49bf8f90 100644
---- a/doc/guides/rel_notes/release_25_07.rst
-+++ b/doc/guides/rel_notes/release_25_07.rst
-@@ -79,4 +79,6 @@ New Features
-   * Fixed the device initialization routine to correctly handle failure during the registration
-     or enabling of interrupts when operating in control path interrupt mode.
-+  * Fixed an issue where the device might be incorrectly reported as unresponsive when using
-+    polling-based admin queue functionality with a poll interval of less than 500 milliseconds.
- 
- * **Added Mucse rnp net driver.**
@@ -59 +48 @@
-index eb33ca2c6e..04a698b58c 100644
+index 93dca8f146..160aa79137 100644
@@ -69 +58 @@
-@@ -3757,23 +3759,17 @@ static int ena_process_uint_devarg(const char *key,
+@@ -3746,23 +3748,17 @@ static int ena_process_uint_devarg(const char *key,
@@ -100 +89 @@
-@@ -4082,5 +4078,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_ena,
+@@ -4041,5 +4037,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_ena,
@@ -103,3 +92,2 @@
--	ENA_DEVARG_CONTROL_PATH_POLL_INTERVAL "=<0-1000>")
-+	ENA_DEVARG_CONTROL_PATH_POLL_INTERVAL "= 0|<500-1000> "
- 	ENA_DEVARG_ENABLE_FRAG_BYPASS "=<0|1> ");
+-	ENA_DEVARG_CONTROL_PATH_POLL_INTERVAL "=<0-1000>");
++	ENA_DEVARG_CONTROL_PATH_POLL_INTERVAL "= 0|<500-1000> ");
@@ -106,0 +95 @@
+ RTE_LOG_REGISTER_SUFFIX(ena_logtype_driver, driver, NOTICE);
@@ -108 +97 @@
-index e3cb4919c5..830135bcfd 100644
+index b8aead8f46..d3ec19957c 100644
@@ -111 +100 @@
-@@ -43,5 +43,6 @@
+@@ -45,5 +45,6 @@



More information about the stable mailing list