* [PATCH] eal/linux: revert eventfd leak fix for MSI-X
@ 2026-11-18 15:29 David Marchand
2026-11-19 10:55 ` David Marchand
2026-11-19 13:11 ` Maxime Coquelin
0 siblings, 2 replies; 5+ messages in thread
From: David Marchand @ 2026-11-18 15:29 UTC (permalink / raw)
To: dev; +Cc: iboukris, maxime.coquelin, thomas, Harman Kalra, Anatoly Burakov
The event FDs leak fix looks correct on the principle but it seems it
was too soon to take it, as it broke net/virtio and may have broken
other drivers.
Revert this fix until we get a proper fix and acknowledgement that
other drivers are fine with the change.
Fixes: 3ba6b689893f ("eal/linux: fix eventfd leaks when enabling interrupts")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
lib/eal/linux/eal_interrupts.c | 46 +++++++++-------------------------
1 file changed, 12 insertions(+), 34 deletions(-)
diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index dfe1660dd0..c63956cde5 100644
--- a/lib/eal/linux/eal_interrupts.c
+++ b/lib/eal/linux/eal_interrupts.c
@@ -1556,44 +1556,31 @@ RTE_EXPORT_INTERNAL_SYMBOL(rte_intr_efd_enable)
int
rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd)
{
+ uint32_t i;
+ int fd;
uint32_t n = RTE_MIN(nb_efd, (uint32_t)RTE_MAX_RXTX_INTR_VEC_ID);
- int ret;
assert(nb_efd != 0);
if (rte_intr_type_get(intr_handle) == RTE_INTR_HANDLE_VFIO_MSIX) {
- if (rte_intr_nb_efd_get(intr_handle) != 0) {
- EAL_LOG(ERR, "Interrupt eventfds are already enabled");
- return -EBUSY;
- }
-
- for (uint32_t i = 0; i < n; i++) {
- int fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
-
+ for (i = 0; i < n; i++) {
+ fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
if (fd < 0) {
- ret = -errno;
EAL_LOG(ERR,
"can't setup eventfd, error %i (%s)",
errno, strerror(errno));
- goto error;
+ return -errno;
}
- /* Record each eventfd as it is created so that the
- * error path can close exactly those that exist.
- */
- if (rte_intr_efds_index_set(intr_handle, i, fd) ||
- rte_intr_nb_efd_set(intr_handle, i + 1)) {
- ret = -rte_errno;
- close(fd);
- rte_intr_efds_index_set(intr_handle, i, -1);
- goto error;
- }
+ if (rte_intr_efds_index_set(intr_handle, i, fd))
+ return -rte_errno;
}
- if (rte_intr_max_intr_set(intr_handle, NB_OTHER_INTR + n)) {
- ret = -rte_errno;
- goto error;
- }
+ if (rte_intr_nb_efd_set(intr_handle, n))
+ return -rte_errno;
+
+ if (rte_intr_max_intr_set(intr_handle, NB_OTHER_INTR + n))
+ return -rte_errno;
} else if (rte_intr_type_get(intr_handle) == RTE_INTR_HANDLE_VDEV) {
/* only check, initialization would be done in vdev driver.*/
if ((uint64_t)rte_intr_efd_counter_size_get(intr_handle) >
@@ -1611,15 +1598,6 @@ rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd)
}
return 0;
-
-error:
- for (int i = 0; i < rte_intr_nb_efd_get(intr_handle); i++) {
- close(rte_intr_efds_index_get(intr_handle, i));
- rte_intr_efds_index_set(intr_handle, i, -1);
- }
- rte_intr_nb_efd_set(intr_handle, 0);
-
- return ret;
}
RTE_EXPORT_INTERNAL_SYMBOL(rte_intr_efd_disable)
--
2.56.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] eal/linux: revert eventfd leak fix for MSI-X
2026-11-18 15:29 [PATCH] eal/linux: revert eventfd leak fix for MSI-X David Marchand
@ 2026-11-19 10:55 ` David Marchand
2026-11-19 13:34 ` David Marchand
2026-11-19 13:11 ` Maxime Coquelin
1 sibling, 1 reply; 5+ messages in thread
From: David Marchand @ 2026-11-19 10:55 UTC (permalink / raw)
To: dev; +Cc: iboukris, maxime.coquelin, thomas, Harman Kalra, Anatoly Burakov
On Wed, 18 Nov 2026 at 16:30, David Marchand <david.marchand@redhat.com> wrote:
>
> The event FDs leak fix looks correct on the principle but it seems it
> was too soon to take it, as it broke net/virtio and may have broken
> other drivers.
>
> Revert this fix until we get a proper fix and acknowledgement that
> other drivers are fine with the change.
>
> Fixes: 3ba6b689893f ("eal/linux: fix eventfd leaks when enabling interrupts")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Recheck-request: github-robot: build
--
David Marchand
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] eal/linux: revert eventfd leak fix for MSI-X
2026-11-18 15:29 [PATCH] eal/linux: revert eventfd leak fix for MSI-X David Marchand
2026-11-19 10:55 ` David Marchand
@ 2026-11-19 13:11 ` Maxime Coquelin
2026-11-19 15:01 ` Thomas Monjalon
1 sibling, 1 reply; 5+ messages in thread
From: Maxime Coquelin @ 2026-11-19 13:11 UTC (permalink / raw)
To: David Marchand; +Cc: dev, iboukris, thomas, Harman Kalra, Anatoly Burakov
On Wed, Nov 18, 2026 at 4:30 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> The event FDs leak fix looks correct on the principle but it seems it
> was too soon to take it, as it broke net/virtio and may have broken
> other drivers.
>
> Revert this fix until we get a proper fix and acknowledgement that
> other drivers are fine with the change.
>
> Fixes: 3ba6b689893f ("eal/linux: fix eventfd leaks when enabling interrupts")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> lib/eal/linux/eal_interrupts.c | 46 +++++++++-------------------------
> 1 file changed, 12 insertions(+), 34 deletions(-)
>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] eal/linux: revert eventfd leak fix for MSI-X
2026-11-19 10:55 ` David Marchand
@ 2026-11-19 13:34 ` David Marchand
0 siblings, 0 replies; 5+ messages in thread
From: David Marchand @ 2026-11-19 13:34 UTC (permalink / raw)
To: dev; +Cc: iboukris, maxime.coquelin, thomas, Harman Kalra, Anatoly Burakov
On Thu, 19 Nov 2026 at 11:55, David Marchand <david.marchand@redhat.com> wrote:
>
> On Wed, 18 Nov 2026 at 16:30, David Marchand <david.marchand@redhat.com> wrote:
> >
> > The event FDs leak fix looks correct on the principle but it seems it
> > was too soon to take it, as it broke net/virtio and may have broken
> > other drivers.
> >
> > Revert this fix until we get a proper fix and acknowledgement that
> > other drivers are fine with the change.
> >
> > Fixes: 3ba6b689893f ("eal/linux: fix eventfd leaks when enabling interrupts")
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> Recheck-request: github-robot: build
Looks like I did not use the right label.
The error on MSVC build does not make sense wrt to this patch, but trying again:
Recheck-request: github-robot
--
David Marchand
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] eal/linux: revert eventfd leak fix for MSI-X
2026-11-19 13:11 ` Maxime Coquelin
@ 2026-11-19 15:01 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2026-11-19 15:01 UTC (permalink / raw)
To: David Marchand
Cc: dev, iboukris, Harman Kalra, Anatoly Burakov, Maxime Coquelin
19/11/2026 14:11, Maxime Coquelin:
> On Wed, Nov 18, 2026 at 4:30 PM David Marchand
> <david.marchand@redhat.com> wrote:
> >
> > The event FDs leak fix looks correct on the principle but it seems it
> > was too soon to take it, as it broke net/virtio and may have broken
> > other drivers.
> >
> > Revert this fix until we get a proper fix and acknowledgement that
> > other drivers are fine with the change.
> >
> > Fixes: 3ba6b689893f ("eal/linux: fix eventfd leaks when enabling interrupts")
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-19 15:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 15:29 [PATCH] eal/linux: revert eventfd leak fix for MSI-X David Marchand
2026-11-19 10:55 ` David Marchand
2026-11-19 13:34 ` David Marchand
2026-11-19 13:11 ` Maxime Coquelin
2026-11-19 15:01 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox