[dpdk-dev] [PATCH v3 8/9] vdev: expose bus name

Gaetan Rivet gaetan.rivet at 6wind.com
Thu Jun 1 12:08:58 CEST 2017


Signed-off-by: Gaetan Rivet <gaetan.rivet at 6wind.com>
---
 lib/librte_eal/common/eal_common_vdev.c  | 2 +-
 lib/librte_eal/common/include/rte_vdev.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c
index 131e0c2..452f60f 100644
--- a/lib/librte_eal/common/eal_common_vdev.c
+++ b/lib/librte_eal/common/eal_common_vdev.c
@@ -384,6 +384,6 @@ static void rte_vdev_bus_register(void)
 		return;
 
 	registered = 1;
-	rte_vdev_bus.name = RTE_STR(virtual);
+	rte_vdev_bus.name = VIRTUAL_BUS_NAME;
 	rte_bus_register(&rte_vdev_bus);
 }
diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h
index e6b678e..2d02c68 100644
--- a/lib/librte_eal/common/include/rte_vdev.h
+++ b/lib/librte_eal/common/include/rte_vdev.h
@@ -41,6 +41,8 @@ extern "C" {
 #include <rte_dev.h>
 #include <rte_devargs.h>
 
+#define VIRTUAL_BUS_NAME "virtual"
+
 struct rte_vdev_device {
 	TAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */
 	struct rte_device device;               /**< Inherit core device */
-- 
2.1.4



More information about the dev mailing list