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

Function idpf_pci_remove

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

Source from the content-addressed store, hash-verified

1444}
1445
1446static int
1447idpf_pci_remove(struct rte_pci_device *pci_dev)
1448{
1449 struct idpf_adapter_ext *adapter = idpf_find_adapter_ext(pci_dev);
1450 uint16_t port_id;
1451
1452 /* Ethdev created can be found RTE_ETH_FOREACH_DEV_OF through rte_device */
1453 RTE_ETH_FOREACH_DEV_OF(port_id, &pci_dev->device) {
1454 rte_eth_dev_close(port_id);
1455 }
1456
1457 rte_spinlock_lock(&idpf_adapter_lock);
1458 TAILQ_REMOVE(&idpf_adapter_list, adapter, next);
1459 rte_spinlock_unlock(&idpf_adapter_lock);
1460 idpf_adapter_ext_deinit(adapter);
1461 rte_free(adapter);
1462
1463 return 0;
1464}
1465
1466static struct rte_pci_driver rte_idpf_pmd = {
1467 .id_table = pci_id_idpf_map,

Callers

nothing calls this directly

Calls 6

idpf_find_adapter_extFunction · 0.85
rte_eth_dev_closeFunction · 0.85
idpf_adapter_ext_deinitFunction · 0.85
rte_freeFunction · 0.85
rte_spinlock_lockFunction · 0.50
rte_spinlock_unlockFunction · 0.50

Tested by

no test coverage detected