[PATCH 2/2] Wire up mrg_rxbuf option for qemu

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

 



<interface ...>
  ...
  <model type='virtio'/>
  <driver ...>
    <host mrg_rxbuf='off'/>
  </driver>
</interface>

will result in:
-device virtio-net-pci,mrg_rxbuf=off,...

https://bugzilla.redhat.com/show_bug.cgi?id=1186886
---
 src/qemu/qemu_command.c                                              | 4 ++++
 src/qemu/qemu_hotplug.c                                              | 1 +
 tests/qemuxml2argvdata/qemuxml2argv-net-virtio-disable-offloads.args | 2 +-
 tests/qemuxml2argvdata/qemuxml2argv-net-virtio-disable-offloads.xml  | 2 +-
 4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 06a59d0..91af8a0 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4858,6 +4858,10 @@ qemuBuildNicDevStr(virDomainDefPtr def,
             virBufferAsprintf(&buf, ",host_ufo=%s",
                               virTristateSwitchTypeToString(net->driver.virtio.host.ufo));
         }
+        if (net->driver.virtio.host.mrg_rxbuf) {
+            virBufferAsprintf(&buf, ",mrg_rxbuf=%s",
+                              virTristateSwitchTypeToString(net->driver.virtio.host.mrg_rxbuf));
+        }
         if (net->driver.virtio.guest.csum) {
             virBufferAsprintf(&buf, ",guest_csum=%s",
                               virTristateSwitchTypeToString(net->driver.virtio.guest.csum));
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 033b281..f1fdd3f 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -2003,6 +2003,7 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
          olddev->driver.virtio.host.tso6 != newdev->driver.virtio.host.tso6 ||
          olddev->driver.virtio.host.ecn != newdev->driver.virtio.host.ecn ||
          olddev->driver.virtio.host.ufo != newdev->driver.virtio.host.ufo ||
+         olddev->driver.virtio.host.mrg_rxbuf != newdev->driver.virtio.host.mrg_rxbuf ||
          olddev->driver.virtio.guest.csum != newdev->driver.virtio.guest.csum ||
          olddev->driver.virtio.guest.tso4 != newdev->driver.virtio.guest.tso4 ||
          olddev->driver.virtio.guest.tso6 != newdev->driver.virtio.guest.tso6 ||
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-disable-offloads.args b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-disable-offloads.args
index b7ce282..29cfaf7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-disable-offloads.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-disable-offloads.args
@@ -3,7 +3,7 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
 -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \
 -hda /dev/HostVG/QEMUGuest7 \
 -device virtio-net-pci,csum=off,gso=off,\
-host_tso4=off,host_tso6=off,host_ecn=off,host_ufo=off,\
+host_tso4=off,host_tso6=off,host_ecn=off,host_ufo=off,mrg_rxbuf=off,\
 guest_csum=off,guest_tso4=off,guest_tso6=off,guest_ecn=off,guest_ufo=off,\
 vlan=0,id=net0,mac=00:22:44:66:88:aa,bus=pci.0,addr=0x3 \
 -net user,vlan=0,name=hostnet0 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-disable-offloads.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-disable-offloads.xml
index e368c43..f1be051 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-disable-offloads.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-disable-offloads.xml
@@ -26,7 +26,7 @@
       <mac address='00:22:44:66:88:aa'/>
       <model type='virtio'/>
       <driver>
-        <host csum='off' gso='off' tso4='off' tso6='off' ecn='off' ufo='off'/>
+        <host csum='off' gso='off' tso4='off' tso6='off' ecn='off' ufo='off' mrg_rxbuf='off'/>
         <guest csum='off' tso4='off' tso6='off' ecn='off' ufo='off'/>
       </driver>
     </interface>
-- 
2.0.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]