DPDK 21.11.9
rte_pmd_dpaa2_qdma.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2018-2021 NXP
3 */
4
5#ifndef __RTE_PMD_DPAA2_QDMA_H__
6#define __RTE_PMD_DPAA2_QDMA_H__
7
8#include <rte_rawdev.h>
9
18#define RTE_QDMA_BURST_NB_MAX 256
19
21enum {
36};
37
39enum {
40 RTE_QDMA_LONG_FORMAT,
41 RTE_QDMA_ULTRASHORT_FORMAT,
42};
43
51#define RTE_QDMA_VQ_EXCLUSIVE_PQ (1ULL)
52
53#define RTE_QDMA_VQ_FD_LONG_FORMAT (1ULL << 1)
54
55#define RTE_QDMA_VQ_FD_SG_FORMAT (1ULL << 2)
56
57#define RTE_QDMA_VQ_NO_RESPONSE (1ULL << 3)
58
60#define RTE_QDMA_JOB_SRC_PHY (1ULL)
61
63#define RTE_QDMA_JOB_DEST_PHY (1ULL << 1)
64
68 uint16_t num_hw_queues;
69};
70
76 uint16_t max_vqs;
86};
87
88struct rte_qdma_rbp {
89 uint32_t use_ultrashort:1;
90 uint32_t enable:1;
100 uint32_t dportid:4;
101 uint32_t dpfid:2;
102 uint32_t dvfid:6;
103 /*using route by port for destination */
104 uint32_t drbp:1;
114 uint32_t sportid:4;
115 uint32_t spfid:2;
116 uint32_t svfid:6;
117 /* using route by port for source */
118 uint32_t srbp:1;
119 uint32_t rsv:4;
120};
121
127 uint32_t lcore_id;
128 /* Total number of enqueues on this VQ */
129 uint64_t num_enqueues;
130 /* Total number of dequeues from this VQ */
131 uint64_t num_dequeues;
132 /* total number of pending jobs in this VQ */
133 uint64_t num_pending_jobs;
134};
135
139 uint64_t src;
141 uint64_t dest;
143 uint32_t len;
145 uint32_t flags;
150 uint64_t cnxt;
157 uint16_t status;
158 uint16_t vq_id;
163 void *usr_elem;
164};
165
166struct rte_qdma_enqdeq {
167 uint16_t vq_id;
168 struct rte_qdma_job **job;
169};
170
171struct rte_qdma_queue_config {
172 uint32_t lcore_id;
173 uint32_t flags;
174 struct rte_qdma_rbp *rbp;
175};
176
177#define rte_qdma_info rte_rawdev_info
178#define rte_qdma_start(id) rte_rawdev_start(id)
179#define rte_qdma_reset(id) rte_rawdev_reset(id)
180#define rte_qdma_configure(id, cf, sz) rte_rawdev_configure(id, cf, sz)
181#define rte_qdma_dequeue_buffers(id, buf, num, ctxt) \
182 rte_rawdev_dequeue_buffers(id, buf, num, ctxt)
183#define rte_qdma_enqueue_buffers(id, buf, num, ctxt) \
184 rte_rawdev_enqueue_buffers(id, buf, num, ctxt)
185#define rte_qdma_queue_setup(id, qid, cfg, sz) \
186 rte_rawdev_queue_setup(id, qid, cfg, sz)
187
188/*TODO introduce per queue stats API in rawdew */
199void
200rte_qdma_vq_stats(struct rte_rawdev *rawdev,
201 uint16_t vq_id,
202 struct rte_qdma_vq_stats *vq_stats);
203
204#endif /* __RTE_PMD_DPAA2_QDMA_H__*/
@ RTE_QDMA_MODE_VIRTUAL
@ RTE_QDMA_MODE_HW
void rte_qdma_vq_stats(struct rte_rawdev *rawdev, uint16_t vq_id, struct rte_qdma_vq_stats *vq_stats)
uint16_t num_hw_queues
uint16_t max_hw_queues_per_core