| 2818 | } |
| 2819 | |
| 2820 | static int |
| 2821 | cpfl_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 | |
| 2840 | static struct rte_pci_driver rte_cpfl_pmd = { |
| 2841 | .id_table = pci_id_cpfl_map, |
nothing calls this directly
no test coverage detected