Lines Matching refs:eth_dev
26 rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev, in rte_eth_copy_pci_info() argument
29 if ((eth_dev == NULL) || (pci_dev == NULL)) { in rte_eth_copy_pci_info()
31 (void *)eth_dev, (void *)pci_dev); in rte_eth_copy_pci_info()
35 eth_dev->intr_handle = &pci_dev->intr_handle; in rte_eth_copy_pci_info()
38 eth_dev->data->dev_flags = 0; in rte_eth_copy_pci_info()
40 eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC; in rte_eth_copy_pci_info()
42 eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_RMV; in rte_eth_copy_pci_info()
44 eth_dev->data->numa_node = pci_dev->device.numa_node; in rte_eth_copy_pci_info()
49 eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device) { in eth_dev_pci_specific_init() argument
55 rte_eth_copy_pci_info(eth_dev, pci_dev); in eth_dev_pci_specific_init()
77 struct rte_eth_dev *eth_dev; in rte_eth_dev_pci_allocate() local
86 eth_dev = rte_eth_dev_allocate(name); in rte_eth_dev_pci_allocate()
87 if (!eth_dev) in rte_eth_dev_pci_allocate()
91 eth_dev->data->dev_private = rte_zmalloc_socket(name, in rte_eth_dev_pci_allocate()
94 if (!eth_dev->data->dev_private) { in rte_eth_dev_pci_allocate()
95 rte_eth_dev_release_port(eth_dev); in rte_eth_dev_pci_allocate()
100 eth_dev = rte_eth_dev_attach_secondary(name); in rte_eth_dev_pci_allocate()
101 if (!eth_dev) in rte_eth_dev_pci_allocate()
105 eth_dev->device = &dev->device; in rte_eth_dev_pci_allocate()
106 rte_eth_copy_pci_info(eth_dev, dev); in rte_eth_dev_pci_allocate()
107 return eth_dev; in rte_eth_dev_pci_allocate()
110 typedef int (*eth_dev_pci_callback_t)(struct rte_eth_dev *eth_dev);
121 struct rte_eth_dev *eth_dev; in rte_eth_dev_pci_generic_probe() local
124 eth_dev = rte_eth_dev_pci_allocate(pci_dev, private_data_size); in rte_eth_dev_pci_generic_probe()
125 if (!eth_dev) in rte_eth_dev_pci_generic_probe()
129 ret = dev_init(eth_dev); in rte_eth_dev_pci_generic_probe()
131 rte_eth_dev_release_port(eth_dev); in rte_eth_dev_pci_generic_probe()
133 rte_eth_dev_probing_finish(eth_dev); in rte_eth_dev_pci_generic_probe()
147 struct rte_eth_dev *eth_dev; in rte_eth_dev_pci_generic_remove() local
150 eth_dev = rte_eth_dev_allocated(pci_dev->device.name); in rte_eth_dev_pci_generic_remove()
151 if (!eth_dev) in rte_eth_dev_pci_generic_remove()
155 ret = dev_uninit(eth_dev); in rte_eth_dev_pci_generic_remove()
160 rte_eth_dev_release_port(eth_dev); in rte_eth_dev_pci_generic_remove()