DPDK
19.05.0
Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
drivers
raw
dpaa2_qdma
rte_pmd_dpaa2_qdma.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright 2018-2019 NXP
3
*/
4
5
#ifndef __RTE_PMD_DPAA2_QDMA_H__
6
#define __RTE_PMD_DPAA2_QDMA_H__
7
16
#define RTE_QDMA_BURST_NB_MAX 256
17
19
enum
{
24
RTE_QDMA_MODE_HW
,
33
RTE_QDMA_MODE_VIRTUAL
34
};
35
43
#define RTE_QDMA_VQ_EXCLUSIVE_PQ (1ULL)
44
46
#define RTE_QDMA_JOB_SRC_PHY (1ULL)
47
49
#define RTE_QDMA_JOB_DEST_PHY (1ULL << 1)
50
52
struct
rte_qdma_attr
{
54
uint16_t
num_hw_queues
;
55
};
56
58
struct
rte_qdma_config
{
60
uint16_t
max_hw_queues_per_core
;
62
uint16_t
max_vqs
;
64
uint8_t
mode
;
73
int
fle_pool_count
;
74
};
75
76
struct
rte_qdma_rbp {
77
uint32_t use_ultrashort:1;
78
uint32_t enable:1;
88
uint32_t dportid:4;
89
uint32_t dpfid:2;
90
uint32_t dvfid:6;
91
/*using route by port for destination */
92
uint32_t drbp:1;
102
uint32_t sportid:4;
103
uint32_t spfid:2;
104
uint32_t svfid:6;
105
/* using route by port for source */
106
uint32_t srbp:1;
107
uint32_t rsv:4;
108
};
109
111
struct
rte_qdma_vq_stats
{
113
uint8_t
exclusive_hw_queue
;
115
uint32_t
lcore_id
;
116
/* Total number of enqueues on this VQ */
117
uint64_t num_enqueues;
118
/* Total number of dequeues from this VQ */
119
uint64_t num_dequeues;
120
/* total number of pending jobs in this VQ */
121
uint64_t num_pending_jobs;
122
};
123
125
struct
rte_qdma_job
{
127
uint64_t
src
;
129
uint64_t
dest
;
131
uint32_t
len
;
133
uint32_t
flags
;
138
uint64_t
cnxt
;
145
uint16_t
status
;
146
};
147
155
int
156
rte_qdma_init
(
void
);
157
164
void
165
rte_qdma_attr_get
(
struct
rte_qdma_attr
*qdma_attr);
166
176
int
177
rte_qdma_reset
(
void
);
178
186
int
187
rte_qdma_configure
(
struct
rte_qdma_config
*qdma_config);
188
196
int
197
rte_qdma_start
(
void
);
198
213
int
214
rte_qdma_vq_create
(uint32_t lcore_id, uint32_t flags);
215
216
/*create vq for route-by-port*/
217
int
218
rte_qdma_vq_create_rbp(uint32_t lcore_id, uint32_t flags,
219
struct
rte_qdma_rbp *rbp);
220
237
int
238
rte_qdma_vq_enqueue_multi
(uint16_t vq_id,
239
struct
rte_qdma_job
**job,
240
uint16_t nb_jobs);
241
256
int
257
rte_qdma_vq_enqueue
(uint16_t vq_id,
258
struct
rte_qdma_job
*job);
259
275
int
276
rte_qdma_vq_dequeue_multi
(uint16_t vq_id,
277
struct
rte_qdma_job
**job,
278
uint16_t nb_jobs);
279
289
struct
rte_qdma_job
* __rte_experimental
290
rte_qdma_vq_dequeue
(uint16_t vq_id);
291
300
void
301
rte_qdma_vq_stats
(uint16_t vq_id,
302
struct
rte_qdma_vq_stats
*vq_stats);
303
316
int
317
rte_qdma_vq_destroy
(uint16_t vq_id);
318
332
int
333
rte_qdma_vq_destroy_rbp
(uint16_t vq_id);
337
void
338
rte_qdma_stop
(
void
);
339
343
void
344
rte_qdma_destroy
(
void
);
345
346
#endif
/* __RTE_PMD_DPAA2_QDMA_H__*/
Generated by
1.8.1.2