[PATCH 3/3] kvm-tool: Restrict queue number to 1 when vhost on

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



vhost kernel driver does not support mutiple queue yet,
Tweak queue number will fail with "--net mode=tap,vhost=1,mq=2"
as below when lkvm trying to set ring kick fd for queue 2:

VHOST_SET_VRING_KICK failed: No buffer space available

Error on this scenario, and overide with the default one queue
configuration.

Signed-off-by: Fan Du <fan.du@xxxxxxxxx>
---
 tools/kvm/virtio/net.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/kvm/virtio/net.c b/tools/kvm/virtio/net.c
index 5678ff2..32159f1 100644
--- a/tools/kvm/virtio/net.c
+++ b/tools/kvm/virtio/net.c
@@ -714,6 +714,10 @@ static int set_net_param(struct kvm *kvm, struct virtio_net_params *p,
 		p->mq = atoi(val);
 	} else
 		die("Unknown network parameter %s", param);
+	if (p->vhost && p->mq > 1) {
+		p->mq = 1;
+		pr_err("Virtio vhost does not support mq yet, overide mq to 1.");
+	}
 
 	return 0;
 }
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux