[dpdk-dev] [PATCH v3 13/17] dma/idxd: add vchan status function
Conor Walsh
conor.walsh at intel.com
Thu Sep 9 13:26:19 CEST 2021
> When testing dmadev drivers, it is useful to have the HW device in a known
> state. This patch adds the implementation of the function which will wait
> for the device to be idle (all jobs completed) before proceeding.
>
> Signed-off-by: Kevin Laatz <kevin.laatz at intel.com>
<snip>
> +int
> +idxd_vchan_status(const struct rte_dmadev *dev, uint16_t vchan __rte_unused,
> + enum rte_dmadev_vchan_status *status)
> +{
> + struct idxd_dmadev *idxd = dev->dev_private;
> + uint16_t last_batch_write = idxd->batch_idx_write == 0 ? idxd->max_batches :
> + idxd->batch_idx_write - 1;
> + uint8_t bstatus = (idxd->batch_comp_ring[last_batch_write].status != 0);
> +
> + *status = bstatus ? RTE_DMA_VCHAN_IDLE : RTE_DMA_VCHAN_ACTIVE;
> +
> + return 0;
> +}
Should there be a comment noting that RTE_DMA_VCHAN_HALTED_ERROR does
not apply to IDXD?
Reviewed-by: Conor Walsh <conor.walsh at intel.com>
More information about the dev
mailing list