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

Function virtio_user_pmd_remove

dpdk/drivers/net/virtio/virtio_user_ethdev.c:696–717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

694}
695
696static int
697virtio_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
719static int virtio_user_pmd_dma_map(struct rte_vdev_device *vdev, void *addr,
720 uint64_t iova, size_t len)

Callers

nothing calls this directly

Calls 5

rte_vdev_device_nameFunction · 0.85
rte_eth_dev_allocatedFunction · 0.85
rte_eal_process_typeFunction · 0.85
rte_eth_dev_release_portFunction · 0.85
rte_eth_dev_closeFunction · 0.85

Tested by

no test coverage detected