[dpdk-dev,1/2] event/dpaa2: remove check on return value from epoll wait

Message ID 20180509092053.5956-1-shreyansh.jain@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Shreyansh Jain May 9, 2018, 9:20 a.m. UTC
  From: Nipun Gupta <nipun.gupta@nxp.com>

Driver shouldn't take decision on signals received. The return
from epoll was blocking on EINTR which is not the right use-case.

Fixes: 36d87bb92230 ("event/dpaa2: handle timeout using interrupts in dequeue")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/event/dpaa2/dpaa2_eventdev.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
  

Comments

Hemant Agrawal May 9, 2018, 10:02 a.m. UTC | #1
Subject: [PATCH 1/2] event/dpaa2: remove check on return value from epoll wait
Importance: High

From: Nipun Gupta <nipun.gupta@nxp.com>

Driver shouldn't take decision on signals received. The return from epoll was blocking on EINTR which is not the right use-case.

Fixes: 36d87bb92230 ("event/dpaa2: handle timeout using interrupts in dequeue")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>

Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
  

Patch

diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 0199d66cb..08388c7bc 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -154,26 +154,12 @@  dpaa2_eventdev_enqueue(void *port, const struct rte_event *ev)
 static void dpaa2_eventdev_dequeue_wait(uint64_t timeout_ticks)
 {
 	struct epoll_event epoll_ev;
-	int ret, i = 0;
 
 	qbman_swp_interrupt_clear_status(DPAA2_PER_LCORE_PORTAL,
 					 QBMAN_SWP_INTERRUPT_DQRI);
 
-RETRY:
-	ret = epoll_wait(DPAA2_PER_LCORE_DPIO->epoll_fd,
+	epoll_wait(DPAA2_PER_LCORE_DPIO->epoll_fd,
 			 &epoll_ev, 1, timeout_ticks);
-	if (ret < 1) {
-		/* sometimes due to some spurious interrupts epoll_wait fails
-		 * with errno EINTR. so here we are retrying epoll_wait in such
-		 * case to avoid the problem.
-		 */
-		if (errno == EINTR) {
-			DPAA2_EVENTDEV_DEBUG("epoll_wait fails");
-			if (i++ > 10)
-				DPAA2_EVENTDEV_DEBUG("Dequeue burst Failed");
-		goto RETRY;
-		}
-	}
 }
 
 static void dpaa2_eventdev_process_parallel(struct qbman_swp *swp,