aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_eal/common/eal_common_vdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_eal/common/eal_common_vdev.c')
-rw-r--r--lib/librte_eal/common/eal_common_vdev.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c
index 0ff2377d..7d6e54f4 100644
--- a/lib/librte_eal/common/eal_common_vdev.c
+++ b/lib/librte_eal/common/eal_common_vdev.c
@@ -111,6 +111,14 @@ rte_eal_vdev_uninit(const char *name)
return driver->remove(name);
}
+ /* 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->remove(name);
+ }
+
RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
return -EINVAL;
}