libvirt/docs
Laine Stump e9bd5c0e24 Add txmode attribute to interface XML for virtio backend
This is in response to:

   https://bugzilla.redhat.com/show_bug.cgi?id=629662

Explanation

qemu's virtio-net-pci driver allows setting the algorithm used for tx
packets to either "bh" or "timer". This is done by adding ",tx=bh" or
",tx=timer" to the "-device virtio-net-pci" commandline option.

'bh' stands for 'bottom half'; when this is set, packet tx is all done
in an iothread in the bottom half of the driver. (In libvirt, this
option is called the more descriptive "iothread".)

'timer' means that tx work is done in qemu, and if there is more tx
data than can be sent at the present time, a timer is set before qemu
moves on to do other things; when the timer fires, another attempt is
made to send more data. (libvirt retains the name "timer" for this
option.)

The resulting difference, according to the qemu developer who added
the option is:

    bh makes tx more asynchronous and reduces latency, but potentially
    causes more processor bandwidth contention since the cpu doing the
    tx isn't necessarily the cpu where the guest generated the
    packets.

Solution

This patch provides a libvirt domain xml knob to change the option on
the qemu commandline, by adding a new attribute "txmode" to the
<driver> element that can be placed inside any <interface> element in
a domain definition. It's use would be something like this:

    <interface ...>
      ...
      <model type='virtio'/>
      <driver txmode='iothread'/>
      ...
    </interface>

I chose to put this setting as an attribute to <driver> rather than as
a sub-element to <tune> because it is specific to the virtio-net
driver, not something that is generally usable by all network drivers.
(note that this is the same placement as the "driver name=..."
attribute used to choose kernel vs. userland backend for the
virtio-net driver.)

Actually adding the tx=xxx option to the qemu commandline is only done
if the version of qemu being used advertises it in the output of

    qemu -device virtio-net-pci,?

