From c9cd093f2f441adc9dd33627255326008e021a67 Mon Sep 17 00:00:00 2001
From: Martin Klozik <martinx.klozik@intel.com>
Date: Tue, 16 Aug 2016 14:59:05 +0100
Subject: multi VM: Multi VMs in serial or parallel

Support for deployment scenarios with any number of VMs
in both serial and parallel configuration. Detailed
content of the patch:

* VswitchControllerPXP class for multi VM support
* pvvpxx and pvpvxx deployments for xx VMs in
  serial respective parallel configuration
* special GUEST_ options expansion to requested
  number of VMs;
* support of GUEST_ options specific macros
  #VMINDEX, #MAC(), #IP() and #EVAL()
* all GUEST specific options are turned to lists
  to be VM specific
* support for VM with 1 NIC
* support for VM with multiple NIC pairs; traffic
  is routed in serial or parallel between NIC paris
  based on deployment scenario
* support for PVVP and PVPV scenarios using VMs
  with different numbers of NICs

JIRA: VSPERF-361

Change-Id: I05bedbdfa9a81ea0166d9b03d83ae49d6cb8b19b
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Al Morton <acmorton@att.com>
Reviewed-by: Christian Trautman <ctrautma@redhat.com>
Reviewed-by: Bill Michalowski <bmichalo@redhat.com>
Reviewed-by: Antonio Fischetti <antonio.fischetti@intel.com>
---
 vswitches/ovs_vanilla.py | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

(limited to 'vswitches')

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)
-- 
cgit 1.2.3-korg