rte_eal_devargs is redundant.
Make it concise.

Signed-off-by: Gaetan Rivet <gaetan.ri...@6wind.com>
---
 app/test-pmd/cmdline.c                          |  2 +-
 drivers/net/failsafe/failsafe_args.c            |  4 ++--
 examples/bond/main.c                            |  2 +-
 lib/librte_eal/bsdapp/eal/rte_eal_version.map   | 12 ++++++------
 lib/librte_eal/common/eal_common_dev.c          |  8 ++++----
 lib/librte_eal/common/eal_common_devargs.c      | 18 +++++++++---------
 lib/librte_eal/common/eal_common_options.c      |  4 ++--
 lib/librte_eal/common/eal_common_vdev.c         |  4 ++--
 lib/librte_eal/common/include/rte_devargs.h     | 18 +++++++++---------
 lib/librte_eal/linuxapp/eal/rte_eal_version.map | 12 ++++++------
 lib/librte_ether/rte_ethdev.c                   |  2 +-
 test/test/commands.c                            |  2 +-
 12 files changed, 44 insertions(+), 44 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 1204604..3b338e5 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8322,7 +8322,7 @@ static void cmd_dump_parsed(void *parsed_result,
        else if (!strcmp(res->dump, "dump_mempool"))
                rte_mempool_list_dump(stdout);
        else if (!strcmp(res->dump, "dump_devargs"))
-               rte_eal_devargs_dump(stdout);
+               rte_devargs_dump(stdout);
        else if (!strcmp(res->dump, "dump_log_types"))
                rte_log_dump(stdout);
 }
diff --git a/drivers/net/failsafe/failsafe_args.c 
b/drivers/net/failsafe/failsafe_args.c
index 0c98264..79c90cf 100644
--- a/drivers/net/failsafe/failsafe_args.c
+++ b/drivers/net/failsafe/failsafe_args.c
@@ -93,10 +93,10 @@ fs_parse_device(struct sub_device *sdev, char *args)
        bus = rte_bus_find_by_device_name(args);
        if (bus == NULL)
                /* args may contain the bus name */
-               ret = rte_eal_devargs_parse(d, "%s", args);
+               ret = rte_devargs_parse(d, "%s", args);
        else
                /* args is a device name */
