/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018-2020 NXP
+ * Copyright 2018-2021 NXP
*/
#ifndef __RTE_PMD_DPAA2_QDMA_H__
*/
#define RTE_QDMA_VQ_EXCLUSIVE_PQ (1ULL)
+#define RTE_QDMA_VQ_FD_LONG_FORMAT (1ULL << 1)
+
+#define RTE_QDMA_VQ_FD_SG_FORMAT (1ULL << 2)
+
+#define RTE_QDMA_VQ_NO_RESPONSE (1ULL << 3)
+
/** States if the source addresses is physical. */
#define RTE_QDMA_JOB_SRC_PHY (1ULL)
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;
- /** FD format */
- uint8_t format;
/**
* User provides this as input to the driver as a size of the FLE pool.
* FLE's (and corresponding source/destination descriptors) are
* maximum number of inflight jobs on the QDMA device. This should
* be power of 2.
*/
- int fle_pool_count;
+ int fle_queue_pool_cnt;
};
struct rte_qdma_rbp {
*/
uint16_t status;
uint16_t vq_id;
+ /**
+ * FLE pool element maintained by user, in case no qDMA response.
+ * Note: the address must be allocated from DPDK memory pool.
+ */
+ void *usr_elem;
};
struct rte_qdma_enqdeq {
#define rte_qdma_info rte_rawdev_info
#define rte_qdma_start(id) rte_rawdev_start(id)
#define rte_qdma_reset(id) rte_rawdev_reset(id)
-#define rte_qdma_configure(id, cf) rte_rawdev_configure(id, cf)
+#define rte_qdma_configure(id, cf, sz) rte_rawdev_configure(id, cf, sz)
#define rte_qdma_dequeue_buffers(id, buf, num, ctxt) \
rte_rawdev_dequeue_buffers(id, buf, num, ctxt)
#define rte_qdma_enqueue_buffers(id, buf, num, ctxt) \
rte_rawdev_enqueue_buffers(id, buf, num, ctxt)
-#define rte_qdma_queue_setup(id, qid, cfg) \
- rte_rawdev_queue_setup(id, qid, cfg)
+#define rte_qdma_queue_setup(id, qid, cfg, sz) \
+ rte_rawdev_queue_setup(id, qid, cfg, sz)
/*TODO introduce per queue stats API in rawdew */
/**
* Get a Virtual Queue statistics.
*
+ * @param rawdev
+ * Raw Device.
* @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);
+rte_qdma_vq_stats(struct rte_rawdev *rawdev,
+ uint16_t vq_id,
+ struct rte_qdma_vq_stats *vq_stats);
#endif /* __RTE_PMD_DPAA2_QDMA_H__*/