[dpdk-stable] patch 'bus/vdev: fix finding device by name' has been queued to stable release 18.02.2

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Apr 30 16:03:06 CEST 2018


Hi,

FYI, your patch has been queued to stable release 18.02.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/02/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 0a6f1afc5c160f2b7610b7704c96909dea25ecd9 Mon Sep 17 00:00:00 2001
From: Nachiketa Prachanda <nprachan at vyatta.att-mail.com>
Date: Mon, 12 Mar 2018 09:54:00 -0700
Subject: [PATCH] bus/vdev: fix finding device by name

[ upstream commit fada6963ce735048b2d40f215ff110cb2f4cb6a4 ]

Use strcmp to compare device names as the strncmp in original code
causes find_vdev to return -EEXIST  for names that are prefix
of another. The creation of interfaces fails unpredictably based
on the order of their creation. An easy way hit this bug is to create
eth_vhost1 after eth_vhost11.

Fixes: dda987315ca2 ("vdev: make virtual bus use its device struct")

Signed-off-by: Nachiketa Prachanda <nprachan at vyatta.att-mail.com>
Acked-by: Jianfeng Tan <jianfeng.tan at intel.com>
---
 drivers/bus/vdev/vdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index e4bc72463..7eae319cb 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -188,7 +188,7 @@ find_vdev(const char *name)
 	TAILQ_FOREACH(dev, &vdev_device_list, next) {
 		const char *devname = rte_vdev_device_name(dev);
 
-		if (!strncmp(devname, name, strlen(name)))
+		if (!strcmp(devname, name))
 			return dev;
 	}
 
-- 
2.14.2



More information about the stable mailing list