static int16_t dma_devices_max;
struct rte_dma_fp_object *rte_dma_fp_objs;
-struct rte_dma_dev *rte_dma_devices;
+static struct rte_dma_dev *rte_dma_devices;
static struct {
/* Hold the dev_max information of the primary process. This field is
* set by the primary process and is read by the secondary process.
return 0;
}
+int16_t
+rte_dma_next_dev(int16_t start_dev_id)
+{
+ int16_t dev_id = start_dev_id;
+ while (dev_id < dma_devices_max && rte_dma_devices[dev_id].state == RTE_DMA_DEV_UNUSED)
+ dev_id++;
+
+ if (dev_id < dma_devices_max)
+ return dev_id;
+
+ return -1;
+}
+
static int
dma_check_name(const char *name)
{
{ RTE_DMA_CAPA_DEV_TO_DEV, "dev2dev" },
{ RTE_DMA_CAPA_SVA, "sva" },
{ RTE_DMA_CAPA_SILENT, "silent" },
+ { RTE_DMA_CAPA_HANDLES_ERRORS, "handles_errors" },
{ RTE_DMA_CAPA_OPS_COPY, "copy" },
{ RTE_DMA_CAPA_OPS_COPY_SG, "copy_sg" },
{ RTE_DMA_CAPA_OPS_FILL, "fill" },