summaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
authorBilly O'Mahony <billy.o.mahony@intel.com>2015-07-07 14:26:14 +0100
committerMaryam Tahhan <maryam.tahhan@intel.com>2015-07-27 16:24:32 +0000
commit204a30e7f8d2c7b51208767c715916729b6017b2 (patch)
treef62e0524a38e3c34dd25f66f4b0ede2b5f1a58b2 /testcases
parent071071fb199833debb64625e51a4fc612e83019f (diff)
testcase: Add frame modification config
* Added a new standard set of flow table that defaults to routing phy1 to phy2 and vice-versa and allows frame modification and tuple matches to be added independently of routing. * Add a FrameMod testcase attribute - implement this for value 'vlan' * With FrameMod == 'vlan' the reported tx_fps and rx_fps figures do not match even for RFC2544 throughtput 0% packet loss - this is a pre-existing bug and a fix will be done as a separate patch. The rx_fps figure is the reliable figure. JIRA: VSPERF-27 Change-Id: Idd137b7a101305e7aebb6fabdfb6a7a4dcf8661b Signed-off-by: Billy O'Mahony<billy.o.mahony@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Eugene Snider <Eugene.Snider@huawei.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Gurpreet Singh <gurpreet.singh@spirent.com> Reviewed-by: Tv Rao <tv.rao@freescale.com>
Diffstat (limited to 'testcases')
-rw-r--r--testcases/testcase.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/testcases/testcase.py b/testcases/testcase.py
index 5ad91f2a..83e038db 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -31,7 +31,10 @@ class TestCase(object):
def __init__(self, cfg, results_dir):
"""Pull out fields from test config
- No external actions yet.
+ :param cfg: A dictionary of string-value pairs describing the test
+ configuration. Both the key and values strings use well-known
+ values.
+ :param results_dir: Where the csv formatted results are written.
"""
self._logger = logging.getLogger(__name__)
self.name = cfg['Name']
@@ -40,6 +43,9 @@ class TestCase(object):
self._deployment = cfg['Deployment']
self._collector = cfg['Collector']
self._bidir = cfg['biDirectional']
+ self._frame_mod = cfg.get('Frame Modification', None)
+ if self._frame_mod:
+ self._frame_mod = self._frame_mod.lower()
self._results_dir = results_dir
def run(self):
@@ -64,12 +70,20 @@ class TestCase(object):
self._collector,
loader.get_collector_class())
+
self._logger.debug("Setup:")
collector_ctl.log_cpu_stats()
with vswitch_ctl:
if vnf_ctl:
vnf_ctl.start()
traffic = {'traffic_type': self._traffic_type, 'bidir': self._bidir}
+ vswitch = vswitch_ctl.get_vswitch()
+ if self._frame_mod == "vlan":
+ flow = {'table':'2', 'priority':'1000', 'metadata':'2', 'actions': ['push_vlan:0x8100','goto_table:3']}
+ vswitch.add_flow('br0', flow)
+ flow = {'table':'2', 'priority':'1000', 'metadata':'1', 'actions': ['push_vlan:0x8100','goto_table:3']}
+ vswitch.add_flow('br0', flow)
+
with traffic_ctl:
traffic_ctl.send_traffic(traffic)