From 950d94ba0671e7f154a9e87a277f8efbddcee28f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 27 Jul 2016 01:15:25 +0400 Subject: vhost: add vhost_net_set_backend() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not all vhost-user backends support ops->vhost_net_set_backend(). It is a nicer to provide an assert/error than to crash trying to call. Furthermore, it improves a bit the code by hiding vhost_ops details. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/vhost.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/hw/virtio/vhost.h') diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 2106ed8..e433089 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -86,4 +86,8 @@ uint64_t vhost_get_features(struct vhost_dev *hdev, const int *feature_bits, void vhost_ack_features(struct vhost_dev *hdev, const int *feature_bits, uint64_t features); bool vhost_has_free_slot(void); + +int vhost_net_set_backend(struct vhost_dev *hdev, + struct vhost_vring_file *file); + #endif -- cgit v1.1