[dpdk-dev,1/2] vdev: get name from embedded device

Message ID 20170711185649.43620-2-jblunck@infradead.org (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Jan Blunck July 11, 2017, 6:56 p.m. UTC
  Instead of getting the name from the devargs lets take it from the
rte_device.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
 lib/librte_eal/common/include/rte_vdev.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h
index 3c07b76a0..fc24298f2 100644
--- a/lib/librte_eal/common/include/rte_vdev.h
+++ b/lib/librte_eal/common/include/rte_vdev.h
@@ -49,8 +49,8 @@  struct rte_vdev_device {
 static inline const char *
 rte_vdev_device_name(const struct rte_vdev_device *dev)
 {
-	if (dev && dev->device.devargs)
-		return dev->device.devargs->name;
+	if (dev && dev->device.name)
+		return dev->device.name;
 	return NULL;
 }