Re: [dpdk-dev] [PATCH v9] dmadev: introduce DMA device library
From: Bruce Richardson <hidden>
Date: 2021-07-20 12:06:07
On Tue, Jul 20, 2021 at 07:12:52PM +0800, Chengwen Feng wrote:
This patch introduce 'dmadevice' which is a generic type of DMA device. The APIs of dmadev library exposes some generic operations which can enable configuration and I/O with the DMA devices. Signed-off-by: Chengwen Feng <redacted>
Apologies for late feedback. Just reporting issues as I find them working with the code. /Bruce
---
<snip>
+ +/** + * @warning + * @b EXPERIMENTAL: this API may change without prior notice. + * + * Returns the number of operations that have been completed, and the + * operations result may succeed or fail. + * + * @param dev_id + * The identifier of the device. + * @param vchan + * The identifier of virtual DMA channel. + * @param nb_cpls + * Indicates the size of status array. + * @param[out] last_idx + * The last completed operation's index. + * If not required, NULL can be passed in. + * @param[out] status + * The error code of operations that completed. + * @see enum rte_dma_status_code
The documentation should make it clear that this is an array with "nb_cpls" entries.
+ * + * @return + * The number of operations that completed. This return value must be less + * than or equal to the value of nb_cpls.
also update this to report that the appropriate number of "status" entries have been filled out.
+ */ +__rte_experimental +static inline uint16_t +rte_dmadev_completed_status(uint16_t dev_id, uint16_t vchan, + const uint16_t nb_cpls, uint16_t *last_idx, + enum rte_dma_status_code *status)
<snip>