git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
eal: add driver name alias
[dpdk.git]
/
lib
/
librte_eal
/
common
/
eal_common_vdev.c
diff --git
a/lib/librte_eal/common/eal_common_vdev.c
b/lib/librte_eal/common/eal_common_vdev.c
index
8b05f50
..
0ff2377
100644
(file)
--- a/
lib/librte_eal/common/eal_common_vdev.c
+++ b/
lib/librte_eal/common/eal_common_vdev.c
@@
-79,6
+79,14
@@
rte_eal_vdev_init(const char *name, const char *args)
return driver->probe(name, args);
}
return driver->probe(name, args);
}
+ /* Give new names precedence over aliases. */
+ TAILQ_FOREACH(driver, &vdev_driver_list, next) {
+ if (driver->driver.alias &&
+ !strncmp(driver->driver.alias, name,
+ strlen(driver->driver.alias)))
+ return driver->probe(name, args);
+ }
+
RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
return -EINVAL;
}
RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
return -EINVAL;
}