bus/vdev: add helper to get vdev from ethdev
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Tue, 26 Jan 2021 10:15:56 +0000 (11:15 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Jan 2021 17:16:09 +0000 (18:16 +0100)
commit2d9b1272609a408741673d1639dfef6c510f387f
treeb1d75e13b916f9d5a8e495e3c47424aef429fcb9
parent8f09758941bc93f80525b2b56f85dcf1bd6bd295
bus/vdev: add helper to get vdev from ethdev

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>
drivers/bus/vdev/rte_bus_vdev.h