[ovs-dev] [PATCH] tests: Add test that 1.5 copy-field can copy into the standardized xregs.

Ben Pfaff blp at nicira.com
Thu Aug 21 05:17:48 UTC 2014


From: Jean Tourrilhes <jean.tourrilhes at hp.com>

Signed-off-by: Jean Tourrilhes <jt at hpl.hp.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
Jean supplied this patch via github and the ONF JIRA ticketing system.
I have already applied it to master; I am posting it now so that readers of
ovs-dev see it.

diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index 17fe974..7e7d907 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -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])
-- 
1.9.1




More information about the dev mailing list