struct rte_device *
rte_vdpa_get_rte_device(struct rte_vdpa_device *vdpa_dev);
-/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
- * Get current available vdpa device number
- *
- * @return
- * available vdpa device number
- */
-__rte_experimental
-int
-rte_vdpa_get_device_num(void);
-
/**
* @warning
* @b EXPERIMENTAL: this API may change without prior notice
static struct vdpa_device_list vdpa_device_list =
TAILQ_HEAD_INITIALIZER(vdpa_device_list);
static rte_spinlock_t vdpa_device_list_lock = RTE_SPINLOCK_INITIALIZER;
-static uint32_t vdpa_device_num;
/* Unsafe, needs to be called with vdpa_device_list_lock held */
dev->device = rte_dev;
dev->ops = ops;
TAILQ_INSERT_TAIL(&vdpa_device_list, dev, next);
- vdpa_device_num++;
out_unlock:
rte_spinlock_unlock(&vdpa_device_list_lock);
TAILQ_REMOVE(&vdpa_device_list, dev, next);
rte_free(dev);
- vdpa_device_num--;
ret = 0;
break;
}
return ret;
}
-int
-rte_vdpa_get_device_num(void)
-{
- return vdpa_device_num;
-}
-
int
rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m)
{