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

Function idpf_find_adapter_ext

dpdk/drivers/net/idpf/idpf_ethdev.c:1316–1338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1314};
1315
1316static struct idpf_adapter_ext *
1317idpf_find_adapter_ext(struct rte_pci_device *pci_dev)
1318{
1319 struct idpf_adapter_ext *adapter;
1320 int found = 0;
1321
1322 if (pci_dev == NULL)
1323 return NULL;
1324
1325 rte_spinlock_lock(&idpf_adapter_lock);
1326 TAILQ_FOREACH(adapter, &idpf_adapter_list, next) {
1327 if (strncmp(adapter->name, pci_dev->device.name, PCI_PRI_STR_SIZE) == 0) {
1328 found = 1;
1329 break;
1330 }
1331 }
1332 rte_spinlock_unlock(&idpf_adapter_lock);
1333
1334 if (found == 0)
1335 return NULL;
1336
1337 return adapter;
1338}
1339
1340static void
1341idpf_adapter_ext_deinit(struct idpf_adapter_ext *adapter)

Callers 2

idpf_pci_probeFunction · 0.85
idpf_pci_removeFunction · 0.85

Calls 3

strncmpFunction · 0.85
rte_spinlock_lockFunction · 0.50
rte_spinlock_unlockFunction · 0.50

Tested by

no test coverage detected