From 7263a0ad7899994b719ebed736a1119cc2e08110 Mon Sep 17 00:00:00 2001 From: Changchun Ouyang Date: Wed, 23 Sep 2015 12:20:01 +0800 Subject: vhost-user: add a new message to disable/enable a specific virt queue. Add a new message, VHOST_USER_SET_VRING_ENABLE, to enable or disable a specific virt queue, which is similar to attach/detach queue for tap device. virtio driver on guest doesn't have to use max virt queue pair, it could enable any number of virt queue ranging from 1 to max virt queue pair. Signed-off-by: Changchun Ouyang Signed-off-by: Yuanhan Liu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Signed-off-by: Yuanhan Liu Reviewed-by: Jason Wang Tested-by: Marcel Apfelbaum --- include/net/vhost_net.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/net') diff --git a/include/net/vhost_net.h b/include/net/vhost_net.h index 8db723e..0188c4d 100644 --- a/include/net/vhost_net.h +++ b/include/net/vhost_net.h @@ -28,4 +28,6 @@ bool vhost_net_virtqueue_pending(VHostNetState *net, int n); void vhost_net_virtqueue_mask(VHostNetState *net, VirtIODevice *dev, int idx, bool mask); VHostNetState *get_vhost_net(NetClientState *nc); + +int vhost_set_vring_enable(NetClientState * nc, int enable); #endif -- cgit v1.1