diff options
author | Yuanhan Liu <yuanhan.liu@linux.intel.com> | 2015-09-23 12:19:58 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-09-24 16:27:52 +0300 |
commit | e2051e9e004649b53af4db34f78c689fb44e075b (patch) | |
tree | 5621451188099ce6e8d2df7dcc81f0d2401fd166 /include | |
parent | d1f8b30ec8dde0318fd1b98d24a64926feae9625 (diff) |
vhost-user: add VHOST_USER_GET_QUEUE_NUM message
This is for querying how many queues the backend supports if it has mq
support(when VHOST_USER_PROTOCOL_F_MQ flag is set from the quried
protocol features).
vhost_net_get_max_queues() is the interface to export that value, and
to tell if the backend supports # of queues user requested, which is
done in the following patch.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Tested-by: Marcel Apfelbaum <marcel@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/virtio/vhost.h | 1 | ||||
-rw-r--r-- | include/net/vhost_net.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 6467c73ecf..c3758f3c78 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -48,6 +48,7 @@ struct vhost_dev { unsigned long long acked_features; unsigned long long backend_features; unsigned long long protocol_features; + unsigned long long max_queues; bool started; bool log_enabled; unsigned long long log_size; diff --git a/include/net/vhost_net.h b/include/net/vhost_net.h index 840d4b16e2..8db723e54b 100644 --- a/include/net/vhost_net.h +++ b/include/net/vhost_net.h @@ -13,6 +13,7 @@ typedef struct VhostNetOptions { void *opaque; } VhostNetOptions; +uint64_t vhost_net_get_max_queues(VHostNetState *net); struct vhost_net *vhost_net_init(VhostNetOptions *options); int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, int total_queues); |