summaryrefslogtreecommitdiffstats
path: root/hw/net/vhost_net.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/net/vhost_net.c')
-rw-r--r--hw/net/vhost_net.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index 10a7780a13..386ec2eaa2 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -165,9 +165,9 @@ struct vhost_net *vhost_net_init(VhostNetOptions *options)
goto fail;
}
net->nc = options->net_backend;
+ net->dev.nvqs = options->nvqs;
net->dev.max_queues = 1;
- net->dev.nvqs = 2;
net->dev.vqs = net->vqs;
if (backend_kernel) {
@@ -242,9 +242,6 @@ static int vhost_net_start_one(struct vhost_net *net,
struct vhost_vring_file file = { };
int r;
- net->dev.nvqs = 2;
- net->dev.vqs = net->vqs;
-
r = vhost_dev_enable_notifiers(&net->dev, dev);
if (r < 0) {
goto fail_notifiers;