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;
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",
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",
ret = -EFAULT;
goto get_out;
}
- } else if (strcmp(kv->key, "driver") == 0) {
+ } else if (strcmp(kv->key, RTE_DEVARGS_KEY_DRIVER) == 0) {
/* Ignore */
continue;
}