aboutsummaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2016-03-18 10:40:42 +0000
committerMartin Klozik <martinx.klozik@intel.com>2016-04-14 08:23:50 +0100
commit55db32610210f3163971557382e653be6667e333 (patch)
tree139c4a7d631e34b05e89c88ac446dc51c33fd613 /testcases
parent0c0d7c2fa564bd9ab2e7da40e7bd009b1e7a8650 (diff)
sriov: Support of SRIOV and Qemu PCI passthrough
Generic support of SRIOV has been added. Virtual interfaces can be used in multiplei scenarios instead of physical NICs. Virtual functions can be directly accessed from VM by PCI passthrough method. Another option is to use VFs with vSwtich to evaluate impact on performance. Additonal modifications: * Automatic detection of NIC details has been added to simplify configuration. * Obsoleted configuration options have been removed. * Logging usage within vsperf script was fixed. * Vsperf main was refactored and final cleanup function added. * Configurable forwarding mode of TestPMD executed inside VM. JIRA: VSPERF-198 Change-Id: I4a0d5d262b245d433b12419de79399fb5825a623 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: Brian Castelli <brian.castelli@spirent.com>
Diffstat (limited to 'testcases')
-rw-r--r--testcases/integration.py4
-rw-r--r--testcases/performance.py4
-rw-r--r--testcases/testcase.py13
3 files changed, 15 insertions, 6 deletions
diff --git a/testcases/integration.py b/testcases/integration.py
index ecaed14f..53ba17f4 100644
--- a/testcases/integration.py
+++ b/testcases/integration.py
@@ -28,11 +28,11 @@ class IntegrationTestCase(TestCase):
"""IntegrationTestCase class
"""
- def __init__(self, cfg, results_dir):
+ def __init__(self, cfg):
""" Testcase initialization
"""
self._type = 'integration'
- super(IntegrationTestCase, self).__init__(cfg, results_dir)
+ super(IntegrationTestCase, self).__init__(cfg)
self._logger = logging.getLogger(__name__)
self._inttest = None
diff --git a/testcases/performance.py b/testcases/performance.py
index 0ae3ea77..a4769a28 100644
--- a/testcases/performance.py
+++ b/testcases/performance.py
@@ -25,11 +25,11 @@ class PerformanceTestCase(TestCase):
In this basic form runs RFC2544 throughput test
"""
- def __init__(self, cfg, results_dir):
+ def __init__(self, cfg):
""" Testcase initialization
"""
self._type = 'performance'
- super(PerformanceTestCase, self).__init__(cfg, results_dir)
+ super(PerformanceTestCase, self).__init__(cfg)
self._logger = logging.getLogger(__name__)
def run_report(self):
diff --git a/testcases/testcase.py b/testcases/testcase.py
index 0effce75..ff1247fc 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -36,7 +36,7 @@ class TestCase(object):
In this basic form runs RFC2544 throughput test
"""
- def __init__(self, cfg, results_dir):
+ def __init__(self, cfg):
"""Pull out fields from test config
:param cfg: A dictionary of string-value pairs describing the test
@@ -114,7 +114,7 @@ class TestCase(object):
if self._frame_mod:
self._frame_mod = self._frame_mod.lower()
- self._results_dir = results_dir
+ self._results_dir = S.getValue('RESULTS_PATH')
# set traffic details, so they can be passed to vswitch and traffic ctls
self._traffic = copy.deepcopy(TRAFFIC_DEFAULTS)
@@ -163,6 +163,14 @@ class TestCase(object):
self._traffic['l2'] = S.getValue(self._tunnel_type.upper() + '_FRAME_L2')
self._traffic['l3'] = S.getValue(self._tunnel_type.upper() + '_FRAME_L3')
self._traffic['l4'] = S.getValue(self._tunnel_type.upper() + '_FRAME_L4')
+ elif S.getValue('NICS')[0]['type'] == 'vf' or S.getValue('NICS')[1]['type'] == 'vf':
+ mac1 = S.getValue('NICS')[0]['mac']
+ mac2 = S.getValue('NICS')[1]['mac']
+ if mac1 and mac2:
+ self._traffic['l2'].update({'srcmac': mac2, 'dstmac': mac1})
+ else:
+ self._logger.debug("MAC addresses can not be read")
+
self._logger.debug("Controllers:")
@@ -177,6 +185,7 @@ class TestCase(object):
if self._vswitch_none:
self._vswitch_ctl = component_factory.create_pktfwd(
+ self.deployment,
loader.get_pktfwd_class())
else:
self._vswitch_ctl = component_factory.create_vswitch(