DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] event/dpaa2: remove check on return value from epoll wait
@ 2018-05-09  9:20 Shreyansh Jain
  2018-05-09  9:20 ` [dpdk-dev] [PATCH 2/2] event/dpaa2: Remove usage of link under evq_info_t structure Shreyansh Jain
  2018-05-09 10:02 ` [dpdk-dev] [PATCH 1/2] event/dpaa2: remove check on return value from epoll wait Hemant Agrawal
  0 siblings, 2 replies; 5+ messages in thread
From: Shreyansh Jain @ 2018-05-09  9:20 UTC (permalink / raw)
  To: jerin.jacob; +Cc: dev, hemant.agrawal, Nipun Gupta

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(-)

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,
-- 
2.17.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH 2/2] event/dpaa2: Remove usage of link under evq_info_t structure
  2018-05-09  9:20 [dpdk-dev] [PATCH 1/2] event/dpaa2: remove check on return value from epoll wait Shreyansh Jain
@ 2018-05-09  9:20 ` Shreyansh Jain
  2018-05-09 10:03   ` Hemant Agrawal
  2018-05-09 10:02 ` [dpdk-dev] [PATCH 1/2] event/dpaa2: remove check on return value from epoll wait Hemant Agrawal
  1 sibling, 1 reply; 5+ messages in thread
From: Shreyansh Jain @ 2018-05-09  9:20 UTC (permalink / raw)
  To: jerin.jacob; +Cc: dev, hemant.agrawal, Ashish Jain, nipun.gupta

From: Ashish Jain <ashish.jain@nxp.com>

Removing use of link data under evq_info_t structure which was
used to check whether the the associated evq has been linked
or not. Since, an evq can be linked to multiple event ports,
thus setting the link variable only allowed the first event
port to be associated with the evq. This led to huge performance
drop in case of multiple event ports as I/O only worked on
first event port associated with the evq.

Fixes: 0ce3ce7c275c ("event/dpaa2: add configuration functions")
Cc: nipun.gupta@nxp.com

Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
---
 drivers/event/dpaa2/dpaa2_eventdev.c | 5 -----
 drivers/event/dpaa2/dpaa2_eventdev.h | 1 -
 2 files changed, 6 deletions(-)

diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 08388c7bc..cd801bfb1 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -460,7 +460,6 @@ dpaa2_eventdev_port_unlink(struct rte_eventdev *dev, void *port,
 		dpio_remove_static_dequeue_channel(dpaa2_portal->dpio_dev->dpio,
 					0, dpaa2_portal->dpio_dev->token,
 			evq_info->dpcon->dpcon_id);
-		evq_info->link = 0;
 	}
 
 	return (int)nb_unlinks;
@@ -481,8 +480,6 @@ dpaa2_eventdev_port_link(struct rte_eventdev *dev, void *port,
 
 	for (i = 0; i < nb_links; i++) {
 		evq_info = &priv->evq_info[queues[i]];
-		if (evq_info->link)
-			continue;
 
 		ret = dpio_add_static_dequeue_channel(
 			dpaa2_portal->dpio_dev->dpio,
@@ -497,7 +494,6 @@ dpaa2_eventdev_port_link(struct rte_eventdev *dev, void *port,
 		qbman_swp_push_set(dpaa2_portal->dpio_dev->sw_portal,
 				   channel_index, 1);
 		evq_info->dpcon->channel_index = channel_index;
-		evq_info->link = 1;
 	}
 
 	RTE_SET_USED(priorities);
@@ -511,7 +507,6 @@ dpaa2_eventdev_port_link(struct rte_eventdev *dev, void *port,
 		dpio_remove_static_dequeue_channel(dpaa2_portal->dpio_dev->dpio,
 					0, dpaa2_portal->dpio_dev->token,
 			evq_info->dpcon->dpcon_id);
-		evq_info->link = 0;
 	}
 	return ret;
 }
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.h b/drivers/event/dpaa2/dpaa2_eventdev.h
index 91c8f2a35..229f66afb 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.h
+++ b/drivers/event/dpaa2/dpaa2_eventdev.h
@@ -63,7 +63,6 @@ struct evq_info_t {
 	struct dpaa2_dpci_dev *dpci;
 	/* Configuration provided by the user */
 	uint32_t event_queue_cfg;
-	uint8_t link;
 };
 
 struct dpaa2_eventdev {
-- 
2.17.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] event/dpaa2: remove check on return value from epoll wait
  2018-05-09  9:20 [dpdk-dev] [PATCH 1/2] event/dpaa2: remove check on return value from epoll wait Shreyansh Jain
  2018-05-09  9:20 ` [dpdk-dev] [PATCH 2/2] event/dpaa2: Remove usage of link under evq_info_t structure Shreyansh Jain
