aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-08-09 09:24:18 -0700
committerBen Pfaff <blp@nicira.com>2011-08-09 09:24:18 -0700
commit299016266ed13376a7d671f66d4e0181b41098e3 (patch)
treec57bdaf9dacc3102079e9f04db5bd0486f039210 /tests
parent0697b5c3c9954057028f406757c4fd0208b929b9 (diff)
New action NXAST_RESUBMIT_TABLE.
This makes multiple table support in ofproto-dpif useful, by allowing resubmits into tables other than 0.
Diffstat (limited to 'tests')
-rw-r--r--tests/automake.mk1
-rw-r--r--tests/ofproto-dpif.at19
-rw-r--r--tests/ovs-ofctl.at3
-rw-r--r--tests/testsuite.at1
4 files changed, 24 insertions, 0 deletions
diff --git a/tests/automake.mk b/tests/automake.mk
index eb6351f6..28b4e1d0 100644
--- a/tests/automake.mk
+++ b/tests/automake.mk
@@ -28,6 +28,7 @@ TESTSUITE_AT = \
tests/timeval.at \
tests/lockfile.at \
tests/reconnect.at \
+ tests/ofproto-dpif.at \
tests/ofproto-macros.at \
tests/ofproto.at \
tests/ovsdb.at \
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
new file mode 100644
index 00000000..846eccbd
--- /dev/null
+++ b/tests/ofproto-dpif.at
@@ -0,0 +1,19 @@
+AT_BANNER([ofproto-dpif])
+
+AT_SETUP([ofproto-dpif - resubmit])
+OFPROTO_START
+AT_DATA([flows.txt], [dnl
+table=0 in_port=1 priority=1000 icmp actions=output(10),resubmit(2),output(19),resubmit(3),output(21)
+table=0 in_port=2 priority=1500 icmp actions=output(11),resubmit(,1),output(16),resubmit(2,1),output(18)
+table=0 in_port=3 priority=2000 icmp actions=output(20)
+table=1 in_port=1 priority=1000 icmp actions=output(12),resubmit(4,1),output(13),resubmit(3),output(15)
+table=1 in_port=2 priority=1500 icmp actions=output(17),resubmit(,2)
+table=1 in_port=3 priority=1500 icmp actions=output(14),resubmit(,2)
+])
+AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
+AT_CHECK([ovs-appctl -t test-openflowd ofproto/trace br0 '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),icmp(type=8,code=0)'], [0], [stdout])
+AT_CHECK([tail -1 stdout], [0],
+ [Datapath actions: 10,11,12,13,14,15,16,17,18,19,20,21
+])
+OFPROTO_STOP
+AT_CLEANUP
diff --git a/tests/ovs-ofctl.at b/tests/ovs-ofctl.at
index 20dcc905..1edfb624 100644
--- a/tests/ovs-ofctl.at
+++ b/tests/ovs-ofctl.at
@@ -23,7 +23,9 @@ actions=bundle_load(eth_src,50,active_backup,ofport,NXM_NX_REG0[],slaves:1)
actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
actions=output:1,bundle_load(eth_src,0,hrw,ofport,NXM_NX_REG0[16..31],slaves:1),output:2
+actions=resubmit:1,resubmit(2),resubmit(,3),resubmit(2,3)
]])
+
AT_CHECK([ovs-ofctl parse-flows flows.txt
], [0], [stdout])
AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
@@ -49,6 +51,7 @@ NXT_FLOW_MOD: ADD table:255 actions=bundle_load(eth_src,50,active_backup,ofport,
NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
NXT_FLOW_MOD: ADD table:255 actions=output:1,bundle_load(eth_src,0,hrw,ofport,NXM_NX_REG0[16..31],slaves:1),output:2
+NXT_FLOW_MOD: ADD table:255 actions=resubmit:1,resubmit:2,resubmit(,3),resubmit(2,3)
]])
AT_CLEANUP
diff --git a/tests/testsuite.at b/tests/testsuite.at
index c22ece71..b394cb6f 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -60,6 +60,7 @@ m4_include([tests/timeval.at])
m4_include([tests/lockfile.at])
m4_include([tests/reconnect.at])
m4_include([tests/ofproto.at])
+m4_include([tests/ofproto-dpif.at])
m4_include([tests/ovsdb.at])
m4_include([tests/ovs-vsctl.at])
m4_include([tests/interface-reconfigure.at])