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

Function cpfl_pci_remove

dpdk/drivers/net/cpfl/cpfl_ethdev.c:2820–2838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2818}
2819
2820static int
2821cpfl_pci_remove(struct rte_pci_device *pci_dev)
2822{
2823 struct cpfl_adapter_ext *adapter = cpfl_find_adapter_ext(pci_dev);
2824 uint16_t port_id;
2825
2826 /* Ethdev created can be found RTE_ETH_FOREACH_DEV_OF through rte_device */
2827 RTE_ETH_FOREACH_DEV_OF(port_id, &pci_dev->device) {
2828 rte_eth_dev_close(port_id);
2829 }
2830
2831 rte_spinlock_lock(&cpfl_adapter_lock);
2832 TAILQ_REMOVE(&cpfl_adapter_list, adapter, next);
2833 rte_spinlock_unlock(&cpfl_adapter_lock);
2834 cpfl_adapter_ext_deinit(adapter);
2835 rte_free(adapter);
2836
2837 return 0;
2838}
2839
2840static struct rte_pci_driver rte_cpfl_pmd = {
2841 .id_table = pci_id_cpfl_map,

Callers

nothing calls this directly

Calls 6

cpfl_find_adapter_extFunction · 0.85
rte_eth_dev_closeFunction · 0.85
cpfl_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