* Check remaining capacity in descriptor ring for the current burst. * * @param dev_id * The identifier of the device. * @param vchan * The identifier of virtual DMA channel. * * @return * - Remaining space in the descriptor ring for the current burst. * - 0 on error */
| 1084 | * - 0 on error |
| 1085 | */ |
| 1086 | static inline uint16_t |
| 1087 | rte_dma_burst_capacity(int16_t dev_id, uint16_t vchan) |
| 1088 | { |
| 1089 | struct rte_dma_fp_object *obj = &rte_dma_fp_objs[dev_id]; |
| 1090 | |
| 1091 | #ifdef RTE_DMADEV_DEBUG |
| 1092 | if (!rte_dma_is_valid(dev_id)) |
| 1093 | return 0; |
| 1094 | if (*obj->burst_capacity == NULL) |
| 1095 | return 0; |
| 1096 | #endif |
| 1097 | return (*obj->burst_capacity)(obj->dev_private, vchan); |
| 1098 | } |
| 1099 | |
| 1100 | #ifdef __cplusplus |
| 1101 | } |