* DPDK callback to remove virtual device. * * @param vdev * Pointer to the removed virtual device. * * @return * 0 on success, negative error value otherwise. */
| 973 | * 0 on success, negative error value otherwise. |
| 974 | */ |
| 975 | static int |
| 976 | rte_pmd_mvneta_remove(struct rte_vdev_device *vdev) |
| 977 | { |
| 978 | uint16_t port_id; |
| 979 | int ret = 0; |
| 980 | |
| 981 | RTE_ETH_FOREACH_DEV(port_id) { |
| 982 | if (rte_eth_devices[port_id].device != &vdev->device) |
| 983 | continue; |
| 984 | ret |= rte_eth_dev_close(port_id); |
| 985 | } |
| 986 | |
| 987 | return ret == 0 ? 0 : -EIO; |
| 988 | } |
| 989 | |
| 990 | static struct rte_vdev_driver pmd_mvneta_drv = { |
| 991 | .probe = rte_pmd_mvneta_probe, |
no test coverage detected