summaryrefslogtreecommitdiff
path: root/tests/ofproto.at
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-07-28 15:25:48 -0700
committerBen Pfaff <blp@nicira.com>2011-08-09 09:17:02 -0700
commit0697b5c3c9954057028f406757c4fd0208b929b9 (patch)
treed24f9c663578ecb9bfad4464418c2348f2006bd1 /tests/ofproto.at
parentb772ded808ccc1b3cce2c10377a35637b1beb28c (diff)
downloadopenvswitch-0697b5c3c9954057028f406757c4fd0208b929b9.tar.gz
ofproto-dpif: Add multiple table support.
Tables other than 0 can be modified and dumped, but they are not yet useful because actions and flow table lookups never use them.
Diffstat (limited to 'tests/ofproto.at')
-rw-r--r--tests/ofproto.at20
1 files changed, 8 insertions, 12 deletions
diff --git a/tests/ofproto.at b/tests/ofproto.at
index ca8a558ed..66a0650b6 100644
--- a/tests/ofproto.at
+++ b/tests/ofproto.at
@@ -11,7 +11,7 @@ OFPROTO_START
AT_CHECK([ovs-ofctl -vANY:ANY:WARN show br0], [0], [stdout])
AT_CHECK([STRIP_XIDS stdout], [0], [dnl
OFPT_FEATURES_REPLY: ver:0x1, dpid:fedcba9876543210
-n_tables:1, n_buffers:256
+n_tables:255, n_buffers:256
features: capabilities:0x87, actions:0xfff
LOCAL(br0): addr:aa:55:aa:55:00:00
config: PORT_DOWN
@@ -59,7 +59,7 @@ do
AT_CHECK([ovs-ofctl -vANY:ANY:WARN show br0], [0], [stdout])
AT_CHECK_UNQUOTED([STRIP_XIDS stdout], [0], [dnl
OFPT_FEATURES_REPLY: ver:0x1, dpid:fedcba9876543210
-n_tables:1, n_buffers:256
+n_tables:255, n_buffers:256
features: capabilities:0x87, actions:0xfff
LOCAL(br0): addr:aa:55:aa:55:00:00
config: $config
@@ -76,16 +76,14 @@ AT_CHECK([ovs-ofctl dump-flows br0 | STRIP_XIDS], [0], [NXST_FLOW reply:
])
AT_CHECK([echo 'in_port=1,actions=0' | ovs-ofctl add-flows br0 -])
AT_CHECK([ovs-ofctl add-flow br0 in_port=0,actions=1])
-# Check that a table_id is really sent:
-AT_CHECK([ovs-ofctl -F nxm add-flow br0 table=1,in_port=0,actions=1 2>&1 | STRIP_XIDS | sed 1q], [0], [dnl
-OFPT_ERROR: type OFPET_FLOW_MOD_FAILED, code NXFMFC_BAD_TABLE_ID
-])
+AT_CHECK([ovs-ofctl -F nxm add-flow br0 table=1,in_port=3,actions=2])
AT_CHECK([ovs-ofctl dump-flows br0 | STRIP_XIDS | STRIP_DURATION | sort], [0], [dnl
cookie=0x0, duration=?s, table=0, n_packets=0, n_bytes=0, in_port=0 actions=output:1
cookie=0x0, duration=?s, table=0, n_packets=0, n_bytes=0, in_port=1 actions=output:0
+ cookie=0x0, duration=?s, table=1, n_packets=0, n_bytes=0, in_port=3 actions=output:2
NXST_FLOW reply:
])
-AT_CHECK([ovs-ofctl dump-aggregate br0 | STRIP_XIDS], [0], [dnl
+AT_CHECK([ovs-ofctl dump-aggregate br0 table=0 | STRIP_XIDS], [0], [dnl
NXST_AGGREGATE reply: packet_count=0 byte_count=0 flow_count=2
])
AT_CHECK([ovs-ofctl del-flows br0])
@@ -100,16 +98,14 @@ AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | STRIP_XIDS], [0], [OFPST_FLOW
])
AT_CHECK([echo 'in_port=1,actions=0' | ovs-ofctl -F openflow10 add-flows br0 -])
AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 in_port=0,actions=1])
-# Check that a table_id is really sent:
-AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 table=1,in_port=0,actions=1 2>&1 | STRIP_XIDS | sed 1q], [0], [dnl
-OFPT_ERROR: type OFPET_FLOW_MOD_FAILED, code NXFMFC_BAD_TABLE_ID
-])
+AT_CHECK([ovs-ofctl -F openflow10 add-flow br0 table=1,in_port=3,actions=2])
AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | STRIP_XIDS | STRIP_DURATION | sort], [0], [dnl
cookie=0x0, duration=?s, table=0, n_packets=0, n_bytes=0, in_port=0 actions=output:1
cookie=0x0, duration=?s, table=0, n_packets=0, n_bytes=0, in_port=1 actions=output:0
+ cookie=0x0, duration=?s, table=1, n_packets=0, n_bytes=0, in_port=3 actions=output:2
OFPST_FLOW reply:
])
-AT_CHECK([ovs-ofctl -F openflow10 dump-aggregate br0 | STRIP_XIDS], [0], [dnl
+AT_CHECK([ovs-ofctl -F openflow10 dump-aggregate br0 table=0 | STRIP_XIDS], [0], [dnl
OFPST_AGGREGATE reply: packet_count=0 byte_count=0 flow_count=2
])
AT_CHECK([ovs-ofctl -F openflow10 del-flows br0])