X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Finclude%2Frte_vdev.h;h=29f5a52309ac274dc3ac5e15a2d5b5c03726d8bd;hb=394d5b4c0aa1976a9b8384efb227bf39550c6675;hp=fc24298f2375625aeeb729112d0728d5c23f460b;hpb=f6713517521e8e367f51c6e364423b23a4f47eb4;p=dpdk.git diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h index fc24298f23..29f5a52309 100644 --- a/lib/librte_eal/common/include/rte_vdev.h +++ b/lib/librte_eal/common/include/rte_vdev.h @@ -46,6 +46,13 @@ struct rte_vdev_device { 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) {