From: Nipun Gupta <nipun.gupta@nxp.com>
To: thomas@monjalon.net, hemant.agrawal@nxp.com, shreyansh.jain@nxp.com
Cc: dev@dpdk.org, Nipun Gupta <nipun.gupta@nxp.com>
Subject: [dpdk-dev] [PATCH 5/8] raw/dpaa2_qdma: support configuration APIs
Date: Sat, 7 Apr 2018 20:47:01 +0530 [thread overview]
Message-ID: <1523114224-9852-6-git-send-email-nipun.gupta@nxp.com> (raw)
In-Reply-To: <1523114224-9852-1-git-send-email-nipun.gupta@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
doc/api/doxy-api-index.md | 1 +
doc/api/doxy-api.conf | 1 +
drivers/raw/dpaa2_qdma/Makefile | 2 +
drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 375 +++++++++++++++++++++
drivers/raw/dpaa2_qdma/dpaa2_qdma.h | 63 ++++
drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h | 216 ++++++++++++
.../raw/dpaa2_qdma/rte_pmd_dpaa2_qdma_version.map | 12 +
7 files changed, 670 insertions(+)
create mode 100644 drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h
diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index b9f28be..c0b5653 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -65,6 +65,7 @@ The public API headers are grouped by topics:
[dpaa] (@ref rte_pmd_dpaa.h),
[dpaa2] (@ref rte_dpaa2_mempool.h),
[dpaa2_cmdif] (@ref rte_pmd_dpaa2_cmdif.h),
+ [dpaa2_qdma] (@ref rte_pmd_dpaa2_qdma.h),
[crypto_scheduler] (@ref rte_cryptodev_scheduler.h)
- **memory**:
diff --git a/doc/api/doxy-api.conf b/doc/api/doxy-api.conf
index 88088d6..0840b34 100644
--- a/doc/api/doxy-api.conf
+++ b/doc/api/doxy-api.conf
@@ -39,6 +39,7 @@ INPUT = doc/api/doxy-api-index.md \
drivers/net/ixgbe \
drivers/net/softnic \
drivers/raw/dpaa2_cmdif \
+ drivers/raw/dpaa2_qdma \
lib/librte_eal/common/include \
lib/librte_eal/common/include/generic \
lib/librte_acl \
diff --git a/drivers/raw/dpaa2_qdma/Makefile b/drivers/raw/dpaa2_qdma/Makefile
index f81ee08..6711df3 100644
--- a/drivers/raw/dpaa2_qdma/Makefile
+++ b/drivers/raw/dpaa2_qdma/Makefile
@@ -31,4 +31,6 @@ LIBABIVER := 1
#
SRCS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_QDMA) += dpaa2_qdma.c
+SYMLINK-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_QDMA)-include += rte_pmd_dpaa2_qdma.h
+
include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
index 4b7fa13..b5f6bd9 100644
--- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
+++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
@@ -20,6 +20,7 @@
#include "dpaa2_qdma.h"
#include "dpaa2_qdma_logs.h"
+#include "rte_pmd_dpaa2_qdma.h"
/* Dynamic log type identifier */
int dpaa2_qdma_logtype;
@@ -32,6 +33,380 @@
static struct qdma_hw_queue_list qdma_queue_list
= TAILQ_HEAD_INITIALIZER(qdma_queue_list);
+/* QDMA Virtual Queues */
+struct qdma_virt_queue *qdma_vqs;
+
+/* QDMA per core data */
+struct qdma_per_core_info qdma_core_info[RTE_MAX_LCORE];
+
+static struct qdma_hw_queue *
+alloc_hw_queue(uint32_t lcore_id)
+{
+ struct qdma_hw_queue *queue = NULL;
+
+ DPAA2_QDMA_FUNC_TRACE();
+
+ /* Get a free queue from the list */
+ TAILQ_FOREACH(queue, &qdma_queue_list, next) {
+ if (queue->num_users == 0) {
+ queue->lcore_id = lcore_id;
+ queue->num_users++;
+ break;
+ }
+ }
+
+ return queue;
+}
+
+static void
+free_hw_queue(struct qdma_hw_queue *queue)
+{
+ DPAA2_QDMA_FUNC_TRACE();
+
+ queue->num_users--;
+}
+
+
+static struct qdma_hw_queue *
+get_hw_queue(uint32_t lcore_id)
+{
+ struct qdma_per_core_info *core_info;
+ struct qdma_hw_queue *queue, *temp;
+ uint32_t least_num_users;
+ int num_hw_queues, i;
+
+ DPAA2_QDMA_FUNC_TRACE();
+
+ core_info = &qdma_core_info[lcore_id];
+ num_hw_queues = core_info->num_hw_queues;
+
+ /*
+ * Allocate a HW queue if there are less queues
+ * than maximum per core queues configured
+ */
+ if (num_hw_queues < qdma_dev.max_hw_queues_per_core) {
+ queue = alloc_hw_queue(lcore_id);
+ if (queue) {
+ core_info->hw_queues[num_hw_queues] = queue;
+ core_info->num_hw_queues++;
+ return queue;
+ }
+ }
+
+ queue = core_info->hw_queues[0];
+ /* In case there is no queue associated with the core return NULL */
+ if (!queue)
+ return NULL;
+
+ /* Fetch the least loaded H/W queue */
+ least_num_users = core_info->hw_queues[0]->num_users;
+ for (i = 0; i < num_hw_queues; i++) {
+ temp = core_info->hw_queues[i];
+ if (temp->num_users < least_num_users)
+ queue = temp;
+ }
+
+ if (queue)
+ queue->num_users++;
+
+ return queue;
+}
+
+static void
+put_hw_queue(struct qdma_hw_queue *queue)
+{
+ struct qdma_per_core_info *core_info;
+ int lcore_id, num_hw_queues, i;
+
+ DPAA2_QDMA_FUNC_TRACE();
+
+ /*
+ * If this is the last user of the queue free it.
+ * Also remove it from QDMA core info.
+ */
+ if (queue->num_users == 1) {
+ free_hw_queue(queue);
+
+ /* Remove the physical queue from core info */
+ lcore_id = queue->lcore_id;
+ core_info = &qdma_core_info[lcore_id];
+ num_hw_queues = core_info->num_hw_queues;
+ for (i = 0; i < num_hw_queues; i++) {
+ if (queue == core_info->hw_queues[i])
+ break;
+ }
+ for (; i < num_hw_queues - 1; i++)
+ core_info->hw_queues[i] = core_info->hw_queues[i + 1];
+ core_info->hw_queues[i] = NULL;
+ } else {
+ queue->num_users--;
+ }
+}
+
+int
+rte_qdma_init(void)
+{
+ DPAA2_QDMA_FUNC_TRACE();
+
+ rte_spinlock_init(&qdma_dev.lock);
+
+ return 0;
+}
+
+void
+rte_qdma_attr_get(struct rte_qdma_attr *qdma_attr)
+{
+ DPAA2_QDMA_FUNC_TRACE();
+
+ qdma_attr->num_hw_queues = qdma_dev.num_hw_queues;
+}
+
+int
+rte_qdma_reset(void)
+{
+ struct qdma_hw_queue *queue;
+ int i;
+
+ DPAA2_QDMA_FUNC_TRACE();
+
+ /* In case QDMA device is not in stopped state, return -EBUSY */
+ if (qdma_dev.state == 1) {
+ DPAA2_QDMA_ERR(
+ "Device is in running state. Stop before reset.\n");
+ return -EBUSY;
+ }
+
+ /* In case there are pending jobs on any VQ, return -EBUSY */
+ for (i = 0; i < qdma_dev.max_vqs; i++) {
+ if (qdma_vqs[i].in_use && (qdma_vqs[i].num_enqueues !=
+ qdma_vqs[i].num_dequeues))
+ DPAA2_QDMA_ERR("Jobs are still pending on VQ: %d\n", i);
+ return -EBUSY;
+ }
+
+ /* Reset HW queues */
+ TAILQ_FOREACH(queue, &qdma_queue_list, next)
+ queue->num_users = 0;
+
+ /* Reset and free virtual queues */
+ for (i = 0; i < qdma_dev.max_vqs; i++) {
+ if (qdma_vqs[i].status_ring)
+ rte_ring_free(qdma_vqs[i].status_ring);
+ }
+ if (qdma_vqs)
+ rte_free(qdma_vqs);
+ qdma_vqs = NULL;
+
+ /* Reset per core info */
+ memset(&qdma_core_info, 0,
+ sizeof(struct qdma_per_core_info) * RTE_MAX_LCORE);
+
+ /* Free the FLE pool */
+ if (qdma_dev.fle_pool)
+ rte_mempool_free(qdma_dev.fle_pool);
+
+ /* Reset QDMA device structure */
+ qdma_dev.mode = RTE_QDMA_MODE_HW;
+ qdma_dev.max_hw_queues_per_core = 0;
+ qdma_dev.fle_pool = NULL;
+ qdma_dev.fle_pool_count = 0;
+ qdma_dev.max_vqs = 0;
+
+ return 0;
+}
+
+int
+rte_qdma_configure(struct rte_qdma_config *qdma_config)
+{
+ int ret;
+
+ DPAA2_QDMA_FUNC_TRACE();
+
+ /* In case QDMA device is not in stopped state, return -EBUSY */
+ if (qdma_dev.state == 1) {
+ DPAA2_QDMA_ERR(
+ "Device is in running state. Stop before config.\n");
+ return -1;
+ }
+
+ /* Reset the QDMA device */
+ ret = rte_qdma_reset();
+ if (ret) {
+ DPAA2_QDMA_ERR("Resetting QDMA failed\n");
+ return ret;
+ }
+
+ /* Set mode */
+ qdma_dev.mode = qdma_config->mode;
+
+ /* Set max HW queue per core */
+ if (qdma_config->max_hw_queues_per_core > MAX_HW_QUEUE_PER_CORE) {
+ DPAA2_QDMA_ERR("H/W queues per core is more than: %d\n",
+ MAX_HW_QUEUE_PER_CORE);
+ return -EINVAL;
+ }
+ qdma_dev.max_hw_queues_per_core =
+ qdma_config->max_hw_queues_per_core;
+
+ /* Allocate Virtual Queues */
+ qdma_vqs = rte_malloc("qdma_virtual_queues",
+ (sizeof(struct qdma_virt_queue) * qdma_config->max_vqs),
+ RTE_CACHE_LINE_SIZE);
+ if (!qdma_vqs) {
+ DPAA2_QDMA_ERR("qdma_virtual_queues allocation failed\n");
+ return -ENOMEM;
+ }
+ qdma_dev.max_vqs = qdma_config->max_vqs;
+
+ /* Allocate FLE pool */
+ qdma_dev.fle_pool = rte_mempool_create("qdma_fle_pool",
+ qdma_config->fle_pool_count, QDMA_FLE_POOL_SIZE,
+ QDMA_FLE_CACHE_SIZE(qdma_config->fle_pool_count), 0,
+ NULL, NULL, NULL, NULL, SOCKET_ID_ANY, 0);
+ if (!qdma_dev.fle_pool) {
+ DPAA2_QDMA_ERR("qdma_fle_pool create failed\n");
+ rte_free(qdma_vqs);
+ qdma_vqs = NULL;
+ return -ENOMEM;
+ }
+ qdma_dev.fle_pool_count = qdma_config->fle_pool_count;
+
+ return 0;
+}
+
+int
+rte_qdma_start(void)
+{
+ DPAA2_QDMA_FUNC_TRACE();
+
+ qdma_dev.state = 1;
+
+ return 0;
+}
+
+int
+rte_qdma_vq_create(uint32_t lcore_id, uint32_t flags)
+{
+ char ring_name[32];
+ int i;
+
+ DPAA2_QDMA_FUNC_TRACE();
+
+ rte_spinlock_lock(&qdma_dev.lock);
+
+ /* Get a free Virtual Queue */
+ for (i = 0; i < qdma_dev.max_vqs; i++) {
+ if (qdma_vqs[i].in_use == 0)
+ break;
+ }
+
+ /* Return in case no VQ is free */
+ if (i == qdma_dev.max_vqs) {
+ rte_spinlock_unlock(&qdma_dev.lock);
+ return -ENODEV;
+ }
+
+ if (qdma_dev.mode == RTE_QDMA_MODE_HW ||
+ (flags & RTE_QDMA_VQ_EXCLUSIVE_PQ)) {
+ /* Allocate HW queue for a VQ */
+ qdma_vqs[i].hw_queue = alloc_hw_queue(lcore_id);
+ qdma_vqs[i].exclusive_hw_queue = 1;
+ } else {
+ /* Allocate a Ring for Virutal Queue in VQ mode */
+ sprintf(ring_name, "status ring %d", i);
+ qdma_vqs[i].status_ring = rte_ring_create(ring_name,
+ qdma_dev.fle_pool_count, rte_socket_id(), 0);
+ if (!qdma_vqs[i].status_ring) {
+ DPAA2_QDMA_ERR("Status ring creation failed for vq\n");
+ rte_spinlock_unlock(&qdma_dev.lock);
+ return rte_errno;
+ }
+
+ /* Get a HW queue (shared) for a VQ */
+ qdma_vqs[i].hw_queue = get_hw_queue(lcore_id);
+ qdma_vqs[i].exclusive_hw_queue = 0;
+ }
+
+ if (qdma_vqs[i].hw_queue == NULL) {
+ DPAA2_QDMA_ERR("No H/W queue available for VQ\n");
+ if (qdma_vqs[i].status_ring)
+ rte_ring_free(qdma_vqs[i].status_ring);
+ qdma_vqs[i].status_ring = NULL;
+ rte_spinlock_unlock(&qdma_dev.lock);
+ return -ENODEV;
+ }
+
+ qdma_vqs[i].in_use = 1;
+ qdma_vqs[i].lcore_id = lcore_id;
+
+ rte_spinlock_unlock(&qdma_dev.lock);
+
+ return i;
+}
+
+void
+rte_qdma_vq_stats(uint16_t vq_id,
+ struct rte_qdma_vq_stats *vq_status)
+{
+ struct qdma_virt_queue *qdma_vq = &qdma_vqs[vq_id];
+
+ DPAA2_QDMA_FUNC_TRACE();
+
+ if (qdma_vq->in_use) {
+ vq_status->exclusive_hw_queue = qdma_vq->exclusive_hw_queue;
+ vq_status->lcore_id = qdma_vq->lcore_id;
+ vq_status->num_enqueues = qdma_vq->num_enqueues;
+ vq_status->num_dequeues = qdma_vq->num_dequeues;
+ vq_status->num_pending_jobs = vq_status->num_enqueues -
+ vq_status->num_dequeues;
+ }
+}
+
+int
+rte_qdma_vq_destroy(uint16_t vq_id)
+{
+ struct qdma_virt_queue *qdma_vq = &qdma_vqs[vq_id];
+
+ DPAA2_QDMA_FUNC_TRACE();
+
+ /* In case there are pending jobs on any VQ, return -EBUSY */
+ if (qdma_vq->num_enqueues != qdma_vq->num_dequeues)
+ return -EBUSY;
+
+ rte_spinlock_lock(&qdma_dev.lock);
+
+ if (qdma_vq->exclusive_hw_queue)
+ free_hw_queue(qdma_vq->hw_queue);
+ else {
+ if (qdma_vqs->status_ring)
+ rte_ring_free(qdma_vqs->status_ring);
+
+ put_hw_queue(qdma_vq->hw_queue);
+ }
+
+ memset(qdma_vq, 0, sizeof(struct qdma_virt_queue));
+
+ rte_spinlock_lock(&qdma_dev.lock);
+
+ return 0;
+}
+
+void
+rte_qdma_stop(void)
+{
+ DPAA2_QDMA_FUNC_TRACE();
+
+ qdma_dev.state = 0;
+}
+
+void
+rte_qdma_destroy(void)
+{
+ DPAA2_QDMA_FUNC_TRACE();
+
+ rte_qdma_reset();
+}
+
static const struct rte_rawdev_ops dpaa2_qdma_ops = {
};
diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.h b/drivers/raw/dpaa2_qdma/dpaa2_qdma.h
index 8b3b1b9..fe1da41 100644
--- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.h
+++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.h
@@ -5,6 +5,22 @@
#ifndef __DPAA2_QDMA_H__
#define __DPAA2_QDMA_H__
+struct qdma_sdd;
+struct qdma_io_meta;
+
+#define DPAA2_QDMA_MAX_FLE 3
+#define DPAA2_QDMA_MAX_SDD 2
+
+/** FLE pool size: 3 Frame list + 2 source/destination descriptor */
+#define QDMA_FLE_POOL_SIZE (sizeof(struct qdma_io_meta) + \
+ sizeof(struct qbman_fle) * DPAA2_QDMA_MAX_FLE + \
+ sizeof(struct qdma_sdd) * DPAA2_QDMA_MAX_SDD)
+/** FLE pool cache size */
+#define QDMA_FLE_CACHE_SIZE(_num) (_num/(RTE_MAX_LCORE * 2))
+
+/** Maximum possible H/W Queues on each core */
+#define MAX_HW_QUEUE_PER_CORE 64
+
/**
* Represents a QDMA device.
* A single QDMA device exists which is combination of multiple DPDMAI rawdev's.
@@ -45,6 +61,53 @@ struct qdma_hw_queue {
uint32_t num_users;
};
+/** Represents a QDMA virtual queue */
+struct qdma_virt_queue {
+ /** Status ring of the virtual queue */
+ struct rte_ring *status_ring;
+ /** Associated hw queue */
+ struct qdma_hw_queue *hw_queue;
+ /** Associated lcore id */
+ uint32_t lcore_id;
+ /** States if this vq is in use or not */
+ uint8_t in_use;
+ /** States if this vq has exclusively associated hw queue */
+ uint8_t exclusive_hw_queue;
+ /* Total number of enqueues on this VQ */
+ uint64_t num_enqueues;
+ /* Total number of dequeues from this VQ */
+ uint64_t num_dequeues;
+};
+
+/** Represents a QDMA per core hw queues allocation in virtual mode */
+struct qdma_per_core_info {
+ /** list for allocated hw queues */
+ struct qdma_hw_queue *hw_queues[MAX_HW_QUEUE_PER_CORE];
+ /* Number of hw queues allocated for this core */
+ uint16_t num_hw_queues;
+};
+
+/** Metadata which is stored with each operation */
+struct qdma_io_meta {
+ /**
+ * Context which is stored in the FLE pool (just before the FLE).
+ * QDMA job is stored as a this context as a part of metadata.
+ */
+ uint64_t cnxt;
+ /** VQ ID is stored as a part of metadata of the enqueue command */
+ uint64_t id;
+};
+
+/** Source/Destination Descriptor */
+struct qdma_sdd {
+ uint32_t rsv;
+ /** Stride configuration */
+ uint32_t stride;
+ /** Route-by-port command */
+ uint32_t rbpcmd;
+ uint32_t cmd;
+} __attribute__((__packed__));
+
/** Represents a DPDMAI raw device */
struct dpaa2_dpdmai_dev {
/** Pointer to Next device instance */
diff --git a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h
new file mode 100644
index 0000000..d27fd49
--- /dev/null
+++ b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma.h
@@ -0,0 +1,216 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2018 NXP
+ */
+
+#ifndef __RTE_PMD_DPAA2_QDMA_H__
+#define __RTE_PMD_DPAA2_QDMA_H__
+
+/**
+ * @file
+ *
+ * NXP dpaa2 QDMA specific structures.
+ *
+ */
+
+/** Determines the mode of operation */
+enum {
+ /**
+ * Allocate a H/W queue per VQ i.e. Exclusive hardware queue for a VQ.
+ * This mode will have best performance.
+ */
+ RTE_QDMA_MODE_HW,
+ /**
+ * A VQ shall not have an exclusive associated H/W queue.
+ * Rather a H/W Queue will be shared by multiple Virtual Queues.
+ * This mode will have intermediate data structures to support
+ * multi VQ to PQ mappings thus having some performance implications.
+ * Note: Even in this mode there is an option to allocate a H/W
+ * queue for a VQ. Please see 'RTE_QDMA_VQ_EXCLUSIVE_PQ' flag.
+ */
+ RTE_QDMA_MODE_VIRTUAL
+};
+
+/**
+ * If user has configued a Virtual Queue mode, but for some particular VQ
+ * user needs an exclusive H/W queue associated (for better performance
+ * on that particular VQ), then user can pass this flag while creating the
+ * Virtual Queue. A H/W queue will be allocated corresponding to
+ * VQ which uses this flag.
+ */
+#define RTE_QDMA_VQ_EXCLUSIVE_PQ (1ULL)
+
+/** States if the source addresses is physical. */
+#define RTE_QDMA_JOB_SRC_PHY (1ULL)
+
+/** States if the destination addresses is physical. */
+#define RTE_QDMA_JOB_DEST_PHY (1ULL << 1)
+
+/** Provides QDMA device attributes */
+struct rte_qdma_attr {
+ /** total number of hw QDMA queues present */
+ uint16_t num_hw_queues;
+};
+
+/** QDMA device configuration structure */
+struct rte_qdma_config {
+ /** Number of maximum hw queues to allocate per core. */
+ uint16_t max_hw_queues_per_core;
+ /** Maximum number of VQ's to be used. */
+ uint16_t max_vqs;
+ /** mode of operation - physical(h/w) or virtual */
+ uint8_t mode;
+ /**
+ * User provides this as input to the driver as a size of the FLE pool.
+ * FLE's (and corresponding source/destination descriptors) are
+ * allocated by the driver at enqueue time to store src/dest and
+ * other data and are freed at the dequeue time. This determines the
+ * maximum number of inflight jobs on the QDMA device. This should
+ * be power of 2.
+ */
+ int fle_pool_count;
+};
+
+/** Provides QDMA device statistics */
+struct rte_qdma_vq_stats {
+ /** States if this vq has exclusively associated hw queue */
+ uint8_t exclusive_hw_queue;
+ /** Associated lcore id */
+ uint32_t lcore_id;
+ /* Total number of enqueues on this VQ */
+ uint64_t num_enqueues;
+ /* Total number of dequeues from this VQ */
+ uint64_t num_dequeues;
+ /* total number of pending jobs in this VQ */
+ uint64_t num_pending_jobs;
+};
+
+/** Determines a QDMA job */
+struct rte_qdma_job {
+ /** Source Address from where DMA is (to be) performed */
+ uint64_t src;
+ /** Destination Address where DMA is (to be) done */
+ uint64_t dest;
+ /** Length of the DMA operation in bytes. */
+ uint32_t len;
+ /** See RTE_QDMA_JOB_ flags */
+ uint32_t flags;
+ /**
+ * User can specify a context which will be maintained
+ * on the dequeue operation.
+ */
+ uint64_t cnxt;
+ /**
+ * Status of the transaction.
+ * This is filled in the dequeue operation by the driver.
+ */
+ uint8_t status;
+};
+
+/**
+ * Initialize the QDMA device.
+ *
+ * @returns
+ * - 0: Success.
+ * - <0: Error code.
+ */
+int
+rte_qdma_init(void);
+
+/**
+ * Get the QDMA attributes.
+ *
+ * @param qdma_attr
+ * QDMA attributes providing total number of hw queues etc.
+ */
+void
+rte_qdma_attr_get(struct rte_qdma_attr *qdma_attr);
+
+/**
+ * Reset the QDMA device. This API will completely reset the QDMA
+ * device, bringing it to original state as if only rte_qdma_init() API
+ * has been called.
+ *
+ * @returns
+ * - 0: Success.
+ * - <0: Error code.
+ */
+int
+rte_qdma_reset(void);
+
+/**
+ * Configure the QDMA device.
+ *
+ * @returns
+ * - 0: Success.
+ * - <0: Error code.
+ */
+int
+rte_qdma_configure(struct rte_qdma_config *qdma_config);
+
+/**
+ * Start the QDMA device.
+ *
+ * @returns
+ * - 0: Success.
+ * - <0: Error code.
+ */
+int
+rte_qdma_start(void);
+
+/**
+ * Create a Virtual Queue on a particular lcore id.
+ * This API can be called from any thread/core. User can create/destroy
+ * VQ's at runtime.
+ *
+ * @param lcore_id
+ * LCORE ID on which this particular queue would be associated with.
+ * @param flags
+ * RTE_QDMA_VQ_ flags. See macro definitions.
+ *
+ * @returns
+ * - >= 0: Virtual queue ID.
+ * - <0: Error code.
+ */
+int
+rte_qdma_vq_create(uint32_t lcore_id, uint32_t flags);
+
+/**
+ * Get a Virtual Queue statistics.
+ *
+ * @param vq_id
+ * Virtual Queue ID.
+ * @param vq_stats
+ * VQ statistics structure which will be filled in by the driver.
+ */
+void
+rte_qdma_vq_stats(uint16_t vq_id,
+ struct rte_qdma_vq_stats *vq_stats);
+
+/**
+ * Destroy the Virtual Queue specified by vq_id.
+ * This API can be called from any thread/core. User can create/destroy
+ * VQ's at runtime.
+ *
+ * @param vq_id
+ * Virtual Queue ID which needs to be deinialized.
+ *
+ * @returns
+ * - 0: Success.
+ * - <0: Error code.
+ */
+int
+rte_qdma_vq_destroy(uint16_t vq_id);
+
+/**
+ * Stop QDMA device.
+ */
+void
+rte_qdma_stop(void);
+
+/**
+ * Destroy the QDMA device.
+ */
+void
+rte_qdma_destroy(void);
+
+#endif /* __RTE_PMD_DPAA2_QDMA_H__*/
diff --git a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma_version.map b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma_version.map
index 9b9ab1a..0a0d3c5 100644
--- a/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma_version.map
+++ b/drivers/raw/dpaa2_qdma/rte_pmd_dpaa2_qdma_version.map
@@ -1,4 +1,16 @@
DPDK_18.05 {
+ global:
+
+ rte_qdma_attr_get;
+ rte_qdma_configure;
+ rte_qdma_destroy;
+ rte_qdma_init;
+ rte_qdma_reset;
+ rte_qdma_start;
+ rte_qdma_stop;
+ rte_qdma_vq_create;
+ rte_qdma_vq_destroy;
+ rte_qdma_vq_stats;
local: *;
};
--
1.9.1
next prev parent reply other threads:[~2018-04-07 15:17 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-07 15:16 [dpdk-dev] [PATCH 0/8] Introduce DPAA2 QDMA raw driver Nipun Gupta
2018-04-07 15:16 ` [dpdk-dev] [PATCH 1/8] bus/fslmc: support MC DPDMAI object Nipun Gupta
2018-04-16 11:46 ` Shreyansh Jain
2018-04-07 15:16 ` [dpdk-dev] [PATCH 2/8] bus/fslmc: support scanning and probing of QDMA devices Nipun Gupta
2018-04-16 11:58 ` Shreyansh Jain
2018-04-07 15:16 ` [dpdk-dev] [PATCH 3/8] bus/fslmc: add macros required by QDMA for FLE and FD Nipun Gupta
2018-04-16 12:23 ` Shreyansh Jain
2018-04-07 15:17 ` [dpdk-dev] [PATCH 4/8] raw/dpaa2_qdma: introduce the DPAA2 QDMA driver Nipun Gupta
2018-04-16 13:46 ` Shreyansh Jain
2018-04-07 15:17 ` Nipun Gupta [this message]
2018-04-07 15:17 ` [dpdk-dev] [PATCH 6/8] raw/dpaa2_qdma: support enq and deq operations Nipun Gupta
2018-04-16 14:01 ` Shreyansh Jain
2018-04-07 15:17 ` [dpdk-dev] [PATCH 7/8] doc: add DPAA2 QDMA rawdev guide Nipun Gupta
2018-04-16 14:04 ` Shreyansh Jain
2018-04-07 15:17 ` [dpdk-dev] [PATCH 8/8] doc: add dpaa2 qdma rawdev to release notes Nipun Gupta
2018-04-20 4:04 ` [dpdk-dev] [PATCH 0/9 v2] Introduce DPAA2 QDMA raw driver Nipun Gupta
2018-04-20 4:04 ` [dpdk-dev] [PATCH 1/9 v2] bus/fslmc: support MC DPDMAI object Nipun Gupta
2018-04-20 4:04 ` [dpdk-dev] [PATCH 2/9 v2] bus/fslmc: support scanning and probing of QDMA devices Nipun Gupta
2018-04-20 4:04 ` [dpdk-dev] [PATCH 3/9 v2] bus/fslmc: add macros required by QDMA for FLE and FD Nipun Gupta
2018-04-20 9:17 ` Hemant Agrawal
2018-04-20 4:04 ` [dpdk-dev] [PATCH 4/9 v2] bus/fslmc: fix typecasting in IOVA/virt conversion macros Nipun Gupta
2018-04-20 4:04 ` [dpdk-dev] [PATCH 5/9 v2] raw/dpaa2_qdma: introduce the DPAA2 QDMA driver Nipun Gupta
2018-04-20 4:04 ` [dpdk-dev] [PATCH 6/9 v2] raw/dpaa2_qdma: support configuration APIs Nipun Gupta
2018-04-20 4:04 ` [dpdk-dev] [PATCH 7/9 v2] raw/dpaa2_qdma: support enq and deq operations Nipun Gupta
2018-04-20 4:04 ` [dpdk-dev] [PATCH 8/9 v2] doc: add DPAA2 QDMA rawdev guide Nipun Gupta
2018-04-20 4:04 ` [dpdk-dev] [PATCH 9/9 v2] doc: add dpaa2 qdma rawdev to release notes Nipun Gupta
2018-04-20 4:10 ` [dpdk-dev] [PATCH 0/9 v2] Introduce DPAA2 QDMA raw driver Nipun Gupta
2018-04-20 10:34 ` Nipun Gupta
2018-04-20 10:30 ` [dpdk-dev] [PATCH 0/9 v3] " Nipun Gupta
2018-04-20 10:30 ` [dpdk-dev] [PATCH 1/9 v3] bus/fslmc: support MC DPDMAI object Nipun Gupta
2018-04-20 10:30 ` [dpdk-dev] [PATCH 2/9 v3] bus/fslmc: support scanning and probing of QDMA devices Nipun Gupta
2018-04-20 10:30 ` [dpdk-dev] [PATCH 3/9 v3] bus/fslmc: add macros required by QDMA for FLE and FD Nipun Gupta
2018-04-20 10:30 ` [dpdk-dev] [PATCH 4/9 v3] bus/fslmc: fix typecasting in IOVA/virt conversion macros Nipun Gupta
2018-04-20 10:31 ` [dpdk-dev] [PATCH 5/9 v3] raw/dpaa2_qdma: introduce the DPAA2 QDMA driver Nipun Gupta
2018-04-20 10:31 ` [dpdk-dev] [PATCH 6/9 v3] raw/dpaa2_qdma: support configuration APIs Nipun Gupta
2018-04-20 10:31 ` [dpdk-dev] [PATCH 7/9 v3] raw/dpaa2_qdma: support enq and deq operations Nipun Gupta
2018-04-20 10:31 ` [dpdk-dev] [PATCH 8/9 v3] doc: add DPAA2 QDMA rawdev guide Nipun Gupta
2018-04-20 10:31 ` [dpdk-dev] [PATCH 9/9 v3] doc: add dpaa2 qdma rawdev to release notes Nipun Gupta
2018-04-23 0:03 ` Thomas Monjalon
2018-04-23 8:45 ` Nipun Gupta
2018-04-23 0:05 ` [dpdk-dev] [PATCH 0/9 v3] Introduce DPAA2 QDMA raw driver Thomas Monjalon
2018-04-23 8:46 ` Nipun Gupta
2018-04-24 11:49 ` [dpdk-dev] [PATCH 0/8 v4] " Nipun Gupta
2018-04-24 11:49 ` [dpdk-dev] [PATCH 1/8 v4] raw: support meson build Nipun Gupta
2018-04-26 6:58 ` Shreyansh Jain
2018-04-24 11:49 ` [dpdk-dev] [PATCH 2/8 v4] bus/fslmc: support MC DPDMAI object Nipun Gupta
2018-04-24 11:49 ` [dpdk-dev] [PATCH 3/8 v4] bus/fslmc: support scanning and probing of QDMA devices Nipun Gupta
2018-04-24 11:49 ` [dpdk-dev] [PATCH 4/8 v4] bus/fslmc: add macros required by QDMA for FLE and FD Nipun Gupta
2018-04-24 11:49 ` [dpdk-dev] [PATCH 5/8 v4] raw/dpaa2_qdma: introduce the DPAA2 QDMA driver Nipun Gupta
2018-04-30 12:34 ` Thomas Monjalon
2018-05-01 6:14 ` Nipun Gupta
2018-05-01 6:21 ` Nipun Gupta
2018-04-24 11:49 ` [dpdk-dev] [PATCH 6/8 v4] raw/dpaa2_qdma: support configuration APIs Nipun Gupta
2018-04-24 11:49 ` [dpdk-dev] [PATCH 7/8 v4] raw/dpaa2_qdma: support enq and deq operations Nipun Gupta
2018-04-24 11:49 ` [dpdk-dev] [PATCH 8/8 v4] doc: add DPAA2 QDMA rawdev guide Nipun Gupta
2018-05-01 9:58 ` [dpdk-dev] [PATCH v5 0/8] Introduce DPAA2 QDMA raw driver Nipun Gupta
2018-05-01 9:58 ` [dpdk-dev] [PATCH v5 1/8] raw: support meson build Nipun Gupta
2018-05-01 9:58 ` [dpdk-dev] [PATCH v5 2/8] bus/fslmc: support MC DPDMAI object Nipun Gupta
2018-05-01 9:58 ` [dpdk-dev] [PATCH v5 3/8] bus/fslmc: support scanning and probing of QDMA devices Nipun Gupta
2018-05-01 9:58 ` [dpdk-dev] [PATCH v5 4/8] bus/fslmc: add macros required by QDMA for FLE and FD Nipun Gupta
2018-05-01 9:58 ` [dpdk-dev] [PATCH v5 5/8] raw/dpaa2_qdma: introduce the DPAA2 QDMA driver Nipun Gupta
2018-05-01 9:58 ` [dpdk-dev] [PATCH v6 6/8] raw/dpaa2_qdma: support configuration APIs Nipun Gupta
2018-05-01 9:58 ` [dpdk-dev] [PATCH v5 7/8] raw/dpaa2_qdma: support enq and deq operations Nipun Gupta
2018-05-01 9:58 ` [dpdk-dev] [PATCH v5 8/8] doc: add DPAA2 QDMA rawdev guide Nipun Gupta
2018-05-02 17:09 ` [dpdk-dev] [PATCH v6 0/8] Introduce DPAA2 QDMA raw driver Nipun Gupta
2018-05-02 17:09 ` [dpdk-dev] [PATCH v6 1/8] raw: support meson build Nipun Gupta
2018-05-02 17:09 ` [dpdk-dev] [PATCH v6 2/8] bus/fslmc: support MC DPDMAI object Nipun Gupta
2018-05-02 17:09 ` [dpdk-dev] [PATCH v6 3/8] bus/fslmc: support scanning and probing of QDMA devices Nipun Gupta
2018-05-02 17:09 ` [dpdk-dev] [PATCH v6 4/8] bus/fslmc: add macros required by QDMA for FLE and FD Nipun Gupta
2018-05-02 17:09 ` [dpdk-dev] [PATCH v6 5/8] raw/dpaa2_qdma: introduce the DPAA2 QDMA driver Nipun Gupta
2018-05-03 14:07 ` Shreyansh Jain
2018-05-02 17:09 ` [dpdk-dev] [PATCH v6 6/8] raw/dpaa2_qdma: support configuration APIs Nipun Gupta
2018-05-02 17:09 ` [dpdk-dev] [PATCH v6 7/8] raw/dpaa2_qdma: support enq and deq operations Nipun Gupta
2018-05-02 17:09 ` [dpdk-dev] [PATCH v6 8/8] doc: add DPAA2 QDMA rawdev guide Nipun Gupta
2018-05-03 15:51 ` [dpdk-dev] [PATCH v7 0/8] Introduce DPAA2 QDMA raw driver Nipun Gupta
2018-05-03 15:51 ` [dpdk-dev] [PATCH v7 1/8] raw: support meson build Nipun Gupta
2018-05-03 15:51 ` [dpdk-dev] [PATCH v7 2/8] bus/fslmc: support MC DPDMAI object Nipun Gupta
2018-05-03 15:51 ` [dpdk-dev] [PATCH v7 3/8] bus/fslmc: support scanning and probing of QDMA devices Nipun Gupta
2018-05-03 15:51 ` [dpdk-dev] [PATCH v7 4/8] bus/fslmc: add macros required by QDMA for FLE and FD Nipun Gupta
2018-05-03 15:51 ` [dpdk-dev] [PATCH v7 5/8] raw/dpaa2_qdma: introduce the DPAA2 QDMA driver Nipun Gupta
2018-05-03 15:52 ` [dpdk-dev] [PATCH v7 6/8] raw/dpaa2_qdma: support configuration APIs Nipun Gupta
2018-05-03 15:52 ` [dpdk-dev] [PATCH v7 7/8] raw/dpaa2_qdma: support enq and deq operations Nipun Gupta
2018-05-03 15:52 ` [dpdk-dev] [PATCH v7 8/8] doc: add DPAA2 QDMA rawdev guide Nipun Gupta
2018-05-03 15:58 ` [dpdk-dev] [PATCH v7 0/8] Introduce DPAA2 QDMA raw driver Nipun Gupta
2018-05-03 16:06 ` [dpdk-dev] [PATCH RESEND " Nipun Gupta
2018-05-03 16:06 ` [dpdk-dev] [PATCH RESEND v7 1/8] raw: support meson build Nipun Gupta
2018-05-03 16:06 ` [dpdk-dev] [PATCH RESEND v7 2/8] bus/fslmc: support MC DPDMAI object Nipun Gupta
2018-05-03 16:06 ` [dpdk-dev] [PATCH RESEND v7 3/8] bus/fslmc: support scanning and probing of QDMA devices Nipun Gupta
2018-05-03 16:06 ` [dpdk-dev] [PATCH RESEND v7 4/8] bus/fslmc: add macros required by QDMA for FLE and FD Nipun Gupta
2018-05-03 16:06 ` [dpdk-dev] [PATCH RESEND v7 5/8] raw/dpaa2_qdma: introduce the DPAA2 QDMA driver Nipun Gupta
2018-05-03 16:06 ` [dpdk-dev] [PATCH RESEND v7 6/8] raw/dpaa2_qdma: support configuration APIs Nipun Gupta
2018-05-03 16:06 ` [dpdk-dev] [PATCH RESEND v7 7/8] raw/dpaa2_qdma: support enq and deq operations Nipun Gupta
2018-05-03 16:06 ` [dpdk-dev] [PATCH RESEND v7 8/8] doc: add DPAA2 QDMA rawdev guide Nipun Gupta
2018-05-08 10:17 ` Thomas Monjalon
2018-05-08 10:22 ` [dpdk-dev] [PATCH RESEND v7 0/8] Introduce DPAA2 QDMA raw driver Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1523114224-9852-6-git-send-email-nipun.gupta@nxp.com \
--to=nipun.gupta@nxp.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=shreyansh.jain@nxp.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).