summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas Graf <tgraf@noironetworks.com>2014-08-15 01:01:50 +0200
committerBen Pfaff <blp@nicira.com>2014-08-15 09:36:51 -0700
commit1b0ee636c467b1e946697a320f8130db13541da7 (patch)
tree071cf8b69de563ac96b680e1754578bf08551b3b /tests
parent4e25b8c13b14acdd0715b806e04fa190a98e29b6 (diff)
downloadopenvswitch-1b0ee636c467b1e946697a320f8130db13541da7.tar.gz
ofp-actions: Include OFPACT_REG_MOVE in action set
Treating OFPACT_REG_MOVE as a "set" action preserves the order of loads and moves and allows a load to overwrite a previous move to the same register. This makes the following work: add-group br0 group_id=1234,type=all, \ bucket=output:10,move:NXM_NX_REG1[]->NXM_OF_IP_SRC[], \ bucket=output:11 add-flow br0 ip actions=load:0xffffffff->NXM_NX_REG1[],group:1234 Signed-off-by: Thomas Graf <tgraf@noironetworks.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ofproto-dpif.at13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index eda693960..17fe97417 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -431,6 +431,19 @@ AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
OVS_VSWITCHD_STOP
AT_CLEANUP
+AT_SETUP([ofproto-dpif - load and move order])
+OVS_VSWITCHD_START
+ADD_OF_PORTS([br0], [1], [10], [11])
+AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,move:NXM_NX_REG1[[]]->NXM_OF_IP_SRC[[]],bucket=output:11'])
+AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(load:0xffffffff->NXM_NX_REG1[[]],move:NXM_NX_REG1[[]]->NXM_NX_REG2[[]],group:1234)'])
+AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
+AT_CHECK([tail -2 stdout], [0],
+ [Megaflow: recirc_id=0,skb_priority=0,icmp,in_port=1,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=128
+Datapath actions: set(ipv4(src=255.255.255.255,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no)),10,set(ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no)),11
+])
+OVS_VSWITCHD_STOP
+AT_CLEANUP
+
AT_SETUP([ofproto-dpif - push-pop])
OVS_VSWITCHD_START
ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])