| 694 | } |
| 695 | |
| 696 | static int |
| 697 | virtio_user_pmd_remove(struct rte_vdev_device *vdev) |
| 698 | { |
| 699 | const char *name; |
| 700 | struct rte_eth_dev *eth_dev; |
| 701 | |
| 702 | if (!vdev) |
| 703 | return -EINVAL; |
| 704 | |
| 705 | name = rte_vdev_device_name(vdev); |
| 706 | PMD_DRV_LOG(INFO, "Un-Initializing %s", name); |
| 707 | eth_dev = rte_eth_dev_allocated(name); |
| 708 | /* Port has already been released by close. */ |
| 709 | if (!eth_dev) |
| 710 | return 0; |
| 711 | |
| 712 | if (rte_eal_process_type() != RTE_PROC_PRIMARY) |
| 713 | return rte_eth_dev_release_port(eth_dev); |
| 714 | |
| 715 | /* make sure the device is stopped, queues freed */ |
| 716 | return rte_eth_dev_close(eth_dev->data->port_id); |
| 717 | } |
| 718 | |
| 719 | static int virtio_user_pmd_dma_map(struct rte_vdev_device *vdev, void *addr, |
| 720 | uint64_t iova, size_t len) |
nothing calls this directly
no test coverage detected