DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vdev: fix missing alias check on uninit
@ 2016-11-18 16:32 Anatoly Burakov
  2016-12-07 20:14 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Anatoly Burakov @ 2016-11-18 16:32 UTC (permalink / raw)
  To: dev

Fixes: d63eed6b2dca ("eal: add driver name alias")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_vdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c
index 0ff2377..7d6e54f 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;
 }
-- 
2.5.5

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] vdev: fix missing alias check on uninit
  2016-11-18 16:32 [dpdk-dev] [PATCH] vdev: fix missing alias check on uninit Anatoly Burakov
@ 2016-12-07 20:14 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2016-12-07 20:14 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dev, stable

2016-11-18 16:32, Anatoly Burakov:
> Fixes: d63eed6b2dca ("eal: add driver name alias")
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>

CC: stable@dpdk.org

Applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-07 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-18 16:32 [dpdk-dev] [PATCH] vdev: fix missing alias check on uninit Anatoly Burakov
2016-12-07 20:14 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).