summaryrefslogtreecommitdiffstats
path: root/core
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 /core
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 'core')
-rw-r--r--core/vswitch_controller_p2p.py29
1 files changed, 28 insertions, 1 deletions
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)