* Enqueue a copy operation onto the virtual DMA channel. * * This queues up a copy operation to be performed by hardware, if the 'flags' * parameter contains RTE_DMA_OP_FLAG_SUBMIT then trigger doorbell to begin * this operation, otherwise do not trigger doorbell. * * @param dev_id * The identifier of the device. * @param vchan * The identifier of virtual DMA channel. * @param src *
| 832 | * - other values < 0 on failure. |
| 833 | */ |
| 834 | static inline int |
| 835 | rte_dma_copy(int16_t dev_id, uint16_t vchan, rte_iova_t src, rte_iova_t dst, |
| 836 | uint32_t length, uint64_t flags) |
| 837 | { |
| 838 | struct rte_dma_fp_object *obj = &rte_dma_fp_objs[dev_id]; |
| 839 | |
| 840 | #ifdef RTE_DMADEV_DEBUG |
| 841 | if (!rte_dma_is_valid(dev_id) || length == 0) |
| 842 | return -EINVAL; |
| 843 | if (*obj->copy == NULL) |
| 844 | return -ENOTSUP; |
| 845 | #endif |
| 846 | |
| 847 | return (*obj->copy)(obj->dev_private, vchan, src, dst, length, flags); |
| 848 | } |
| 849 | |
| 850 | /** |
| 851 | * Enqueue a scatter-gather list copy operation onto the virtual DMA channel. |