| 1314 | }; |
| 1315 | |
| 1316 | static struct idpf_adapter_ext * |
| 1317 | idpf_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 | |
| 1340 | static void |
| 1341 | idpf_adapter_ext_deinit(struct idpf_adapter_ext *adapter) |
no test coverage detected