DPDK  24.07.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  /* Virtual Function Active */
48  uint32_t vfa:1;
49  uint32_t rsv:3;
50 };
51 
55  uint64_t src;
57  uint64_t dest;
59  uint32_t len;
61  uint32_t flags;
68  uint16_t status;
69  uint16_t vq_id;
74  void *usr_elem;
75 };
76 
89 __rte_experimental
90 void rte_dpaa2_qdma_vchan_fd_us_enable(int16_t dev_id, uint16_t vchan);
91 
104 __rte_experimental
105 void rte_dpaa2_qdma_vchan_internal_sg_enable(int16_t dev_id, uint16_t vchan);
106 
121 __rte_experimental
122 void rte_dpaa2_qdma_vchan_rbp_enable(int16_t dev_id, uint16_t vchan,
123  struct rte_dpaa2_qdma_rbp *rbp_config);
124 
150 __rte_experimental
151 int rte_dpaa2_qdma_copy_multi(int16_t dev_id, uint16_t vchan,
152  struct rte_dpaa2_qdma_job **jobs, uint16_t nb_cpls);
153 
173 __rte_experimental
174 uint16_t rte_dpaa2_qdma_completed_multi(int16_t dev_id, uint16_t vchan,
175  struct rte_dpaa2_qdma_job **jobs, uint16_t nb_cpls);
176 
177 #endif /* _RTE_PMD_DPAA2_QDMA_H_ */