151 #include <rte_compat.h> 158 #define RTE_DMADEV_DEFAULT_MAX 64 234 #define RTE_DMA_FOREACH_DEV(p) \ 235 for (p = rte_dma_next_dev(0); \ 237 p = rte_dma_next_dev(p + 1)) 244 #define RTE_DMA_CAPA_MEM_TO_MEM RTE_BIT64(0) 246 #define RTE_DMA_CAPA_MEM_TO_DEV RTE_BIT64(1) 248 #define RTE_DMA_CAPA_DEV_TO_MEM RTE_BIT64(2) 250 #define RTE_DMA_CAPA_DEV_TO_DEV RTE_BIT64(3) 257 #define RTE_DMA_CAPA_SVA RTE_BIT64(4) 263 #define RTE_DMA_CAPA_SILENT RTE_BIT64(5) 271 #define RTE_DMA_CAPA_HANDLES_ERRORS RTE_BIT64(6) 276 #define RTE_DMA_CAPA_OPS_COPY RTE_BIT64(32) 278 #define RTE_DMA_CAPA_OPS_COPY_SG RTE_BIT64(33) 280 #define RTE_DMA_CAPA_OPS_FILL RTE_BIT64(34) 553 uint64_t reserved[2];
631 #define RTE_DMA_ALL_VCHAN 0xFFFFu 811 #define RTE_DMA_OP_FLAG_FENCE RTE_BIT64(0) 816 #define RTE_DMA_OP_FLAG_SUBMIT RTE_BIT64(1) 821 #define RTE_DMA_OP_FLAG_LLC RTE_BIT64(2) 856 uint32_t length, uint64_t flags)
858 struct rte_dma_fp_object *obj = &rte_dma_fp_objs[dev_id];
860 #ifdef RTE_DMADEV_DEBUG 863 if (*obj->copy == NULL)
867 return (*obj->copy)(obj->dev_private, vchan, src, dst, length, flags);
906 struct rte_dma_sge *dst, uint16_t nb_src, uint16_t nb_dst,
909 struct rte_dma_fp_object *obj = &rte_dma_fp_objs[dev_id];
911 #ifdef RTE_DMADEV_DEBUG 913 nb_src == 0 || nb_dst == 0)
915 if (*obj->copy_sg == NULL)
919 return (*obj->copy_sg)(obj->dev_private, vchan, src, dst, nb_src,
955 rte_iova_t dst, uint32_t length, uint64_t flags)
957 struct rte_dma_fp_object *obj = &rte_dma_fp_objs[dev_id];
959 #ifdef RTE_DMADEV_DEBUG 962 if (*obj->fill == NULL)
966 return (*obj->fill)(obj->dev_private, vchan, pattern, dst, length,
991 struct rte_dma_fp_object *obj = &rte_dma_fp_objs[dev_id];
993 #ifdef RTE_DMADEV_DEBUG 996 if (*obj->submit == NULL)
1000 return (*obj->submit)(obj->dev_private, vchan);
1029 static inline uint16_t
1031 uint16_t *last_idx,
bool *has_error)
1033 struct rte_dma_fp_object *obj = &rte_dma_fp_objs[dev_id];
1037 #ifdef RTE_DMADEV_DEBUG 1040 if (*obj->completed == NULL)
1052 if (last_idx == NULL)
1054 if (has_error == NULL)
1058 return (*obj->completed)(obj->dev_private, vchan, nb_cpls, last_idx,
1092 static inline uint16_t
1094 const uint16_t nb_cpls, uint16_t *last_idx,
1097 struct rte_dma_fp_object *obj = &rte_dma_fp_objs[dev_id];
1100 #ifdef RTE_DMADEV_DEBUG 1103 if (*obj->completed_status == NULL)
1107 if (last_idx == NULL)
1110 return (*obj->completed_status)(obj->dev_private, vchan, nb_cpls,
1130 static inline uint16_t
1133 struct rte_dma_fp_object *obj = &rte_dma_fp_objs[dev_id];
1135 #ifdef RTE_DMADEV_DEBUG 1138 if (*obj->burst_capacity == NULL)
1141 return (*obj->burst_capacity)(obj->dev_private, vchan);
__rte_experimental uint16_t rte_dma_count_avail(void)
__rte_experimental int rte_dma_dump(int16_t dev_id, FILE *f)
__rte_experimental bool rte_dma_is_valid(int16_t dev_id)
__rte_experimental int rte_dma_info_get(int16_t dev_id, struct rte_dma_info *dev_info)
static __rte_experimental int rte_dma_copy_sg(int16_t dev_id, uint16_t vchan, struct rte_dma_sge *src, struct rte_dma_sge *dst, uint16_t nb_src, uint16_t nb_dst, uint64_t flags)
__rte_experimental int rte_dma_get_dev_id_by_name(const char *name)
__rte_experimental int rte_dma_vchan_setup(int16_t dev_id, uint16_t vchan, const struct rte_dma_vchan_conf *conf)
static __rte_experimental uint16_t rte_dma_completed_status(int16_t dev_id, uint16_t vchan, const uint16_t nb_cpls, uint16_t *last_idx, enum rte_dma_status_code *status)
__rte_experimental int rte_dma_stats_get(int16_t dev_id, uint16_t vchan, struct rte_dma_stats *stats)
__rte_experimental int rte_dma_stop(int16_t dev_id)
__rte_experimental int16_t rte_dma_next_dev(int16_t start_dev_id)
static __rte_experimental uint16_t rte_dma_completed(int16_t dev_id, uint16_t vchan, const uint16_t nb_cpls, uint16_t *last_idx, bool *has_error)
__rte_experimental int rte_dma_close(int16_t dev_id)
static __rte_experimental int rte_dma_copy(int16_t dev_id, uint16_t vchan, rte_iova_t src, rte_iova_t dst, uint32_t length, uint64_t flags)
__rte_experimental int rte_dma_stats_reset(int16_t dev_id, uint16_t vchan)
__rte_experimental int rte_dma_start(int16_t dev_id)
static __rte_experimental uint16_t rte_dma_burst_capacity(int16_t dev_id, uint16_t vchan)
__rte_experimental int rte_dma_dev_max(size_t dev_max)
static __rte_experimental int rte_dma_fill(int16_t dev_id, uint16_t vchan, uint64_t pattern, rte_iova_t dst, uint32_t length, uint64_t flags)
__rte_experimental int rte_dma_configure(int16_t dev_id, const struct rte_dma_conf *dev_conf)
static __rte_experimental int rte_dma_submit(int16_t dev_id, uint16_t vchan)