| 583 | } |
| 584 | |
| 585 | int |
| 586 | rte_vhost_driver_attach_vdpa_device(const char *path, |
| 587 | struct rte_vdpa_device *dev) |
| 588 | { |
| 589 | struct vhost_user_socket *vsocket; |
| 590 | |
| 591 | if (dev == NULL || path == NULL) |
| 592 | return -1; |
| 593 | |
| 594 | pthread_mutex_lock(&vhost_user.mutex); |
| 595 | vsocket = find_vhost_user_socket(path); |
| 596 | if (vsocket) |
| 597 | vsocket->vdpa_dev = dev; |
| 598 | pthread_mutex_unlock(&vhost_user.mutex); |
| 599 | |
| 600 | return vsocket ? 0 : -1; |
| 601 | } |
| 602 | |
| 603 | int |
| 604 | rte_vhost_driver_detach_vdpa_device(const char *path) |
no test coverage detected