qemu: add multiqueue vhost-user support

This patch adds the support of queues attribute of the driver element
for vhost-user interface type. Example:

<interface type='vhostuser'>
      <mac address='52:54:00:ee:96:6d'/>
      <source type='unix' path='/tmp/vhost2.sock' mode='client'/>
      <model type='virtio'/>
      <driver queues='4'/>
</interface>

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

Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Maxime Leroy
2015-02-26 12:45:57 +01:00
committed by Martin Kletzander
parent 7971723b98
commit 366c22f2bc
5 changed files with 97 additions and 8 deletions

View File

@@ -4254,13 +4254,16 @@ qemu-kvm -net nic,model=? /dev/null
</dd>
<dt><code>queues</code></dt>
<dd>
The optional <code>queues</code> attribute controls the number of
queues to be used for the<a href="http://www.linux-kvm.org/page/Multiqueue">
Multiqueue virtio-net</a> feature. If the interface has <code>&lt;model
type='virtio'/&gt;</code>, multiple packet processing queues can be
created; each queue will potentially be handled by a different
The optional <code>queues</code> attribute controls the number
of queues to be used for either
<a href="http://www.linux-kvm.org/page/Multiqueue"> Multiqueue
virtio-net</a> or <a href="#elementVhostuser">vhost-user</a> network
interfaces. Use of multiple packet processing queues requires the
interface having the <code>&lt;model type='virtio'/&gt;</code>
element. Each queue will potentially be handled by a different
processor, resulting in much higher throughput.
<span class="since">Since 1.0.6 (QEMU and KVM only)</span>
<span class="since">virtio-net since 1.0.6 (QEMU and KVM only)</span>
<span class="since">vhost-user since 1.2.17 (QEMU and KVM only)</span>
</dd>
<dt><code>host</code> offloading options</dt>
<dd>
@@ -4581,9 +4584,15 @@ qemu-kvm -net nic,model=? /dev/null
&lt;devices&gt;
&lt;interface type='vhostuser'&gt;
&lt;mac address='52:54:00:3b:83:1a'/&gt;
&lt;source type='unix' path='/tmp/vhost.sock' mode='server'/&gt;
&lt;source type='unix' path='/tmp/vhost1.sock' mode='server'/&gt;
&lt;model type='virtio'/&gt;
&lt;/interface&gt;
&lt;interface type='vhostuser'&gt;
&lt;mac address='52:54:00:3b:83:1b'/&gt;
&lt;source type='unix' path='/tmp/vhost2.sock' mode='client'/&gt;
&lt;model type='virtio'/&gt;
&lt;driver queues='5'/&gt;
&lt;/interface&gt;
&lt;/devices&gt;
...</pre>