* Trigger hardware to begin performing enqueued operations. * * Writes the "doorbell" to the hardware to trigger it * to begin the operations previously enqueued by rte_dma_copy/fill(). * * @param dev_id * The identifier of the device. * @param vchan * The identifier of virtual DMA channel. * * @return * 0 on success. Otherwise negative value is returned. */
| 954 | * 0 on success. Otherwise negative value is returned. |
| 955 | */ |
| 956 | static inline int |
| 957 | rte_dma_submit(int16_t dev_id, uint16_t vchan) |
| 958 | { |
| 959 | struct rte_dma_fp_object *obj = &rte_dma_fp_objs[dev_id]; |
| 960 | |
| 961 | #ifdef RTE_DMADEV_DEBUG |
| 962 | if (!rte_dma_is_valid(dev_id)) |
| 963 | return -EINVAL; |
| 964 | if (*obj->submit == NULL) |
| 965 | return -ENOTSUP; |
| 966 | #endif |
| 967 | |
| 968 | return (*obj->submit)(obj->dev_private, vchan); |
| 969 | } |
| 970 | |
| 971 | /** |
| 972 | * Return the number of operations that have been successfully completed. |