git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pci: avoid inlining functions
[dpdk.git]
/
lib
/
librte_eal
/
common
/
include
/
rte_vdev.h
diff --git
a/lib/librte_eal/common/include/rte_vdev.h
b/lib/librte_eal/common/include/rte_vdev.h
index
2d02c68
..
29f5a52
100644
(file)
--- a/
lib/librte_eal/common/include/rte_vdev.h
+++ b/
lib/librte_eal/common/include/rte_vdev.h
@@
-41,18
+41,23
@@
extern "C" {
#include <rte_dev.h>
#include <rte_devargs.h>
#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 */
};
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)
{
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;
}
return NULL;
}