aboutsummaryrefslogtreecommitdiffstats
path: root/vswitches/ovs_vanilla.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 /vswitches/ovs_vanilla.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 'vswitches/ovs_vanilla.py')
-rw-r--r--vswitches/ovs_vanilla.py27
1 files changed, 15 insertions, 12 deletions
diff --git a/vswitches/ovs_vanilla.py b/vswitches/ovs_vanilla.py
index f880dfaf..332725e3 100644
--- a/vswitches/ovs_vanilla.py
+++ b/vswitches/ovs_vanilla.py
@@ -60,9 +60,10 @@ class OvsVanilla(IVSwitchOvs):
# remove all tap interfaces
for i in range(self._vport_id):
tapx = 'tap' + str(i)
- tasks.run_task(['sudo', 'ip', 'tuntap', 'del',
- tapx, 'mode', 'tap'],
- self._logger, 'Deleting ' + tapx, False)
+ tap_cmd_list = ['sudo', 'ip', 'tuntap', 'del', tapx, 'mode', 'tap']
+ if int(settings.getValue('GUEST_NIC_QUEUES')):
+ tap_cmd_list += ['multi_queue']
+ tasks.run_task(tap_cmd_list, self._logger, 'Deleting ' + tapx, False)
self._vport_id = 0
super(OvsVanilla, self).stop()
@@ -71,7 +72,6 @@ class OvsVanilla(IVSwitchOvs):
self._module_manager.remove_modules()
-
def add_phy_port(self, switch_name):
"""
Method adds port based on detected device names.
@@ -111,14 +111,17 @@ class OvsVanilla(IVSwitchOvs):
# Create tap devices for the VM
tap_name = 'tap' + str(self._vport_id)
self._vport_id += 1
-
- tasks.run_task(['sudo', 'ip', 'tuntap', 'del',
- tap_name, 'mode', 'tap'],
- self._logger, 'Creating tap device...', False)
-
- tasks.run_task(['sudo', 'ip', 'tuntap', 'add',
- tap_name, 'mode', 'tap'],
- self._logger, 'Creating tap device...', False)
+ tap_cmd_list = ['sudo', 'ip', 'tuntap', 'del', tap_name, 'mode', 'tap']
+ if int(settings.getValue('GUEST_NIC_QUEUES')):
+ tap_cmd_list += ['multi_queue']
+ tasks.run_task(tap_cmd_list, self._logger,
+ 'Creating tap device...', False)
+
+ tap_cmd_list = ['sudo', 'ip', 'tuntap', 'add', tap_name, 'mode', 'tap']
+ if int(settings.getValue('GUEST_NIC_QUEUES')):
+ tap_cmd_list += ['multi_queue']
+ tasks.run_task(tap_cmd_list, self._logger,
+ 'Creating tap device...', False)
tasks.run_task(['sudo', 'ip', 'addr', 'flush', 'dev', tap_name],
self._logger, 'Remove IP', False)