}
TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
- TAILQ_INSERT_TAIL(&devargs_list, devargs, next);
+ rte_eal_devargs_insert(devargs);
if (p_dev)
*p_dev = dev;
/* If fails, remove it from vdev list */
devargs = dev->device.devargs;
TAILQ_REMOVE(&vdev_device_list, dev, next);
- TAILQ_REMOVE(&devargs_list, devargs, next);
- free(devargs->args);
- free(devargs);
+ rte_eal_devargs_remove(devargs->bus->name, devargs->name);
free(dev);
}
}
TAILQ_REMOVE(&vdev_device_list, dev, next);
devargs = dev->device.devargs;
- TAILQ_REMOVE(&devargs_list, devargs, next);
- free(devargs->args);
- free(devargs);
+ rte_eal_devargs_remove(devargs->bus->name, devargs->name);
free(dev);
unlock:
rte_spinlock_unlock(&vdev_custom_scan_lock);
/* for virtual devices we scan the devargs_list populated via cmdline */
- TAILQ_FOREACH(devargs, &devargs_list, next) {
-
- if (devargs->bus != &rte_vdev_bus)
- continue;
+ RTE_EAL_DEVARGS_FOREACH("vdev", devargs) {
dev = calloc(1, sizeof(*dev));
if (!dev)