aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconf/01_testcases.conf13
-rw-r--r--core/vswitch_controller_p2p.py29
-rwxr-xr-xdocs/quickstart.md3
-rw-r--r--src/ovs/ofctl.py2
-rw-r--r--testcases/testcase.py16
5 files changed, 58 insertions, 5 deletions
diff --git a/conf/01_testcases.conf b/conf/01_testcases.conf
index 53d63e78..f0fe8ad1 100755
--- a/conf/01_testcases.conf
+++ b/conf/01_testcases.conf
@@ -35,15 +35,24 @@ PERFORMANCE_TESTS = [
"Traffic Type": "rfc2544",
"Collector": "cpu",
"Deployment": "p2p",
- "Description": "RFC2544 Throughput Phy2Phy Loopback",
"biDirectional": "True",
+ "Description": "LTD.Throughput.RFC2544.PacketLossRatio",
},
{
"Name": "back2back",
"Traffic Type": "back2back",
"Collector": "cpu",
"Deployment": "p2p",
- "Description": "RFC 2544 Back To Back Frames Test",
"biDirectional": "True",
+ "Description": "LTD.Throughput.RFC2544.BackToBackFrames",
+ },
+ {
+ "Name": "phy2phy_tput_mod_vlan",
+ "Traffic Type": "rfc2544",
+ "Collector": "cpu",
+ "Deployment": "p2p",
+ "Frame Modification": "vlan",
+ "biDirectional": "False",
+ "Description": "LTD.Throughput.RFC2544.PacketLossRatioFrameModification"
},
]
diff --git a/core/vswitch_controller_p2p.py b/core/vswitch_controller_p2p.py
index a71f42f5..f2ed73dd 100644
--- a/core/vswitch_controller_p2p.py
+++ b/core/vswitch_controller_p2p.py
@@ -59,7 +59,34 @@ class VswitchControllerP2P(IVswitchController):
(_, phy2_number) = self._vswitch.add_phy_port(BRIDGE_NAME)
self._vswitch.del_flow(BRIDGE_NAME)
- flow = add_ports_to_flow(_FLOW_TEMPLATE, phy1_number, phy2_number)
+
+ # table#0 - flows designed to force 5 & 13 tuple matches go here
+ flow = {'table':'0', 'priority':'1', 'actions': ['goto_table:1']}
+ self._vswitch.add_flow(BRIDGE_NAME, flow)
+
+ # table#1 - flows to route packets between ports goes here. The
+ # chosen port is communicated to subsequent tables by setting the
+ # metadata value to the egress port number
+ flow = {'table':'1', 'priority':'1', 'in_port':'1',
+ 'actions': ['write_actions(output:2)', 'write_metadata:2',
+ 'goto_table:2']}
+ self._vswitch.add_flow(BRIDGE_NAME, flow)
+ flow = {'table':'1', 'priority':'1', 'in_port':'2',
+ 'actions': ['write_actions(output:1)', 'write_metadata:1',
+ 'goto_table:2']}
+ self._vswitch.add_flow(BRIDGE_NAME, flow)
+
+ # Frame modification table. Frame modification flow rules are
+ # isolated in this table so that they can be turned on or off
+ # without affecting the routing or tuple-matching flow rules.
+ flow = {'table':'2', 'priority':'1', 'actions': ['goto_table:3']}
+ self._vswitch.add_flow(BRIDGE_NAME, flow)
+
+ # Egress table
+ # (TODO) Billy O'Mahony - the drop action here actually required in
+ # order to egress the packet. This is the subject of a thread on
+ # ovs-discuss 2015-06-30.
+ flow = {'table':'3', 'priority':'1', 'actions': ['drop']}
self._vswitch.add_flow(BRIDGE_NAME, flow)
flow = add_ports_to_flow(_FLOW_TEMPLATE, phy2_number, phy1_number)
diff --git a/docs/quickstart.md b/docs/quickstart.md
index b56af670..9ab15c15 100755
--- a/docs/quickstart.md
+++ b/docs/quickstart.md
@@ -3,6 +3,9 @@
## Hardware Requirements
VSPERF requires the following hardware to run tests: IXIA traffic generator (IxNetwork), a machine that runs the IXIA client software and a CentOS Linux release 7.1.1503 (Core) host.
+## vSwitch Requirements
+The vSwitch must support Open Flow 1.3 or greater.
+
## Installation
Follow the [installation instructions] to install.
diff --git a/src/ovs/ofctl.py b/src/ovs/ofctl.py
index c6aaddc9..a2a15ce1 100644
--- a/src/ovs/ofctl.py
+++ b/src/ovs/ofctl.py
@@ -124,7 +124,7 @@ class OFBridge(OFBase):
:return: None
"""
- cmd = ['sudo', _OVS_OFCTL_BIN, '--timeout', str(self.timeout)] + args
+ cmd = ['sudo', _OVS_OFCTL_BIN, '-O', 'OpenFlow13', '--timeout', str(self.timeout)] + args
return tasks.run_task(
cmd, self.logger, 'Running ovs-ofctl...', check_error)
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)