summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Kumar Kori <sunil.kori@nxp.com>2018-01-17 02:13:59 +0530
committerJerin Jacob <jerin.jacob@caviumnetworks.com>2018-01-19 16:09:56 +0100
commitb08dc6430abd5e344078a39ac968ebefe10e230d (patch)
tree053b8089734b2b02f89ecafc0a3f83f1ff87a46f
parent9caac5dd1e7f25956948273d82d4f88c4385bee5 (diff)
downloaddpdk-next-eventdev-b08dc6430abd.zip
dpdk-next-eventdev-b08dc6430abd.tar.gz
dpdk-next-eventdev-b08dc6430abd.tar.xz
event/dpaa: add queue config get/set
Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
-rw-r--r--drivers/event/dpaa/dpaa_eventdev.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index ba9b814..e7548e5 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -201,7 +201,51 @@ dpaa_event_dev_close(struct rte_eventdev *dev)
return 0;
}
+static void
+dpaa_event_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id,
+ struct rte_event_queue_conf *queue_conf)
+{
+ EVENTDEV_DRV_FUNC_TRACE();
+
+ RTE_SET_USED(dev);
+ RTE_SET_USED(queue_id);
+
+ memset(queue_conf, 0, sizeof(struct rte_event_queue_conf));
+ queue_conf->schedule_type = RTE_SCHED_TYPE_PARALLEL;
+ queue_conf->priority = RTE_EVENT_DEV_PRIORITY_HIGHEST;
+}
+
+static int
+dpaa_event_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
+ const struct rte_event_queue_conf *queue_conf)
+{
+ struct dpaa_eventdev *priv = dev->data->dev_private;
+ struct dpaa_eventq *evq_info = &priv->evq_info[queue_id];
+
+ EVENTDEV_DRV_FUNC_TRACE();
+
+ switch (queue_conf->schedule_type) {
+ case RTE_SCHED_TYPE_PARALLEL:
+ case RTE_SCHED_TYPE_ATOMIC:
+ break;
+ case RTE_SCHED_TYPE_ORDERED:
+ EVENTDEV_DRV_ERR("Schedule type is not supported.");
+ return -1;
+ }
+ evq_info->event_queue_cfg = queue_conf->event_queue_cfg;
+ evq_info->event_queue_id = queue_id;
+
+ return 0;
+}
+static void
+dpaa_event_queue_release(struct rte_eventdev *dev, uint8_t queue_id)
+{
+ EVENTDEV_DRV_FUNC_TRACE();
+
+ RTE_SET_USED(dev);
+ RTE_SET_USED(queue_id);
+}
static const struct rte_eventdev_ops dpaa_eventdev_ops = {
.dev_infos_get = dpaa_event_dev_info_get,
@@ -209,6 +253,9 @@ static const struct rte_eventdev_ops dpaa_eventdev_ops = {
.dev_start = dpaa_event_dev_start,
.dev_stop = dpaa_event_dev_stop,
.dev_close = dpaa_event_dev_close,
+ .queue_def_conf = dpaa_event_queue_def_conf,
+ .queue_setup = dpaa_event_queue_setup,
+ .queue_release = dpaa_event_queue_release,
.timeout_ticks = dpaa_event_dequeue_timeout_ticks,
};