If a particular txmode is requested in the XML, and the option isn't
listed in that help output, an UNSUPPORTED_CONFIG error is logged, and
the domain fails to start.
2011-02-17 11:07:58 -05:00
..
api_extension build: use shorter file names for 'make dist' 2010-10-27 16:29:25 -06:00
devhelp Fix rebuilding of devhelp files 2009-10-06 11:12:53 +01:00
html Remove all generated docs from source control 2009-09-21 14:41:47 +01:00
internals maint: whitespace cleanup 2011-02-09 11:18:06 -07:00
schemas Add txmode attribute to interface XML for virtio backend 2011-02-17 11:07:58 -05:00
.gitignore Add automatic generation of a todo item page 2010-10-12 11:26:52 +01:00
32favicon.png
api_extension.html.in build: use shorter file names for 'make dist' 2010-10-27 16:29:25 -06:00
api.html.in docs: added a table of contents to the first 11 docs files 2010-10-27 15:01:45 +11:00
apibuild.py build: Fix VPATH build 2011-02-17 14:11:24 +01:00
apps.html.in docs: added link for nimbus to apps page 2011-02-16 00:16:09 +11:00
archdomain.html.in Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
architecture.fig
architecture.gif
architecture.html.in docs: added a table of contents to the first 11 docs files 2010-10-27 15:01:45 +11:00
archnetwork.html.in docs: added a table of contents to the first 11 docs files 2010-10-27 15:01:45 +11:00
archnode.html.in Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
archstorage.html.in Cleanup whitespace in docs 2009-11-06 16:05:18 +01:00
auth.html.in docs: added a table of contents to the first 11 docs files 2010-10-27 15:01:45 +11:00
bindings.html.in docs: Add information about libvirt-php new location 2011-02-09 12:29:29 -07:00
bugs.html.in Augment bug reporting documentation 2010-11-10 13:16:37 +01:00
compiling.html.in docs: added compiling page and significantly expanded windows page 2010-12-21 20:55:10 +11:00
contact.html.in docs: added libvirt-announce to contact page 2011-01-05 18:07:30 +11:00
csharp.html.in docs: updated c# bindings with arnauds latest changes 2010-11-30 02:22:38 +11:00
deployment.html.in docs: added a table of contents to the first 11 docs files 2010-10-27 15:01:45 +11:00
devguide.html.in docs: added a table of contents to the first 11 docs files 2010-10-27 15:01:45 +11:00
docs.html.in Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
downloads.html.in docs: added compiling page and significantly expanded windows page 2010-12-21 20:55:10 +11:00
drivers.html.in Add info about VMware driver to the libvirt website 2010-12-23 08:12:15 -07:00
drvesx.html.in esx: Add documentation about certificates and connection problems 2010-10-22 22:08:22 +02:00
drvlxc.html.in docs: fix lxc examples 2010-08-24 11:14:46 -06:00
drvone.html.in Whitespace cleanup for pre-tags on the website 2009-11-16 22:42:13 +01:00
drvopenvz.html.in docs: fix typos 2011-02-15 13:50:28 -07:00
drvqemu.html.in docs: fix typo 2010-11-01 15:24:44 -06:00
drvremote.html.in Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
drvtest.html.in Whitespace cleanup for pre-tags on the website 2009-11-16 22:42:13 +01:00
drvuml.html.in docs: fix typos 2011-02-15 13:50:28 -07:00
drvvbox.html.in Whitespace cleanup for pre-tags on the website 2009-11-16 22:42:13 +01:00
drvvmware.html.in docs: Make VMware Workstation / Player page appear in the menu 2010-12-23 17:01:17 +01:00
drvxen.html.in docs: Emphasize that devices have to be inside the <devices> element 2010-02-04 19:09:28 +01:00
errors.html.in Fix a number of small typos 2009-09-22 12:55:39 +02:00
et.png * docs/Makefile.am docs/et.png docs/libvirt.css docs/page.xsl 2008-04-28 08:29:35 +00:00
firewall.html.in html docs: added firewall explanation page by daniel berrange 2010-07-10 22:47:00 +10:00
footer_corner.png Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
footer_pattern.png Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
format.html.in Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
formatcaps.html.in Introduce per-device boot element 2011-01-17 17:08:13 +01:00
formatdomain.html.in Add txmode attribute to interface XML for virtio backend 2011-02-17 11:07:58 -05:00
formatnetwork.html.in Turn on IPv6 support in the bridge_driver.c virtual network driver 2010-12-23 15:54:46 -05:00
formatnode.html.in Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
formatnwfilter.html.in nwfilter: Add 2nd example to the html docs 2010-10-07 06:50:26 -04:00
formatsecret.html.in Cleanup whitespace in docs 2009-11-06 16:05:18 +01:00
formatsnapshot.html.in Website documentation for the snapshot XML. 2010-04-06 09:44:03 -04:00
formatstorage.html.in Fix broken XML entity for '>' 2010-11-25 10:40:07 +01:00
formatstorageencryption.html.in Add volume encryption information handling. 2009-09-01 18:27:28 +01:00
generic.css Fix missing background color 2009-12-03 15:27:24 +01:00
goals.html.in Fix a typo in docs 2010-05-07 19:52:35 +02:00
hacking1.xsl Generate HACKING from docs/hacking.html.in 2010-11-12 19:47:20 +01:00
hacking2.xsl Generate HACKING from docs/hacking.html.in 2010-11-12 19:47:20 +01:00
hacking.html.in maint: document dislike of mismatched if/else bracing 2011-01-05 11:05:28 -07:00
hooks.html.in maint: use gnulib configmake rather than open-coding things 2010-11-17 08:58:58 -07:00
hvsupport.html.in esx: Add documentation to the website 2009-11-15 15:21:13 +01:00
index.html.in docs/index.html.in: update KVM url 2011-02-07 11:14:49 -07:00
index.py Change libvirtd description from qemu only to various VM(i.e. Xen, LXC) 2008-05-15 06:12:32 +00:00
internals.html.in maint: whitespace cleanup 2011-02-09 11:18:06 -07:00
intro.html.in * docs/*: start cleanup/revamp of architecture docs 2009-04-02 12:01:11 +00:00
java.html.in Fix a number of small typos 2009-09-22 12:55:39 +02:00
library.xen remove all trailing blank lines 2009-07-16 15:06:42 +02:00
libvirt-daemon-arch.fig Api documentation 2009-04-15 20:42:50 +00:00
libvirt-daemon-arch.png Api documentation 2009-04-15 20:42:50 +00:00
libvirt-driver-arch.fig Api documentation 2009-04-15 20:42:50 +00:00
libvirt-driver-arch.png Api documentation 2009-04-15 20:42:50 +00:00
libvirt-header-bg.png Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
libvirt-header-logo.png Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
libvirt-net-logical.fig Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
libvirt-net-logical.png Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
libvirt-net-physical.fig Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
libvirt-net-physical.png Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
libvirt-object-model.fig Api documentation 2009-04-15 20:42:50 +00:00
libvirt-object-model.png Api documentation 2009-04-15 20:42:50 +00:00
libvirt.css docs: Add additional indentation to level 3 menu items 2010-12-17 23:10:33 +01:00
libvirtLogo.png * //* : renamed the project libvirt , this affects all makefiles, 2006-02-09 17:45:11 +00:00
logging.html.in docs: grammar cleanups on logging examples 2010-09-23 11:14:23 -06:00
madeWith.png * //* : renamed the project libvirt , this affects all makefiles, 2006-02-09 17:45:11 +00:00
main.css Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
Makefile.am build: Fix VPATH build 2011-02-17 14:11:24 +01:00
newapi.xsl Change generated HTML to UTF-8 encoding 2009-12-08 16:09:33 +01:00
news.html.in Release of libvirt-0.8.8 2011-02-17 12:11:03 +08:00
news.xsl Convert NEWS to UTF-8 2009-07-29 09:04:21 +01:00
node.fig
node.gif
page.xsl docs: replace CRLF with LF 2011-01-28 08:44:05 -07:00
php.html.in docs: Add information about libvirt-php new location 2011-02-09 12:29:29 -07:00
python.html.in Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
relatedlinks.html.in Cleanup whitespace in docs 2009-11-06 16:05:18 +01:00
remote.html.in docs: Add docs for new extra parameter pkipath 2011-01-27 20:47:17 -07:00
search.php A couple of fixes for the search PHP code 2011-01-17 16:55:41 +08:00
site.xsl Change generated HTML to UTF-8 encoding 2009-12-08 16:09:33 +01:00
sitemap.html.in Add libvirt-php information page 2011-02-09 09:43:09 +08:00
storage.html.in docs: fix the xml validity errors regarding name and id 2010-09-17 00:41:08 +10:00
structures.fig
subsite.xsl virCommand: docs for usage of new command APIs 2010-12-02 16:00:47 -07:00
todo.cfg-example Add automatic generation of a todo item page 2010-10-12 11:26:52 +01:00
todo.pl Fix off-by-1 in todo page generator 2010-11-05 13:24:04 +00:00
uri.html.in xen-proxy: Remove it entirely and use libvirtd instead 2010-11-08 22:00:35 +01:00
virshcmdref.html.in docs: updated memtune info again in virsh command reference 2011-01-11 07:33:15 +11:00
windows.html.in docs: updated windows page for new 0.8.7 installer 2011-01-19 05:00:44 +11:00
wrapstring.xsl Generate HACKING from docs/hacking.html.in 2010-11-12 19:47:20 +01:00