summaryrefslogtreecommitdiffstats
path: root/vnfs/qemu/qemu_virtio_net.py
diff options
context:
space:
mode:
authorChristian Trautman <ctrautma@redhat.com>2016-07-22 15:54:18 -0400
committerMaryam Tahhan <maryam.tahhan@intel.com>2016-08-24 08:43:16 +0000
commit0fb65d2afadad1f092788f5a4f251b09851b3ae7 (patch)
tree33a8fa5f6dd575d30bc748deb137433a53031218 /vnfs/qemu/qemu_virtio_net.py
parentbd8712a917d9a0c7272506fd85816f857c32529e (diff)
Vanilla_Multi_Queue: Add vanilla ovs multi-queue functionality
Adds multi-queue for vanilla OVS using virtio-net. TunTap ports will use multi_queue parameter when ports are created/deleted if guest nic queues are enabled and vswitch is ovs vanilla. Virtio net will now add guest nic queues to qemu command line if appropriate. Reworked multi-queue documentation to reflect these changes. Adds vhost net thread affinitization which is recommended when performing vanilla ovs multi-queue. Guests will require ethtool if using l2fwd or linux bridge as the loopback application when vanilla ovs multi-queue is enabled. Modified dpdk setting in vswitch conf to be better worded for separation from vanilla ovs multi-queue. Updated release and installation doc for new vloop image that includes required ethtool utility. JIRA: VSPERF-373 Change-Id: Idb550515190b1a93390308c11f54da368f962512 Signed-off-by: Christian Trautman <ctrautma@redhat.com>
Diffstat (limited to 'vnfs/qemu/qemu_virtio_net.py')
-rw-r--r--vnfs/qemu/qemu_virtio_net.py26
1 files changed, 19 insertions, 7 deletions
diff --git a/vnfs/qemu/qemu_virtio_net.py b/vnfs/qemu/qemu_virtio_net.py
index e5e895f2..afb519c3 100644
--- a/vnfs/qemu/qemu_virtio_net.py
+++ b/vnfs/qemu/qemu_virtio_net.py
@@ -41,22 +41,34 @@ class QemuVirtioNet(IVnfQemu):
if1 = str(i)
if2 = str(i + 1)
+ # multi-queue values
+ if int(S.getValue('GUEST_NIC_QUEUES')):
+ queue_str = ',queues={}'.format(S.getValue('GUEST_NIC_QUEUES'))
+ mq_vector_str = ',mq=on,vectors={}'.format(
+ int(S.getValue('GUEST_NIC_QUEUES')) * 2 + 2)
+ else:
+ queue_str, mq_vector_str = '', ''
+
self._cmd += ['-netdev',
- 'type=tap,id=' + self._net1 +
+ 'tap,id=' + self._net1 + queue_str +
',script=no,downscript=no,' +
'ifname=tap' + if1 + ',vhost=on',
'-device',
'virtio-net-pci,mac=' +
S.getValue('GUEST_NET1_MAC')[self._number] +
- ',netdev=' + self._net1 + ',csum=off,gso=off,' +
- 'guest_tso4=off,guest_tso6=off,guest_ecn=off',
+ ',netdev=' + self._net1 +
+ ',csum=off,gso=off,' +
+ 'guest_tso4=off,guest_tso6=off,guest_ecn=off' +
+ mq_vector_str,
'-netdev',
- 'type=tap,id=' + self._net2 +
+ 'tap,id=' + self._net2 + queue_str +
',script=no,downscript=no,' +
'ifname=tap' + if2 + ',vhost=on',
'-device',
'virtio-net-pci,mac=' +
S.getValue('GUEST_NET2_MAC')[self._number] +
- ',netdev=' + self._net2 + ',csum=off,gso=off,' +
- 'guest_tso4=off,guest_tso6=off,guest_ecn=off',
- ]
+ ',netdev=' + self._net2 +
+ ',csum=off,gso=off,' +
+ 'guest_tso4=off,guest_tso6=off,guest_ecn=off' +
+ mq_vector_str,
+ ]