Thread (34 messages) 34 messages, 3 authors, 2017-06-01

Re: [PATCH 12/20] event/dpaa2: add configuration functions

From: Nipun Gupta <hidden>
Date: 2017-06-01 11:39:43

-----Original Message-----
From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
Sent: Wednesday, May 31, 2017 20:59
To: Nipun Gupta <redacted>
Cc: dev@dpdk.org; Hemant Agrawal <redacted>;
harry.van.haaren@intel.com; bruce.richardson@intel.com;
gage.eads@intel.com; Shreyansh Jain [off-list ref]
Subject: Re: [PATCH 12/20] event/dpaa2: add configuration functions

-----Original Message-----
quoted
Date: Thu, 25 May 2017 23:37:43 +0530
From: Nipun Gupta <redacted>
To: dev@dpdk.org
CC: hemant.agrawal@nxp.com, jerin.jacob@caviumnetworks.com,
 harry.van.haaren@intel.com, bruce.richardson@intel.com,
 gage.eads@intel.com, shreyansh.jain@nxp.com, Nipun Gupta
 [off-list ref]
Subject: [PATCH 12/20] event/dpaa2: add configuration functions
X-Mailer: git-send-email 1.9.1

This patch adds all the configuration API's for DPAA2 eventdev
including device config, start, stop & port and queue
related API's

Signed-off-by: Nipun Gupta <redacted>
---
 drivers/event/dpaa2/dpaa2_eventdev.c | 283
++++++++++++++++++++++++++++++++++-
quoted
 drivers/event/dpaa2/dpaa2_eventdev.h |  22 +++
 2 files changed, 304 insertions(+), 1 deletion(-)
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c
b/drivers/event/dpaa2/dpaa2_eventdev.c
quoted
index 7fa17f2..cfb52bb 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -106,7 +106,288 @@
 	return dpaa2_eventdev_dequeue_burst(port, ev, 1, timeout_ticks);
 }

+static int
+dpaa2_eventdev_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
+			   const struct rte_event_queue_conf *queue_conf)
+{
+	struct dpaa2_eventdev *priv = dev->data->dev_private;
+	struct evq_info_t *evq_info =
+		&priv->evq_info[queue_id];
+
+	PMD_DRV_FUNC_TRACE();
+
+	evq_info->event_queue_cfg = queue_conf->event_queue_cfg;
Based on the documentation, it looks like ORDERED sched type is not
supported. If so, return an error when queue config request is
RTE_EVENT_QUEUE_CFG_ORDERED_ONLY.

On the same lines, default_queue_setup() returns
RTE_EVENT_QUEUE_CFG_ALL_TYPES as default value. If ORDERED sched type
is not supported then I think, RTE_EVENT_QUEUE_CFG_ALL_TYPES
can not be used as default or configured.
Yes, Right now we are supporting only parallel and atomic queues and waiting
for our MC firmware to have support for ordered queues in case of enqueue
from software. I need to update my code with this. Ill update this in v2.

Thanks
quoted
+
+	return 0;
+}
+
+static void
+dpaa2_eventdev_port_release(void *port)
+{
+	PMD_DRV_FUNC_TRACE();
+
+	RTE_SET_USED(port);
+}
+
+static int
+dpaa2_eventdev_port_setup(struct rte_eventdev *dev, uint8_t port_id,
+			  const struct rte_event_port_conf *port_conf)
+{
+	PMD_DRV_FUNC_TRACE();
+
+	RTE_SET_USED(port_conf);
+
+	if (!dpaa2_io_portal[port_id].dpio_dev) {
+		dpaa2_io_portal[port_id].dpio_dev =
+				dpaa2_get_qbman_swp(port_id);
+		rte_atomic16_inc(&dpaa2_io_portal[port_id].dpio_dev-
ref_count);
+		if (!dpaa2_io_portal[port_id].dpio_dev)
+			return -1;
+	}
+
+	dpaa2_io_portal[port_id].eventdev = dev;
+	dev->data->ports[port_id] = &dpaa2_io_portal[port_id];
+	return 0;
+}
+
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help