8 #ifndef _RTE_ETHDEV_VDEV_H_
9 #define _RTE_ETHDEV_VDEV_H_
11 #include <rte_config.h>
13 #include <rte_bus_vdev.h>
30 static inline struct rte_eth_dev *
31 rte_eth_vdev_allocate(
struct rte_vdev_device *dev,
size_t private_data_size)
33 struct rte_eth_dev *eth_dev;
34 const char *name = rte_vdev_device_name(dev);
36 eth_dev = rte_eth_dev_allocate(name);
40 if (private_data_size) {
42 private_data_size, RTE_CACHE_LINE_SIZE,
43 dev->device.numa_node);
44 if (!eth_dev->data->dev_private) {
45 rte_eth_dev_release_port(eth_dev);
50 eth_dev->device = &dev->device;
51 eth_dev->intr_handle = NULL;
53 eth_dev->data->kdrv = RTE_KDRV_NONE;
54 eth_dev->data->numa_node = dev->device.numa_node;
void * rte_zmalloc_socket(const char *type, size_t size, unsigned align, int socket)