34 #ifndef _RTE_ETHDEV_VDEV_H_
35 #define _RTE_ETHDEV_VDEV_H_
55 static inline struct rte_eth_dev *
56 rte_eth_vdev_allocate(
struct rte_vdev_device *dev,
size_t private_data_size)
58 struct rte_eth_dev *eth_dev;
59 const char *name = rte_vdev_device_name(dev);
61 eth_dev = rte_eth_dev_allocate(name);
65 if (private_data_size) {
67 private_data_size, RTE_CACHE_LINE_SIZE,
68 dev->device.numa_node);
69 if (!eth_dev->data->dev_private) {
70 rte_eth_dev_release_port(eth_dev);
75 eth_dev->device = &dev->device;
76 eth_dev->intr_handle = NULL;
78 eth_dev->data->kdrv = RTE_KDRV_NONE;
79 eth_dev->data->numa_node = dev->device.numa_node;
80 eth_dev->data->drv_name = dev->device.driver->name;