ACRN: DM: Expose the vhost kernel ioctrl API

The patch expose the vhost kernel ioctrl API and remove the virtio_net
operation functions to the virtio_net code module.

Tracked-On: #7456
Signed-off-by: Liu Long <long.liu@linux.intel.com>
Reviewed-by: Conghui <conghui.chen@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
Liu Long
2022-05-11 09:55:16 +08:00
committed by acrnsi-robot
parent 3afb222d90
commit 231f986bd9
3 changed files with 41 additions and 57 deletions

View File

@@ -132,19 +132,15 @@ int vhost_dev_start(struct vhost_dev *vdev);
int vhost_dev_stop(struct vhost_dev *vdev);
/**
* @brief set backend fd of vhost net.
* @brief vhost kernel dev ioctrl function
*
* This interface is called to set the backend fd (for example tap fd)
* to vhost.
* This interface is used to operation the vhost dev kernel.
*
* @param vdev Pointer to struct vhost_dev.
* @param backend_fd fd of backend (for example tap fd).
* @param vdev Pointer to struct vhost_dev
* @param The request to vhost kernel
* @param The arguments of vhost kernel operation
*
* @return 0 on success and -1 on failure.
*/
int vhost_net_set_backend(struct vhost_dev *vdev, int backend_fd);
/**
* @}
* @return 0 on success and -1 on failure
*/
int vhost_kernel_ioctl(struct vhost_dev *vdev, unsigned long int request, void *arg);
#endif