tests: Add test that 1.5 copy-field can copy into the standardized xregs.
authorJean Tourrilhes <jean.tourrilhes@hp.com>
Thu, 21 Aug 2014 00:40:41 +0000 (17:40 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 21 Aug 2014 05:16:20 +0000 (22:16 -0700)
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tests/ofproto-dpif.at

index 17fe974..7e7d907 100644 (file)
@@ -444,6 +444,26 @@ Datapath actions: set(ipv4(src=255.255.255.255,dst=192.168.0.2,proto=1,tos=0,ttl
 OVS_VSWITCHD_STOP
 AT_CLEANUP
 
+dnl Tests that 1.5 copy-field can copy into the standardized xregs.
+AT_SETUP([ofproto-dpif - copy-field into extended registers])
+OVS_VSWITCHD_START
+ADD_OF_PORTS([br0], [1], [2], [3])
+AT_DATA([flows.txt], [dnl
+table=0     actions=move:OXM_OF_ETH_SRC[[0..47]]->OXM_OF_PKT_REG0[[0..47]],goto_table(1)
+table=1,xreg0=0x0000505400000005   actions=2
+
+# These low-priority rules shouldn't match.  They're here only to make really
+# sure that the test fails if either of the above rules fails to match.
+table=0,priority=0                        actions=3
+table=1,priority=0                        actions=3
+])
+AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
+AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
+AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
+])
+OVS_VSWITCHD_STOP
+AT_CLEANUP
+
 AT_SETUP([ofproto-dpif - push-pop])
 OVS_VSWITCHD_START
 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])