DPDK  18.08.1
rte_pmd_dpaa2_qdma.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2018 NXP
3  */
4 
5 #ifndef __RTE_PMD_DPAA2_QDMA_H__
6 #define __RTE_PMD_DPAA2_QDMA_H__
7 
16 enum {
31 };
32 
40 #define RTE_QDMA_VQ_EXCLUSIVE_PQ (1ULL)
41 
43 #define RTE_QDMA_JOB_SRC_PHY (1ULL)
44 
46 #define RTE_QDMA_JOB_DEST_PHY (1ULL << 1)
47 
49 struct rte_qdma_attr {
51  uint16_t num_hw_queues;
52 };
53 
59  uint16_t max_vqs;
61  uint8_t mode;
71 };
72 
78  uint32_t lcore_id;
79  /* Total number of enqueues on this VQ */
80  uint64_t num_enqueues;
81  /* Total number of dequeues from this VQ */
82  uint64_t num_dequeues;
83  /* total number of pending jobs in this VQ */
84  uint64_t num_pending_jobs;
85 };
86 
88 struct rte_qdma_job {
90  uint64_t src;
92  uint64_t dest;
94  uint32_t len;
96  uint32_t flags;
101  uint64_t cnxt;
106  uint8_t status;
107 };
108 
116 int __rte_experimental
117 rte_qdma_init(void);
118 
125 void __rte_experimental
126 rte_qdma_attr_get(struct rte_qdma_attr *qdma_attr);
127 
137 int __rte_experimental
138 rte_qdma_reset(void);
139 
147 int __rte_experimental
148 rte_qdma_configure(struct rte_qdma_config *qdma_config);
149 
157 int __rte_experimental
158 rte_qdma_start(void);
159 
174 int __rte_experimental
175 rte_qdma_vq_create(uint32_t lcore_id, uint32_t flags);
176 
193 int __rte_experimental
194 rte_qdma_vq_enqueue_multi(uint16_t vq_id,
195  struct rte_qdma_job **job,
196  uint16_t nb_jobs);
197 
212 int __rte_experimental
213 rte_qdma_vq_enqueue(uint16_t vq_id,
214  struct rte_qdma_job *job);
215 
230 int __rte_experimental
231 rte_qdma_vq_dequeue_multi(uint16_t vq_id,
232  struct rte_qdma_job **job,
233  uint16_t nb_jobs);
234 
244 struct rte_qdma_job * __rte_experimental
245 rte_qdma_vq_dequeue(uint16_t vq_id);
246 
255 void __rte_experimental
256 rte_qdma_vq_stats(uint16_t vq_id,
257  struct rte_qdma_vq_stats *vq_stats);
258 
271 int __rte_experimental
272 rte_qdma_vq_destroy(uint16_t vq_id);
273 
277 void __rte_experimental
278 rte_qdma_stop(void);
279 
283 void __rte_experimental
284 rte_qdma_destroy(void);
285 
286 #endif /* __RTE_PMD_DPAA2_QDMA_H__*/