DPDK  23.03.0
rte_pmd_dpaa2_qdma.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2021-2022 NXP
3  */
4 
5 #ifndef _RTE_PMD_DPAA2_QDMA_H_
6 #define _RTE_PMD_DPAA2_QDMA_H_
7 
8 #include <rte_compat.h>
9 
11 #define RTE_DPAA2_QDMA_JOB_SRC_PHY (1ULL << 30)
12 
14 #define RTE_DPAA2_QDMA_JOB_DEST_PHY (1ULL << 31)
15 
16 struct rte_dpaa2_qdma_rbp {
17  uint32_t use_ultrashort:1;
18  uint32_t enable:1;
28  uint32_t dportid:4;
29  uint32_t dpfid:2;
30  uint32_t dvfid:6;
31  /*using route by port for destination */
32  uint32_t drbp:1;
42  uint32_t sportid:4;
43  uint32_t spfid:2;
44  uint32_t svfid:6;
45  /* using route by port for source */
46  uint32_t srbp:1;
47  uint32_t rsv:4;
48 };
49 
53  uint64_t src;
55  uint64_t dest;
57  uint32_t len;
59  uint32_t flags;
66  uint16_t status;
67  uint16_t vq_id;
72  void *usr_elem;
73 };
74 
87 __rte_experimental
88 void rte_dpaa2_qdma_vchan_fd_us_enable(int16_t dev_id, uint16_t vchan);
89 
102 __rte_experimental
103 void rte_dpaa2_qdma_vchan_internal_sg_enable(int16_t dev_id, uint16_t vchan);
104 
119 __rte_experimental
120 void rte_dpaa2_qdma_vchan_rbp_enable(int16_t dev_id, uint16_t vchan,
121  struct rte_dpaa2_qdma_rbp *rbp_config);
122 
148 __rte_experimental
149 int rte_dpaa2_qdma_copy_multi(int16_t dev_id, uint16_t vchan,
150  struct rte_dpaa2_qdma_job **jobs, uint16_t nb_cpls);
151 
171 __rte_experimental
172 uint16_t rte_dpaa2_qdma_completed_multi(int16_t dev_id, uint16_t vchan,
173  struct rte_dpaa2_qdma_job **jobs, uint16_t nb_cpls);
174 
175 #endif /* _RTE_PMD_DPAA2_QDMA_H_ */