[libvirt] [PATCH 4/5] conf: add options for disabling segment offloading

Daniel P. Berrange berrange at redhat.com
Wed Sep 17 15:52:16 UTC 2014


On Wed, Sep 17, 2014 at 05:36:18PM +0200, Ján Tomko wrote:
> On 09/17/2014 04:57 PM, Daniel P. Berrange wrote:
> > On Mon, Sep 15, 2014 at 04:30:46PM -0600, Eric Blake wrote:
> >> On 09/11/2014 05:43 AM, Ján Tomko wrote:
> >>> Add the following attributes:
> >>> csum, gso, guest_tso4, guest_tso6, guest_ecn
> >>> to the <driver> element of network interface
> >>> which control the virtio-net device properties
> >>> of the same names.
> >>> ---
> >>>  docs/formatdomain.html.in                          | 27 ++++++++
> >>>  docs/schemas/domaincommon.rng                      | 25 +++++++
> >>>  src/conf/domain_conf.c                             | 81 ++++++++++++++++++++++
> >>>  src/conf/domain_conf.h                             |  5 ++
> >>>  .../qemuxml2argv-net-virtio-disable-offloads.xml   | 32 +++++++++
> >>>  tests/qemuxml2xmltest.c                            |  1 +
> >>>  6 files changed, 171 insertions(+)
> >>>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-virtio-disable-offloads.xml
> >>>
> >>> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> >>> index a2ea758..5b2758a 100644
> >>> --- a/docs/formatdomain.html.in
> >>> +++ b/docs/formatdomain.html.in
> >>> @@ -3847,6 +3847,12 @@ qemu-kvm -net nic,model=? /dev/null
> >>>        <model type='virtio'/>
> >>>        <b><driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off' queues='5'/></b>
> >>>      </interface>
> >>> +    <interface type='network'>
> >>> +      <source network='default'/>
> >>> +      <target dev='vnet2'/>
> >>> +      <model type='virtio'/>
> >>> +      <b><driver csum='off' gso='off' guest_tso4='off' guest_tso6='off' guest_ecn='off'/></b>
> >>> +    </interface>
> >>
> >> Are we stuck with names with underscores in our XML?  I'm still not sure
> >> if we've come up with the best naming for exposing all these knobs.
> > 
> > I'm not really convinced having a 'guest_' prefix really buys
> > us anything here, since there's no naming clash to avoid. Why
> > don't we just kill the 'guest_' prefixes.
> 
> The clash is in the options I didn't expose:
> http://git.qemu.org/?p=qemu.git;a=blob;f=include/hw/virtio/virtio-net.h;h=6ceb5aa92
> 
> because they weren't requested by the (private :() bug 1139364

Ah, so this is why you shouldn't take the precise solution requested in
a bug too literally, and instead look at the general picture :-)

So QEMU exposes alot of stuff:

$ qemu-kvm -device virtio-net,?
virtio-net-pci.ioeventfd=on/off
virtio-net-pci.vectors=uint32
virtio-net-pci.indirect_desc=on/off
virtio-net-pci.event_idx=on/off
virtio-net-pci.any_layout=on/off
virtio-net-pci.csum=on/off
virtio-net-pci.guest_csum=on/off
virtio-net-pci.gso=on/off
virtio-net-pci.guest_tso4=on/off
virtio-net-pci.guest_tso6=on/off
virtio-net-pci.guest_ecn=on/off
virtio-net-pci.guest_ufo=on/off
virtio-net-pci.host_tso4=on/off
virtio-net-pci.host_tso6=on/off
virtio-net-pci.host_ecn=on/off
virtio-net-pci.host_ufo=on/off
virtio-net-pci.mrg_rxbuf=on/off
virtio-net-pci.status=on/off
virtio-net-pci.ctrl_vq=on/off
virtio-net-pci.ctrl_rx=on/off
virtio-net-pci.ctrl_vlan=on/off
virtio-net-pci.ctrl_rx_extra=on/off
virtio-net-pci.ctrl_mac_addr=on/off
virtio-net-pci.ctrl_guest_offloads=on/off
virtio-net-pci.mq=on/off
virtio-net-pci.mac=macaddr
virtio-net-pci.vlan=vlan
virtio-net-pci.netdev=netdev
virtio-net-pci.bootindex=int32
virtio-net-pci.x-txtimer=uint32
virtio-net-pci.x-txburst=int32
virtio-net-pci.tx=str
virtio-net-pci.addr=pci-devfn
virtio-net-pci.romfile=str
virtio-net-pci.rombar=uint32
virtio-net-pci.multifunction=on/off
virtio-net-pci.command_serr_enable=on/off


Which to me indicates that Eric's suggestion for sub-elements is a
good idea. eg go for:

  <driver>
    <guest ..../>
    <host ..../>
  </driver>

and support the host bits too

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list