-               ret = rte_eal_devargs_parse(d, "%s:%s",
+               ret = rte_devargs_parse(d, "%s:%s",
                                        bus->name, args);
        if (ret) {
                DEBUG("devargs parsing failed with code %d", ret);
diff --git a/examples/bond/main.c b/examples/bond/main.c
index cb55552..420ba1f 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -744,7 +744,7 @@ main(int argc, char *argv[])
 
        /* init EAL */
        ret = rte_eal_init(argc, argv);
-       rte_eal_devargs_dump(stdout);
+       rte_devargs_dump(stdout);
        if (ret < 0)
                rte_exit(EXIT_FAILURE, "Error with EAL initialization\n");
        argc -= ret;
diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map 
b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
index aae8d32..0913a52 100644
--- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
@@ -19,8 +19,6 @@ DPDK_2.0 {
        rte_dump_tailq;
        rte_eal_alarm_cancel;
        rte_eal_alarm_set;
-       rte_eal_devargs_add;
-       rte_eal_devargs_dump;
        rte_eal_get_configuration;
        rte_eal_get_lcore_state;
        rte_eal_get_physmem_layout;
@@ -186,10 +184,12 @@ DPDK_17.08 {
 EXPERIMENTAL {
        global:
 
-       rte_eal_devargs_insert;
-       rte_eal_devargs_next;
-       rte_eal_devargs_parse;
-       rte_eal_devargs_remove;
+       rte_devargs_add;
+       rte_devargs_dump;
+       rte_devargs_insert;
+       rte_devargs_next;
+       rte_devargs_parse;
+       rte_devargs_remove;
        rte_eal_hotplug_add;
        rte_eal_hotplug_remove;
        rte_service_component_register;
diff --git a/lib/librte_eal/common/eal_common_dev.c 
b/lib/librte_eal/common/eal_common_dev.c
index b965e56..5608690 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -151,12 +151,12 @@ int rte_eal_hotplug_add(const char *busname, const char 
*devname,
        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;
 
@@ -181,7 +181,7 @@ int rte_eal_hotplug_add(const char *busname, const char 
*devname,
        return 0;
 
 err_devarg:
-       if (rte_eal_devargs_remove(busname, devname)) {
+       if (rte_devargs_remove(busname, devname)) {
                free(da->args);
                free(da);
        }
@@ -216,6 +216,6 @@ int rte_eal_hotplug_remove(const char *busname, const char 
*devname)
        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;
 }
diff --git a/lib/librte_eal/common/eal_common_devargs.c 
b/lib/librte_eal/common/eal_common_devargs.c
index 82c8573..d5e36d2 100644
--- a/lib/librte_eal/common/eal_common_devargs.c
+++ b/lib/librte_eal/common/eal_common_devargs.c
@@ -60,7 +60,7 @@ bus_name_cmp(const struct rte_bus *bus, const void *name)
 }
 
 int
-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;
@@ -112,11 +112,11 @@ rte_eal_devargs_parse(struct rte_devargs *da, const char 
*format, ...)
 }
 
 int
-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);
@@ -124,7 +124,7 @@ rte_eal_devargs_insert(struct rte_devargs *da)
 }
 
 int
-rte_eal_devargs_add(const char *dev)
+rte_devargs_add(const char *dev)
 {
        struct rte_devargs *devargs = NULL;
 
@@ -132,9 +132,9 @@ rte_eal_devargs_add(const char *dev)
        if (devargs == NULL)
                goto fail;
 
-       if (rte_eal_devargs_parse(devargs, "%s", dev))
+       if (rte_devargs_parse(devargs, "%s", dev))
                goto fail;
-       if (rte_eal_devargs_insert(devargs))
+       if (rte_devargs_insert(devargs))
                goto fail;
        return 0;
 
@@ -148,7 +148,7 @@ rte_eal_devargs_add(const char *dev)
 }
 
 int
-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;
@@ -167,7 +167,7 @@ rte_eal_devargs_remove(const char *busname, const char 
*devname)
 
 /* dump the user devices on the console */
 void
-rte_eal_devargs_dump(FILE *f)
+rte_devargs_dump(FILE *f)
 {
        struct rte_devargs *devargs;
 
@@ -181,7 +181,7 @@ rte_eal_devargs_dump(FILE *f)
 
 /* bus-aware rte_devargs iterator. */
 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;
 
diff --git a/lib/librte_eal/common/eal_common_options.c 
b/lib/librte_eal/common/eal_common_options.c
index b7591fd..a3238fb 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -181,7 +181,7 @@ eal_option_device_parse(void)
 
        TAILQ_FOREACH_SAFE(devopt, &devopt_list, next, tmp) {
                if (ret == 0) {
-                       ret = rte_eal_devargs_add(devopt->arg);
+                       ret = rte_devargs_add(devopt->arg);
                        if (ret)
                                RTE_LOG(ERR, EAL, "Unable to parse device 
'%s'\n",
                                        devopt->arg);
@@ -1125,7 +1125,7 @@ eal_parse_common_option(int opt, const char *optarg,
                struct rte_devargs da;
                int ret;
 
-               if (rte_eal_devargs_parse(&da, optarg) < 0)
+               if (rte_devargs_parse(&da, optarg) < 0)
                        return -1;
                ret = rte_bus_probe_mode_set(da.bus->name,
                                        RTE_BUS_PROBE_WHITELIST);
diff --git a/lib/librte_eal/common/eal_common_vdev.c 
b/lib/librte_eal/common/eal_common_vdev.c
index a7410a6..583648d 100644
--- a/lib/librte_eal/common/eal_common_vdev.c
+++ b/lib/librte_eal/common/eal_common_vdev.c
@@ -192,7 +192,7 @@ rte_vdev_init(const char *name, const char *args)
                goto fail;
        }
 
-       rte_eal_devargs_insert(devargs);
+       rte_devargs_insert(devargs);
 
        TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
        return 0;
@@ -242,7 +242,7 @@ rte_vdev_uninit(const char *name)
 
        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);
        return 0;
diff --git a/lib/librte_eal/common/include/rte_devargs.h 
b/lib/librte_eal/common/include/rte_devargs.h
index 499f7e3..e46686d 100644
--- a/lib/librte_eal/common/include/rte_devargs.h
+++ b/lib/librte_eal/common/include/rte_devargs.h
@@ -92,8 +92,8 @@ struct rte_devargs {
  *   - Negative errno on error.
  */
 int
-rte_eal_devargs_parse(struct rte_devargs *da,
-                     const char *format, ...);
+rte_devargs_parse(struct rte_devargs *da,
+                 const char *format, ...);
 
 /**
  * Insert an rte_devargs in the global list.
@@ -106,7 +106,7 @@ rte_eal_devargs_parse(struct rte_devargs *da,
  *   - Negative on error.
  */
 int
-rte_eal_devargs_insert(struct rte_devargs *da);
+rte_devargs_insert(struct rte_devargs *da);
 
 /**
  * Add a device to the user device list
@@ -127,7 +127,7 @@ rte_eal_devargs_insert(struct rte_devargs *da);
  *   - 0 on success
  *   - A negative value on error
  */
-int rte_eal_devargs_add(const char *devargs_str);
+int rte_devargs_add(const char *devargs_str);
 
 /**
  * Remove a device from the user device list.
@@ -145,7 +145,7 @@ int rte_eal_devargs_add(const char *devargs_str);
  *   <0 on error.
  *   >0 if the devargs was not within the user device list.
  */
-int rte_eal_devargs_remove(const char *busname, const char *devname);
+int rte_devargs_remove(const char *busname, const char *devname);
 
 /**
  * This function dumps the list of user device and their arguments.
@@ -153,7 +153,7 @@ int rte_eal_devargs_remove(const char *busname, const char 
*devname);
  * @param f
  *   A pointer to a file for output
  */
-void rte_eal_devargs_dump(FILE *f);
+void rte_devargs_dump(FILE *f);
 
 /**
  * Find next rte_devargs matching the provided bus name.
@@ -171,15 +171,15 @@ void rte_eal_devargs_dump(FILE *f);
  *   NULL if there is none.
  */
 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
 }
diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map 
b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
index 323f799..87b9a3b 100644
--- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
@@ -19,8 +19,6 @@ DPDK_2.0 {
        rte_dump_tailq;
        rte_eal_alarm_cancel;
        rte_eal_alarm_set;
-       rte_eal_devargs_add;
-       rte_eal_devargs_dump;
        rte_eal_get_configuration;
        rte_eal_get_lcore_state;
        rte_eal_get_physmem_layout;
@@ -190,10 +188,12 @@ DPDK_17.08 {
 EXPERIMENTAL {
        global:
 
-       rte_eal_devargs_insert;
-       rte_eal_devargs_next;
-       rte_eal_devargs_parse;
-       rte_eal_devargs_remove;
+       rte_devargs_add;
+       rte_devargs_dump;
+       rte_devargs_insert;
+       rte_devargs_next;
+       rte_devargs_parse;
+       rte_devargs_remove;
        rte_eal_hotplug_add;
        rte_eal_hotplug_remove;
        rte_service_component_register;
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 618f576..2f3f721 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -386,7 +386,7 @@ rte_eth_dev_attach(const char *devstr, uint16_t *port_id)
        }
 
        /* parse device, then retrieve device name and args */
-       if (rte_eal_devargs_parse(&devargs, "%s", devstr))
+       if (rte_devargs_parse(&devargs, "%s", devstr))
                goto err;
        name = devargs.name;
        args = devargs.args;
diff --git a/test/test/commands.c b/test/test/commands.c
index 4097a33..1670f75 100644
--- a/test/test/commands.c
+++ b/test/test/commands.c
@@ -157,7 +157,7 @@ static void cmd_dump_parsed(void *parsed_result,
        else if (!strcmp(res->dump, "dump_mempool"))
                rte_mempool_list_dump(stdout);
        else if (!strcmp(res->dump, "dump_devargs"))
-               rte_eal_devargs_dump(stdout);
+               rte_devargs_dump(stdout);
        else if (!strcmp(res->dump, "dump_log_types"))
                rte_log_dump(stdout);
 }
-- 
2.1.4

Reply via email to