rte_eal_devargs is useless, rte_devargs is sufficient.
Only experimental functions are changed for now.
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
}
TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
- rte_eal_devargs_insert(devargs);
+ rte_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);
- rte_eal_devargs_remove(devargs->bus->name, devargs->name);
+ rte_devargs_remove(devargs->bus->name, devargs->name);
free(dev);
}
}
TAILQ_REMOVE(&vdev_device_list, dev, next);
devargs = dev->device.devargs;
- rte_eal_devargs_remove(devargs->bus->name, devargs->name);
+ rte_devargs_remove(devargs->bus->name, devargs->name);
free(dev);
unlock:
if (custom_scan->callback != NULL)
/*
* the callback should update devargs list
- * by calling rte_eal_devargs_insert() with
+ * by calling rte_devargs_insert() with
* devargs.bus = rte_bus_find_by_name("vdev");
* devargs.type = RTE_DEVTYPE_VIRTUAL;
* devargs.policy = RTE_DEV_WHITELISTED;
d = &sdev->devargs;
DEBUG("%s", args);
- ret = rte_eal_devargs_parse(d, "%s", args);
+ ret = rte_devargs_parse(d, "%s", args);
if (ret) {
DEBUG("devargs parsing failed with code %d", ret);
return ret;
else
snprintf(devstr, sizeof(devstr), "%s",
rte_eth_devices[pid].device->name);
- ret = rte_eal_devargs_parse(da, "%s", devstr);
+ ret = rte_devargs_parse(da, "%s", devstr);
if (ret) {
ERROR("Probed devargs parsing failed with code"
" %d", ret);
if (da == NULL)
return -ENOMEM;
- ret = rte_eal_devargs_parse(da, "%s:%s,%s",
+ ret = rte_devargs_parse(da, "%s:%s,%s",
busname, devname, devargs);
if (ret)
goto err_devarg;
- ret = rte_eal_devargs_insert(da);
+ ret = rte_devargs_insert(da);
if (ret)
goto err_devarg;
return 0;
err_devarg:
- if (rte_eal_devargs_remove(busname, devname)) {
+ if (rte_devargs_remove(busname, devname)) {
free(da->args);
free(da);
}
if (ret)
RTE_LOG(ERR, EAL, "Driver cannot detach the device (%s)\n",
dev->name);
- rte_eal_devargs_remove(busname, devname);
+ rte_devargs_remove(busname, devname);
return ret;
}
}
int __rte_experimental
-rte_eal_devargs_parse(struct rte_devargs *da, const char *format, ...)
+rte_devargs_parse(struct rte_devargs *da, const char *format, ...)
{
struct rte_bus *bus = NULL;
va_list ap;
}
int __rte_experimental
-rte_eal_devargs_insert(struct rte_devargs *da)
+rte_devargs_insert(struct rte_devargs *da)
{
int ret;
- ret = rte_eal_devargs_remove(da->bus->name, da->name);
+ ret = rte_devargs_remove(da->bus->name, da->name);
if (ret < 0)
return ret;
TAILQ_INSERT_TAIL(&devargs_list, da, next);
if (devargs == NULL)
goto fail;
- if (rte_eal_devargs_parse(devargs, "%s", dev))
+ if (rte_devargs_parse(devargs, "%s", dev))
goto fail;
devargs->type = devtype;
bus = devargs->bus;
}
int __rte_experimental
-rte_eal_devargs_remove(const char *busname, const char *devname)
+rte_devargs_remove(const char *busname, const char *devname)
{
struct rte_devargs *d;
void *tmp;
/* bus-aware rte_devargs iterator. */
__rte_experimental
struct rte_devargs *
-rte_eal_devargs_next(const char *busname, const struct rte_devargs *start)
+rte_devargs_next(const char *busname, const struct rte_devargs *start)
{
struct rte_devargs *da;
* - 0 on success.
* - Negative errno on error.
*/
-int __rte_experimental
-rte_eal_devargs_parse(struct rte_devargs *da,
- const char *format, ...)
+__rte_experimental
+int
+rte_devargs_parse(struct rte_devargs *da,
+ const char *format, ...)
__attribute__((format(printf, 2, 0)));
/**
* - 0 on success
* - Negative on error.
*/
-int __rte_experimental
-rte_eal_devargs_insert(struct rte_devargs *da);
+__rte_experimental
+int
+rte_devargs_insert(struct rte_devargs *da);
/**
* Add a device to the user device list
- * See rte_eal_devargs_parse() for details.
+ * See rte_devargs_parse() for details.
*
* @param devtype
* The type of the device.
* <0 on error.
* >0 if the devargs was not within the user device list.
*/
-int __rte_experimental rte_eal_devargs_remove(const char *busname,
- const char *devname);
+__rte_experimental
+int rte_devargs_remove(const char *busname,
+ const char *devname);
/**
* Count the number of user devices of a specified type
*/
__rte_experimental
struct rte_devargs *
-rte_eal_devargs_next(const char *busname, const struct rte_devargs *start);
+rte_devargs_next(const char *busname, const struct rte_devargs *start);
/**
* Iterate over all rte_devargs for a specific bus.
*/
#define RTE_EAL_DEVARGS_FOREACH(busname, da) \
- for (da = rte_eal_devargs_next(busname, NULL); \
+ for (da = rte_devargs_next(busname, NULL); \
da != NULL; \
- da = rte_eal_devargs_next(busname, da)) \
+ da = rte_devargs_next(busname, da)) \
#ifdef __cplusplus
}
rte_dev_event_callback_unregister;
rte_dev_event_monitor_start;
rte_dev_event_monitor_stop;
+ rte_devargs_insert;
+ rte_devargs_next;
+ rte_devargs_parse;
+ rte_devargs_remove;
rte_eal_cleanup;
- rte_eal_devargs_insert;
- rte_eal_devargs_next;
- rte_eal_devargs_parse;
- rte_eal_devargs_remove;
rte_eal_hotplug_add;
rte_eal_hotplug_remove;
rte_eal_mbuf_user_pool_ops;