eal: suppress error log on multi-process hotplug
[dpdk.git] / lib / eal / common / eal_common_devargs.c
index b31ac87..23aaf8b 100644 (file)
@@ -49,9 +49,9 @@ rte_devargs_layers_parse(struct rte_devargs *devargs,
                const char *str;
                struct rte_kvargs *kvlist;
        } layers[] = {
-               { "bus=",    NULL, NULL, },
-               { "class=",  NULL, NULL, },
-               { "driver=", NULL, NULL, },
+               { RTE_DEVARGS_KEY_BUS "=",    NULL, NULL, },
+               { RTE_DEVARGS_KEY_CLASS "=",  NULL, NULL, },
+               { RTE_DEVARGS_KEY_DRIVER "=", NULL, NULL, },
        };
        struct rte_kvargs_pair *kv = NULL;
        struct rte_class *cls = NULL;
@@ -118,7 +118,7 @@ next_layer:
                if (layers[i].kvlist == NULL)
                        continue;
                kv = &layers[i].kvlist->pairs[0];
-               if (strcmp(kv->key, "bus") == 0) {
+               if (strcmp(kv->key, RTE_DEVARGS_KEY_BUS) == 0) {
                        bus = rte_bus_find_by_name(kv->value);
                        if (bus == NULL) {
                                RTE_LOG(ERR, EAL, "Could not find bus \"%s\"\n",
@@ -126,7 +126,7 @@ next_layer:
                                ret = -EFAULT;
                                goto get_out;
                        }
-               } else if (strcmp(kv->key, "class") == 0) {
+               } else if (strcmp(kv->key, RTE_DEVARGS_KEY_CLASS) == 0) {
                        cls = rte_class_find_by_name(kv->value);
                        if (cls == NULL) {
                                RTE_LOG(ERR, EAL, "Could not find class \"%s\"\n",
@@ -134,7 +134,7 @@ next_layer:
                                ret = -EFAULT;
                                goto get_out;
                        }
-               } else if (strcmp(kv->key, "driver") == 0) {
+               } else if (strcmp(kv->key, RTE_DEVARGS_KEY_DRIVER) == 0) {
                        /* Ignore */
                        continue;
                }