* Invoked when there is the vhost-user connection is broken (when * the virtio device is being detached). */
| 763 | * the virtio device is being detached). |
| 764 | */ |
| 765 | void |
| 766 | vhost_destroy_device(int vid) |
| 767 | { |
| 768 | struct virtio_net *dev = get_device(vid); |
| 769 | |
| 770 | if (dev == NULL) |
| 771 | return; |
| 772 | |
| 773 | vhost_destroy_device_notify(dev); |
| 774 | |
| 775 | cleanup_device(dev, 1); |
| 776 | free_device(dev); |
| 777 | |
| 778 | vhost_devices[vid] = NULL; |
| 779 | } |
| 780 | |
| 781 | void |
| 782 | vhost_attach_vdpa_device(int vid, struct rte_vdpa_device *vdpa_dev) |
no test coverage detected