* Return the number of operations that have been completed, and the operations * result may succeed or fail. * Once an operation has been reported as completed successfully, the results of that * operation will be visible to all cores on the system. * * @param dev_id * The identifier of the device. * @param vchan * The identifier of virtual DMA channel. * @param nb_cpls * Indicates
| 1050 | * status array are also set. |
| 1051 | */ |
| 1052 | static inline uint16_t |
| 1053 | rte_dma_completed_status(int16_t dev_id, uint16_t vchan, |
| 1054 | const uint16_t nb_cpls, uint16_t *last_idx, |
| 1055 | enum rte_dma_status_code *status) |
| 1056 | { |
| 1057 | struct rte_dma_fp_object *obj = &rte_dma_fp_objs[dev_id]; |
| 1058 | uint16_t idx; |
| 1059 | |
| 1060 | #ifdef RTE_DMADEV_DEBUG |
| 1061 | if (!rte_dma_is_valid(dev_id) || nb_cpls == 0 || status == NULL) |
| 1062 | return 0; |
| 1063 | if (*obj->completed_status == NULL) |
| 1064 | return 0; |
| 1065 | #endif |
| 1066 | |
| 1067 | if (last_idx == NULL) |
| 1068 | last_idx = &idx; |
| 1069 | |
| 1070 | return (*obj->completed_status)(obj->dev_private, vchan, nb_cpls, |
| 1071 | last_idx, status); |
| 1072 | } |
| 1073 | |
| 1074 | /** |
| 1075 | * Check remaining capacity in descriptor ring for the current burst. |