summary refs log tree commit diff stats
path: root/hw/net/vhost_net.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2021-10-20 12:55:59 +0800
committerMichael S. Tsirkin <mst@redhat.com>2021-10-20 04:44:05 -0400
commit22288fe5a3f2dc4cb5c8826646d466019ad67682 (patch)
tree3e26e47ae9b2ff709a19f19689c25981ed84c0d4 /hw/net/vhost_net.c
parent049eb15b5fc9c54ae76254a196b695000127da7a (diff)
downloadfocaccia-qemu-22288fe5a3f2dc4cb5c8826646d466019ad67682.tar.gz
focaccia-qemu-22288fe5a3f2dc4cb5c8826646d466019ad67682.zip
virtio-net: vhost control virtqueue support
This patch implements the control virtqueue support for vhost. This
requires virtio-net to figure out the datapath queue pairs and control
virtqueue via is_datapath and pass the number of those two types
of virtqueues to vhost_net_start()/vhost_net_stop().

Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20211020045600.16082-10-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/net/vhost_net.c')
-rw-r--r--hw/net/vhost_net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index 3aabab06ea..0d888f29a6 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -326,7 +326,7 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs,
     VirtIONet *n = VIRTIO_NET(dev);
     int nvhosts = data_queue_pairs + cvq;
     struct vhost_net *net;
-    int r, e, i, last_index = data_qps * 2;
+    int r, e, i, last_index = data_queue_pairs * 2;
     NetClientState *peer;
 
     if (!cvq) {