pci: avoid inlining functions
[dpdk.git] / lib / librte_eal / common / include / rte_vdev.h
index 2d02c68..29f5a52 100644 (file)
@@ -41,18 +41,23 @@ 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 */
 };
 
+/**
+ * @internal
+ * Helper macro for drivers that need to convert to struct rte_vdev_device.
+ */
+#define RTE_DEV_TO_VDEV(ptr) \
+       container_of(ptr, struct rte_vdev_device, device)
+
 static inline const char *
 rte_vdev_device_name(const struct rte_vdev_device *dev)
 {
-       if (dev && dev->device.devargs)
-               return dev->device.devargs->virt.drv_name;
+       if (dev && dev->device.name)
+               return dev->device.name;
        return NULL;
 }