From 181e02dfda2c2f3da05ae1085b5dac450a23015d Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Thu, 4 Jun 2015 11:23:28 +0200 Subject: [PATCH] conf: Ignore multiqueue with one queue. Multi != One. And indeed, libvirt behaves the same way for queues='1' as without such setting. Let's make it clear in the XML. Signed-off-by: Martin Kletzander --- src/conf/domain_conf.c | 3 ++- tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml | 6 ++++++ .../qemuxml2xmlout-tap-vhost-incorrect.xml | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 36de844199..2e79610010 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8626,7 +8626,8 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt, queues); goto error; } - def->driver.virtio.queues = q; + if (q > 1) + def->driver.virtio.queues = q; } if ((str = virXPathString("string(./driver/host/@csum)", ctxt))) { if ((val = virTristateSwitchTypeFromString(str)) <= 0) { diff --git a/tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml b/tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml index 2cf312f0ca..28f9347413 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-tap-vhost-incorrect.xml @@ -28,6 +28,12 @@ + + + + + + diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml index 266cbf0a72..d419cc3b8e 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-tap-vhost-incorrect.xml @@ -27,6 +27,12 @@ + + + + + +