summaryrefslogtreecommitdiffstats
path: root/vswitches
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2016-09-02 12:33:06 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-09-02 12:33:07 +0000
commit6a56d40bcb2de85c22bc19af2527e9c9227f33e2 (patch)
treea96dd01b0ff84432b7581623b991536fde7e5694 /vswitches
parent695f734862c884d09c24b54d8d2914b3816837f2 (diff)
parentc9cd093f2f441adc9dd33627255326008e021a67 (diff)
Merge "multi VM: Multi VMs in serial or parallel"
Diffstat (limited to 'vswitches')
-rw-r--r--vswitches/ovs_vanilla.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/vswitches/ovs_vanilla.py b/vswitches/ovs_vanilla.py
index 332725e3..40ca970e 100644
--- a/vswitches/ovs_vanilla.py
+++ b/vswitches/ovs_vanilla.py
@@ -61,7 +61,9 @@ class OvsVanilla(IVSwitchOvs):
for i in range(self._vport_id):
tapx = 'tap' + str(i)
tap_cmd_list = ['sudo', 'ip', 'tuntap', 'del', tapx, 'mode', 'tap']
- if int(settings.getValue('GUEST_NIC_QUEUES')):
+ # let's assume, that all VMs have NIC QUEUES enabled or disabled
+ # at the same time
+ if int(settings.getValue('GUEST_NIC_QUEUES')[0]):
tap_cmd_list += ['multi_queue']
tasks.run_task(tap_cmd_list, self._logger, 'Deleting ' + tapx, False)
self._vport_id = 0
@@ -112,13 +114,17 @@ class OvsVanilla(IVSwitchOvs):
tap_name = 'tap' + str(self._vport_id)
self._vport_id += 1
tap_cmd_list = ['sudo', 'ip', 'tuntap', 'del', tap_name, 'mode', 'tap']
- if int(settings.getValue('GUEST_NIC_QUEUES')):
+ # let's assume, that all VMs have NIC QUEUES enabled or disabled
+ # at the same time
+ if int(settings.getValue('GUEST_NIC_QUEUES')[0]):
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')):
+ # let's assume, that all VMs have NIC QUEUES enabled or disabled
+ # at the same time
+ if int(settings.getValue('GUEST_NIC_QUEUES')[0]):
tap_cmd_list += ['multi_queue']
tasks.run_task(tap_cmd_list, self._logger,
'Creating tap device...', False)