MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_eth_copy_pci_info

Function rte_eth_copy_pci_info

dpdk/lib/ethdev/ethdev_pci.h:29–50  ·  view source on GitHub ↗

* Copy pci device info to the Ethernet device data. * Shared memory (eth_dev->data) only updated by primary process, so it is safe * to call this function from both primary and secondary processes. * * @param eth_dev * The *eth_dev* pointer is the address of the *rte_eth_dev* structure. * @param pci_dev * The *pci_dev* pointer is the address of the *rte_pci_device* structure. */

Source from the content-addressed store, hash-verified

27 * The *pci_dev* pointer is the address of the *rte_pci_device* structure.
28 */
29static inline void
30rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,
31 struct rte_pci_device *pci_dev)
32{
33 if ((eth_dev == NULL) || (pci_dev == NULL)) {
34 RTE_ETHDEV_LOG(ERR, "NULL pointer eth_dev=%p pci_dev=%p\n",
35 (void *)eth_dev, (void *)pci_dev);
36 return;
37 }
38
39 eth_dev->intr_handle = pci_dev->intr_handle;
40
41 if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
42 eth_dev->data->dev_flags = 0;
43 if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC)
44 eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
45 if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_RMV)
46 eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_RMV;
47
48 eth_dev->data->numa_node = pci_dev->device.numa_node;
49 }
50}
51
52static inline int
53eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device)

Callers 15

rte_eth_dev_pci_allocateFunction · 0.85
eth_igb_dev_initFunction · 0.85
eth_igbvf_dev_initFunction · 0.85
eth_em_dev_initFunction · 0.85
eth_ark_dev_initFunction · 0.85
mlx4_pci_probeFunction · 0.85
otx_ep_eth_dev_initFunction · 0.85
eth_avp_dev_initFunction · 0.85
ionic_pci_copy_bus_infoFunction · 0.85
mana_probe_portFunction · 0.85
eth_ngbe_dev_initFunction · 0.85

Calls 1

rte_eal_process_typeFunction · 0.85

Tested by

no test coverage detected