eal: fix epoll fd list rebuild
diff mbox series

Message ID 1589204585-13328-1-git-send-email-hkalra@marvell.com
State Deferred
Delegated to: David Marchand
Headers show
Series
  • eal: fix epoll fd list rebuild
Related show

Checks

Context Check Description
ci/iol-testing fail Testing issues
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot warning Travis build: failed
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Harman Kalra May 11, 2020, 1:43 p.m. UTC
An issue has been observed where epoll file descriptor
list rebuilds every time an interrupt/alarm event is
received.

eal_intr_process_interrupts() should notify pipe fd only
if any source is removed from the source list i.e (rv > 0)

Fixes: 0c7ce182a760 ("eal: add pending interrupt callback unregister"
Cc: stable@dpdk.org

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 lib/librte_eal/linux/eal_interrupts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Monjalon May 24, 2020, 3:30 p.m. UTC | #1
11/05/2020 15:43, Harman Kalra:
> An issue has been observed where epoll file descriptor
> list rebuilds every time an interrupt/alarm event is
> received.
> 
> eal_intr_process_interrupts() should notify pipe fd only
> if any source is removed from the source list i.e (rv > 0)
> 
> Fixes: 0c7ce182a760 ("eal: add pending interrupt callback unregister"
> Cc: stable@dpdk.org
> 
> Signed-off-by: Harman Kalra <hkalra@marvell.com>

This patch is missing 20.05 because no review was done.
In general, we are missing a maintainer on "interrupts" area.
Harman Kalra May 25, 2020, 9:49 a.m. UTC | #2
On Sun, May 24, 2020 at 05:30:26PM +0200, Thomas Monjalon wrote:
> External Email
> 
> ----------------------------------------------------------------------
> 11/05/2020 15:43, Harman Kalra:
> > An issue has been observed where epoll file descriptor
> > list rebuilds every time an interrupt/alarm event is
> > received.
> > 
> > eal_intr_process_interrupts() should notify pipe fd only
> > if any source is removed from the source list i.e (rv > 0)
> > 
> > Fixes: 0c7ce182a760 ("eal: add pending interrupt callback unregister"
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Harman Kalra <hkalra@marvell.com>
> 
> This patch is missing 20.05 because no review was done.
> In general, we are missing a maintainer on "interrupts" area.

Hi Thomas,

If everybody is fine we can take up the responsibility of maintaining
interrupt subsystem. I can send a patch to update maintainer list for
the same.

Thanks
Harman

> 
>

Patch
diff mbox series

diff --git a/lib/librte_eal/linux/eal_interrupts.c b/lib/librte_eal/linux/eal_interrupts.c
index 16e7a7d51..84eeaa1bc 100644
--- a/lib/librte_eal/linux/eal_interrupts.c
+++ b/lib/librte_eal/linux/eal_interrupts.c
@@ -1010,7 +1010,7 @@  eal_intr_process_interrupts(struct epoll_event *events, int nfds)
 		}
 
 		/* notify the pipe fd waited by epoll_wait to rebuild the wait list */
-		if (rv >= 0 && write(intr_pipe.writefd, "1", 1) < 0) {
+		if (rv > 0 && write(intr_pipe.writefd, "1", 1) < 0) {
 			rte_spinlock_unlock(&intr_lock);
 			return -EPIPE;
 		}