Re: [libvirt] [PATCH] Revert "qemu: Expose rx/tx_queue_size in qemu.conf too"

2018-02-12 Thread Peter Krempa
On Mon, Feb 12, 2018 at 14:56:49 +, Daniel Berrange wrote:
> This reverts commit 038eb472a0d970a17ccf4343ead0666df5c92f9d.
> 
> On reflection adding defaults for arbitrary guest XML device config
> settings to the qemu.conf is not a sustainable path. Removing the
> support for rx/tx queue size so that it doesn't set a bad precedent.
> 
> Signed-off-by: Daniel P. Berrangé 
> ---
>  docs/formatdomain.html.in  | 14 ++
>  src/qemu/libvirtd_qemu.aug |  4 ---
>  src/qemu/qemu.conf |  6 -
>  src/qemu/qemu_command.c| 55 
> +++---
>  src/qemu/qemu_command.h|  3 +--
>  src/qemu/qemu_conf.c   |  4 ---
>  src/qemu/qemu_conf.h   |  3 ---
>  src/qemu/qemu_hotplug.c|  2 +-
>  src/qemu/test_libvirtd_qemu.aug.in |  2 --
>  9 files changed, 19 insertions(+), 74 deletions(-)

ACK


signature.asc
Description: PGP signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] Revert "qemu: Expose rx/tx_queue_size in qemu.conf too"

2018-02-12 Thread Daniel P . Berrangé
This reverts commit 038eb472a0d970a17ccf4343ead0666df5c92f9d.

On reflection adding defaults for arbitrary guest XML device config
settings to the qemu.conf is not a sustainable path. Removing the
support for rx/tx queue size so that it doesn't set a bad precedent.

Signed-off-by: Daniel P. Berrangé 
---
 docs/formatdomain.html.in  | 14 ++
 src/qemu/libvirtd_qemu.aug |  4 ---
 src/qemu/qemu.conf |  6 -
 src/qemu/qemu_command.c| 55 +++---
 src/qemu/qemu_command.h|  3 +--
 src/qemu/qemu_conf.c   |  4 ---
 src/qemu/qemu_conf.h   |  3 ---
 src/qemu/qemu_hotplug.c|  2 +-
 src/qemu/test_libvirtd_qemu.aug.in |  2 --
 9 files changed, 19 insertions(+), 74 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 6707744bda..3ec1173c6f 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -5456,12 +5456,7 @@ qemu-kvm -net nic,model=? /dev/null
 some restrictions on actual value. For instance, latest
 QEMU (as of 2016-09-01) requires value to be a power of two
 from [256, 1024] range.
-Since 2.3.0 (QEMU and KVM only)
-Additionally, since 4.1.0 the
-value can be set in the qemu.conf file in order
-to override the hypervisor default value. Note that XML has
-higher precedence because it's more specific.
-
+Since 2.3.0 (QEMU and KVM only)
 
 In general you should leave this option alone, unless you
 are very certain you know what you are doing.
@@ -5477,12 +5472,7 @@ qemu-kvm -net nic,model=? /dev/null
 range. In addition to that, this may work only for a subset of
 interface types, e.g. aforementioned QEMU enables this option
 only for vhostuser type.
-Since 3.7.0 (QEMU and KVM only)
-Additionally, since 4.1.0 the
-value can be set in the qemu.conf file in order
-to override the hypervisor default value. Note that XML has
-higher precedence because it's more specific.
-
+Since 3.7.0 (QEMU and KVM only)
 
 In general you should leave this option alone, unless you
 are very certain you know what you are doing.
diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug
index 084290296a..c19bf3a43a 100644
--- a/src/qemu/libvirtd_qemu.aug
+++ b/src/qemu/libvirtd_qemu.aug
@@ -118,9 +118,6 @@ module Libvirtd_qemu =
let vxhs_entry = bool_entry "vxhs_tls"
  | str_entry "vxhs_tls_x509_cert_dir"
 
-   let virtio_entry = int_entry "rx_queue_size"
- | int_entry "tx_queue_size"
-
(* Each entry in the config is one of the following ... *)
let entry = default_tls_entry
  | vnc_entry
@@ -140,7 +137,6 @@ module Libvirtd_qemu =
  | gluster_debug_level_entry
  | memory_entry
  | vxhs_entry
- | virtio_entry
 
let comment = [ label "#comment" . del /#[ \t]*/ "# " .  store /([^ 
\t\n][^\n]*)?/ . del /\n/ "\n" ]
let empty = [ label "#empty" . eol ]
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index 62c4265ea9..43dd561cca 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -775,9 +775,3 @@
 # This directory is used for memoryBacking source if configured as file.
 # NOTE: big files will be stored here
 #memory_backing_dir = "/var/lib/libvirt/qemu/ram"
-
-# The following two values set the default RX/TX ring buffer size for virtio
-# interfaces. These values are taken unless overridden in domain XML. For more
-# info consult docs to corresponding attributes from domain XML.
-#rx_queue_size = 1024
-#tx_queue_size = 1024
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 2bcaa5fc22..f7925c93a8 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3351,8 +3351,7 @@ qemuBuildNicStr(virDomainNetDefPtr net,
 
 
 char *
-qemuBuildNicDevStr(virQEMUDriverConfigPtr cfg,
-   virDomainDefPtr def,
+qemuBuildNicDevStr(virDomainDefPtr def,
virDomainNetDefPtr net,
int vlan,
unsigned int bootindex,
@@ -3472,41 +3471,21 @@ qemuBuildNicDevStr(virQEMUDriverConfigPtr cfg,
 virBufferAsprintf(, ",mq=on,vectors=%zu", 2 * vhostfdSize + 2);
 }
 }
-if (usingVirtio) {
-unsigned int rx_queue_size = net->driver.virtio.rx_queue_size;
-
-if (rx_queue_size == 0)
-rx_queue_size = cfg->rx_queue_size;
-
-if (rx_queue_size) {
-if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE)) 
{
-virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-   _("virtio rx_queue_size option is "
- "not supported with this QEMU binary"));
-goto error;
-}
-
-