patch 'interrupts: propagate epoll error' has been queued to stable release 25.11.3
Kevin Traynor
ktraynor at redhat.com
Tue Jul 28 17:56:02 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/3cde8e907b8cd614a9c4d153855f0b9476845d09
Thanks.
Kevin
---
>From 3cde8e907b8cd614a9c4d153855f0b9476845d09 Mon Sep 17 00:00:00 2001
From: Maxime Leroy <maxime at leroys.fr>
Date: Thu, 11 Jun 2026 17:49:17 +0200
Subject: [PATCH] interrupts: propagate epoll error
[ upstream commit 25c7aba07e929da56c105eebb7ec3efaddac4828 ]
Some interrupt users have several vectors backed by the same eventfd
(e.g. several Rx queues behind one DPAA2 portal eventfd). Adding the
second vector to the same epoll instance then fails with EEXIST.
Upper layers such as ethdev and bbdev already treat -EEXIST as a
non-fatal duplicate registration (if (ret && ret != -EEXIST)), but
rte_intr_rx_ctl() lost that information: rte_epoll_ctl() returned -1 and
rte_intr_rx_ctl() flattened every failure to -EPERM.
Return the negative errno from rte_epoll_ctl() (its documented contract
is already "a negative value") and stop rte_intr_rx_ctl() from
flattening errors to -EPERM, so EEXIST reaches the upper layers that
already handle it; other failures carry their real errno.
Fixes: 9efe9c6cdcac ("eal/linux: add epoll wrappers")
Fixes: c9f3ec1a0f3f ("eal/linux: add Rx interrupt control function")
Signed-off-by: Maxime Leroy <maxime at leroys.fr>
Reviewed-by: David Marchand <david.marchand at redhat.com>
---
lib/eal/include/rte_epoll.h | 3 ++-
lib/eal/linux/eal_interrupts.c | 18 +++++++++++-------
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/lib/eal/include/rte_epoll.h b/lib/eal/include/rte_epoll.h
index ae0cf20853..0c7b510563 100644
--- a/lib/eal/include/rte_epoll.h
+++ b/lib/eal/include/rte_epoll.h
@@ -105,5 +105,6 @@ rte_epoll_wait_interruptible(int epfd, struct rte_epoll_event *events,
* @return
* - On success, zero.
- * - On failure, a negative value.
+ * - On failure, a negative errno value, e.g. -EEXIST if the fd is already
+ * registered on the epoll instance (a fd shared between vectors).
*/
int
diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index 5d0607effe..4cfaeba7fe 100644
--- a/lib/eal/linux/eal_interrupts.c
+++ b/lib/eal/linux/eal_interrupts.c
@@ -1444,5 +1444,5 @@ rte_epoll_ctl(int epfd, int op, int fd,
if (!event) {
EAL_LOG(ERR, "rte_epoll_event can't be NULL");
- return -1;
+ return -EINVAL;
}
@@ -1461,11 +1461,19 @@ rte_epoll_ctl(int epfd, int op, int fd,
ev.events = event->epdata.event;
if (epoll_ctl(epfd, op, fd, &ev) < 0) {
+ int err = errno;
+
+ /* the fd is already in the set (e.g. shared across vectors):
+ * keep the event valid and report -EEXIST, not a hard error.
+ */
+ if (op == EPOLL_CTL_ADD && err == EEXIST)
+ return -EEXIST;
+
EAL_LOG(ERR, "Error op %d fd %d epoll_ctl, %s",
- op, fd, strerror(errno));
+ op, fd, strerror(err));
if (op == EPOLL_CTL_ADD)
/* rollback status when CTL_ADD fail */
rte_atomic_store_explicit(&event->status, RTE_EPOLL_INVALID,
rte_memory_order_relaxed);
- return -1;
+ return -err;
}
@@ -1519,6 +1527,4 @@ rte_intr_rx_ctl(struct rte_intr_handle *intr_handle, int epfd,
"efd %d associated with vec %d added on epfd %d",
rev->fd, vec, epfd);
- else
- rc = -EPERM;
break;
case RTE_INTR_EVENT_DEL:
@@ -1532,6 +1538,4 @@ rte_intr_rx_ctl(struct rte_intr_handle *intr_handle, int epfd,
rc = rte_epoll_ctl(rev->epfd, epfd_op, rev->fd, rev);
- if (rc)
- rc = -EPERM;
break;
default:
--
2.55.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-07-28 16:54:51.753212388 +0100
+++ 0032-interrupts-propagate-epoll-error.patch 2026-07-28 16:54:50.771728510 +0100
@@ -1 +1 @@
-From 25c7aba07e929da56c105eebb7ec3efaddac4828 Mon Sep 17 00:00:00 2001
+From 3cde8e907b8cd614a9c4d153855f0b9476845d09 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 25c7aba07e929da56c105eebb7ec3efaddac4828 ]
+
@@ -22 +23,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list