This patch adds an helper macro to get the rte_vdev_device
pointer from a rte_eth_dev pointer.
This is similar to RTE_ETH_DEV_TO_PCI().
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
#define RTE_DEV_TO_VDEV_CONST(ptr) \
container_of(ptr, const struct rte_vdev_device, device)
+#define RTE_ETH_DEV_TO_VDEV(eth_dev) RTE_DEV_TO_VDEV((eth_dev)->device)
+
static inline const char *
rte_vdev_device_name(const struct rte_vdev_device *dev)
{