/* FreeBSD has no NUMA support (yet) */
dev->device.numa_node = 0;
+ rte_eal_pci_device_name(&dev->addr, dev->name, sizeof(dev->name));
+ dev->device.name = dev->name;
+
/* FreeBSD has only one pass through driver */
dev->kdrv = RTE_KDRV_NIC_UIO;
void rte_eal_device_insert(struct rte_device *dev)
{
+ RTE_VERIFY(dev->name);
+ RTE_VERIFY(dev->name[0] != '\0');
+
TAILQ_INSERT_TAIL(&dev_device_list, dev, next);
}
dev->device.devargs = devargs;
dev->device.numa_node = SOCKET_ID_ANY;
+ dev->device.name = devargs->virt.drv_name;
ret = vdev_probe_all_drivers(dev);
if (ret) {
dev->device.devargs = devargs;
dev->device.numa_node = SOCKET_ID_ANY;
+ dev->device.name = devargs->virt.drv_name;
rte_eal_device_insert(&dev->device);
TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
*/
struct rte_device {
TAILQ_ENTRY(rte_device) next; /**< Next device */
+ const char *name; /**< Device name */
const struct rte_driver *driver;/**< Associated driver */
int numa_node; /**< NUMA node connection */
struct rte_devargs *devargs; /**< Device user arguments */
struct rte_pci_driver *driver; /**< Associated driver */
uint16_t max_vfs; /**< sriov enable if not zero */
enum rte_kernel_driver kdrv; /**< Kernel driver passthrough */
+ char name[PCI_PRI_STR_SIZE+1]; /**< PCI location (ASCII) */
};
/**
dev->device.numa_node = tmp;
}
+ rte_eal_pci_device_name(addr, dev->name, sizeof(dev->name));
+ dev->device.name = dev->name;
+
/* parse resources */
snprintf(filename, sizeof(filename), "%s/resource", dirname);
if (pci_parse_sysfs_resource(filename, dev) < 0) {