@ 2018-05-09 10:02 ` Hemant Agrawal
  1 sibling, 0 replies; 5+ messages in thread
From: Hemant Agrawal @ 2018-05-09 10:02 UTC (permalink / raw)
  To: Shreyansh Jain, jerin.jacob; +Cc: dev, Nipun Gupta

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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] event/dpaa2: Remove usage of link under evq_info_t structure
  2018-05-09  9:20 ` [dpdk-dev] [PATCH 2/2] event/dpaa2: Remove usage of link under evq_info_t structure Shreyansh Jain
@ 2018-05-09 10:03   ` Hemant Agrawal
  2018-05-09 10:51     ` Jerin Jacob
  0 siblings, 1 reply; 5+ messages in thread
From: Hemant Agrawal @ 2018-05-09 10:03 UTC (permalink / raw)
  To: Shreyansh Jain, jerin.jacob; +Cc: dev, Ashish Jain, Nipun Gupta


On 5/9/2018 2:50 PM, Shreyansh Jain wrote:
> From: Ashish Jain <ashish.jain@nxp.com>
>
> Removing use of link data under evq_info_t structure which was
> used to check whether the the associated evq has been linked
> or not. Since, an evq can be linked to multiple event ports,
> thus setting the link variable only allowed the first event
> port to be associated with the evq. This led to huge performance
> drop in case of multiple event ports as I/O only worked on
> first event port associated with the evq.
>
> Fixes: 0ce3ce7c275c ("event/dpaa2: add configuration functions")
> Cc: nipun.gupta@nxp.com
>
> Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
> ---
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] event/dpaa2: Remove usage of link under evq_info_t structure
  2018-05-09 10:03   ` Hemant Agrawal
@ 2018-05-09 10:51     ` Jerin Jacob
  0 siblings, 0 replies; 5+ messages in thread
From: Jerin Jacob @ 2018-05-09 10:51 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Shreyansh Jain, dev, Ashish Jain, Nipun Gupta

-----Original Message-----
> Date: Wed, 9 May 2018 10:03:33 +0000
> From: Hemant Agrawal <hemant.agrawal@nxp.com>
> To: Shreyansh Jain <shreyansh.jain@nxp.com>,
>  "jerin.jacob@caviumnetworks.com" <jerin.jacob@caviumnetworks.com>
> CC: "dev@dpdk.org" <dev@dpdk.org>, Ashish Jain <ashish.jain@nxp.com>, Nipun
>  Gupta <nipun.gupta@nxp.com>
> Subject: RE: [PATCH 2/2] event/dpaa2: Remove usage of link under evq_info_t
>  structure
> 
> 
> On 5/9/2018 2:50 PM, Shreyansh Jain wrote:
> > From: Ashish Jain <ashish.jain@nxp.com>
> >
> > Removing use of link data under evq_info_t structure which was
> > used to check whether the the associated evq has been linked
> > or not. Since, an evq can be linked to multiple event ports,
> > thus setting the link variable only allowed the first event
> > port to be associated with the evq. This led to huge performance
> > drop in case of multiple event ports as I/O only worked on
> > first event port associated with the evq.
> >
> > Fixes: 0ce3ce7c275c ("event/dpaa2: add configuration functions")
> > Cc: nipun.gupta@nxp.com
> >
> > Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
> > ---
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

CC: stable@dpdk.org

Fixed check-git-log.sh errors and Applied this series to
dpdk-next-eventdev/master. Thanks.

 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-09 10:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-09  9:20 [dpdk-dev] [PATCH 1/2] event/dpaa2: remove check on return value from epoll wait Shreyansh Jain
2018-05-09  9:20 ` [dpdk-dev] [PATCH 2/2] event/dpaa2: Remove usage of link under evq_info_t structure Shreyansh Jain
2018-05-09 10:03   ` Hemant Agrawal
2018-05-09 10:51     ` Jerin Jacob
2018-05-09 10:02 ` [dpdk-dev] [PATCH 1/2] event/dpaa2: remove check on return value from epoll wait Hemant Agrawal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).