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

Function eth_ionic_pci_probe

dpdk/drivers/net/ionic/ionic_dev_pci.c:222–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220};
221
222static int
223eth_ionic_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
224 struct rte_pci_device *pci_dev)
225{
226 struct rte_mem_resource *resource;
227 struct ionic_bars bars;
228 unsigned long i;
229
230 IONIC_PRINT(NOTICE, "Initializing device %s %s",
231 pci_dev->device.name,
232 rte_eal_process_type() == RTE_PROC_SECONDARY ?
233 "[SECONDARY]" : "");
234
235 bars.num_bars = 0;
236 for (i = 0; i < PCI_MAX_RESOURCE && i < IONIC_BARS_MAX; i++) {
237 resource = &pci_dev->mem_resource[i];
238 if (resource->phys_addr == 0 || resource->len == 0)
239 continue;
240
241 bars.bar[bars.num_bars].vaddr = resource->addr;
242 bars.bar[bars.num_bars].bus_addr = resource->phys_addr;
243 bars.bar[bars.num_bars].len = resource->len;
244 bars.num_bars++;
245 }
246
247 return eth_ionic_dev_probe((void *)pci_dev,
248 &pci_dev->device,
249 &bars,
250 &ionic_pci_intf,
251 pci_dev->id.device_id,
252 pci_dev->id.vendor_id);
253}
254
255static int
256eth_ionic_pci_remove(struct rte_pci_device *pci_dev)

Callers

nothing calls this directly

Calls 2

rte_eal_process_typeFunction · 0.85
eth_ionic_dev_probeFunction · 0.85

Tested by

no test coverage detected