Bug 1186886
| Summary: | RFE : Allow virtio-net-pci.mrg_rxbuf to be disabled without using qemu:commandline XML. | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Lee Yarwood <lyarwood> |
| Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.1 | CC: | dyuan, honzhang, jtomko, lmiksik, mzhan, pbandark, rbalakri |
| Target Milestone: | rc | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-1.2.13-1.el7 | Doc Type: | Enhancement |
| Doc Text: |
Feature: Allow disabling mrg_rxbuf.
Reason: Some applications require mrg_rxbuf to be disabled.
Result: Now mrg_rxbuf can be disabled in the domain XML.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-11-19 06:09:05 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Proposed upstream patches: https://www.redhat.com/archives/libvir-list/2015-February/msg00188.html Now pushed upstream as:
commit 6ba5d1afecc091d856906cd2e2b5ec8350fefa77
Author: Ján Tomko <jtomko>
CommitDate: 2015-02-13 12:31:38 +0100
Wire up mrg_rxbuf option for qemu
<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
commit 6067182b0d50202a53db610bedfe89b6a7c133f3
Author: Ján Tomko <jtomko>
CommitDate: 2015-02-13 12:31:38 +0100
Add mrg_rxbuf option to virtio interfaces
Add an XML attribute to allow disabling merge of rx buffers
on the host:
<interface ...>
...
<model type='virtio'/>
<driver ...>
<host mrg_rxbuf='off'/>
</driver>
</interface>
https://bugzilla.redhat.com/show_bug.cgi?id=1186886
git describe: v1.2.12-132-g6ba5d1a
I do a sanity testing for this RFE bug, all below scenarios are passed. Old method: <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> ... <qemu:commandline> <qemu:arg value='-global'/> <qemu:arg value='virtio-net-pci.mrg_rxbuf=off'/> </qemu:commandline> </domain> [root@localhost network-scripts]# ps axu | grep r71 qemu 26959 77.0 1.2 1720500 98092 ? Sl 13:38 0:03 /usr/libexec/qemu-kvm -name r71 -S -machine pc-i440fx-rhel7.1.0,accel=kvm,usb=off -cpu SandyBridge ... -global virtio-net-pci.mrg_rxbuf=off -msg timestamp=on New way: Version: libvirt-1.2.15-1.el7.x86_64 qemu-kvm-rhev-2.3.0-1.el7.x86_64 kernel-3.10.0-201.el7.x86_64 1. Add below xml block in <interface>, then start domain and check qemu command line <driver> <host mrg_rxbuf='off'/> </driver> [root@localhost vnet2]# virsh dumpxml r71 | grep "/interface" -B8 <interface type='network'> <mac address='52:54:00:43:0b:f9'/> <source network='default'/> <model type='virtio'/> <driver> <host mrg_rxbuf='off'/> </driver> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> [root@localhost vnet2]# virsh start r71 Domain r71 started [root@localhost network-scripts]# ps axu | grep r71 qemu 27099 99.3 1.2 1720340 98200 ? Sl 13:44 0:02 /usr/libexec/qemu-kvm -name r71 -S -machine pc-i440fx-rhel7.1.0,accel=kvm,usb=off -cpu SandyBridge ... -netdev tap,fd=25,id=hostnet0 -device virtio-net-pci,mrg_rxbuf=off,netdev=hostnet0,id=net0,mac=52:54:00:43:0b:f9,bus=pci.0,addr=0x3 ... 2. Hot plug/unplug a interface with mrg_rxbuf="off" [root@localhost ~]# virsh start r71 Domain r71 started [root@localhost ~]# virsh dumpxml r71| grep "/interface" -B10 <interface type='network'> <mac address='52:54:00:43:0b:f9'/> <source network='default' bridge='virbr0'/> <target dev='vnet2'/> <model type='virtio'/> <driver> <host csum='off' gso='off' tso4='off' tso6='off' mrg_rxbuf='off'/> </driver> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> [root@localhost ~]# [root@localhost ~]# cat nic.xml <interface type='network'> <source network='default'/> <model type='virtio'/> <driver> <host mrg_rxbuf='off'/> </driver> </interface> [root@localhost ~]# virsh attach-device r71 nic.xml Device attached successfully [root@localhost ~]# virsh dumpxml r71| grep "/interface" -B10 <interface type='network'> <mac address='52:54:00:43:0b:f9'/> <source network='default' bridge='virbr0'/> <target dev='vnet2'/> <model type='virtio'/> <driver> <host csum='off' gso='off' tso4='off' tso6='off' mrg_rxbuf='off'/> </driver> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:ab:6a:c5'/> <source network='default' bridge='virbr0'/> <target dev='vnet3'/> <model type='virtio'/> <driver> <host mrg_rxbuf='off'/> </driver> <alias name='net1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </interface> [root@localhost ~]# cat nic1.xml <interface type='network'> <mac address='52:54:00:ab:6a:c5'/> <source network='default' bridge='virbr0'/> <target dev='vnet3'/> <model type='virtio'/> <driver> <host mrg_rxbuf='off'/> </driver> </interface> [root@localhost ~]# virsh detach-device r71 nic1.xml Device detached successfully [root@localhost ~]# virsh dumpxml r71| grep "/interface" -B10 <interface type='network'> <mac address='52:54:00:43:0b:f9'/> <source network='default' bridge='virbr0'/> <target dev='vnet2'/> <model type='virtio'/> <driver> <host csum='off' gso='off' tso4='off' tso6='off' mrg_rxbuf='off'/> </driver> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> 3. Exception error message with an invalid mode, non on/off like: <driver> <host mrg_rxbuf='yes'/> </driver> [root@localhost ~]# virsh edit r71 error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng Extra element devices in interleave Element domain failed to validate content Failed. Try again? [y,n,i,f,?]: <====press "i" error: unsupported configuration: unknown host mrg_rxbuf mode 'yes' Failed. Try again? [y,n,f,?]: Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2202.html |
Description of problem: Allow virtio-net-pci.mrg_rxbuf to be disabled without using qemu:commandline XML. At present the only way to disable virtio-net-pci.mrg_rxbuf via libvirt is to add the following qemu:commandline XML to a domain : <qemu:commandline> <qemu:arg value='-global'/> <qemu:arg value='virtio-net-pci.mrg_rxbuf=off'/> </qemu:commandline> If possible it would be useful to control this from within a each interface element of a domain.