34 #ifndef _RTE_ETHDEV_VDEV_H_
35 #define _RTE_ETHDEV_VDEV_H_
37 #include <rte_config.h>
39 #include <rte_bus_vdev.h>
56 static inline struct rte_eth_dev *
57 rte_eth_vdev_allocate(
struct rte_vdev_device *dev,
size_t private_data_size)
59 struct rte_eth_dev *eth_dev;
60 const char *name = rte_vdev_device_name(dev);
62 eth_dev = rte_eth_dev_allocate(name);
66 if (private_data_size) {
68 private_data_size, RTE_CACHE_LINE_SIZE,
69 dev->device.numa_node);
70 if (!eth_dev->data->dev_private) {
71 rte_eth_dev_release_port(eth_dev);
76 eth_dev->device = &dev->device;
77 eth_dev->intr_handle = NULL;
79 eth_dev->data->kdrv = RTE_KDRV_NONE;
80 eth_dev->data->numa_node = dev->device.numa_node;