OVS_VSWITCHD_STOP
AT_CLEANUP
+AT_SETUP([ofproto - flow_mod negative test (OpenFlow 1.1)])
+OVS_VSWITCHD_START(
+ [set bridge br0 protocols=OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13])
+AT_CHECK([ovs-ofctl add-flow -O OpenFlow11 br0 table=1,action=goto_table:2])
+AT_CHECK([ovs-ofctl add-flow -O OpenFlow11 br0 table=1,action=goto_table:1],
+ [1], [], [stderr])
+
+# The output should look like this:
+#
+# OFPT_ERROR (OF1.1) (xid=0x2): OFPBRC_BAD_TABLE_ID
+# OFPT_FLOW_MOD (OF1.1) (xid=0x2):
+# (***truncated to 64 bytes from 160***)
+# 00000000 02 0e 00 a0 00 00 00 02-00 00 00 00 00 00 00 00 |................|
+# 00000010 00 00 00 00 00 00 00 00-01 00 00 00 00 00 80 00 |................|
+# 00000020 ff ff ff ff ff ff ff ff-ff ff ff ff 00 00 00 00 |................|
+# 00000030 00 00 00 58 00 00 00 00-00 00 03 ff 00 00 00 00 |...X............|
+#
+# This 'sed' command captures the error message but drops details.
+AT_CHECK([sed '/truncated/d
+/^000000.0/d' stderr | STRIP_XIDS], [0],
+ [OFPT_ERROR (OF1.1): OFPBRC_BAD_TABLE_ID
+OFPT_FLOW_MOD (OF1.1):
+])
+OVS_VSWITCHD_STOP
+AT_CLEANUP
+
AT_SETUP([ofproto - set-field flow_mod commands (NXM)])
OVS_VSWITCHD_START
AT_CHECK([ovs-ofctl add-flow br0 ipv6,table=1,in_port=3,actions=drop])
AT_SETUP([ofproto - flow table configuration (OpenFlow 1.2)])
OVS_VSWITCHD_START
# Check the default configuration.
-(mid="wild=0xffffffffff, max=1000000,"
+(mid="wild=0xfffffffff, max=1000000,"
tail="
lookup=0, matched=0
- match=0xffffffffff, instructions=0x00000007, config=0x00000003
+ match=0xfffffffff, instructions=0x00000007, config=0x00000003
write_actions=0x00000000, apply_actions=0x00000000
- write_setfields=0x000000ffffffffff
- apply_setfields=0x000000ffffffffff
+ write_setfields=0x0000000fffffffff
+ apply_setfields=0x0000000fffffffff
metadata_match=0xffffffffffffffff
metadata_write=0xffffffffffffffff"
echo "OFPST_TABLE reply (OF1.2) (xid=0x2): 254 tables
# Check that the configuration was updated.
mv expout orig-expout
(echo "OFPST_TABLE reply (OF1.2) (xid=0x2): 254 tables
- 0: main : wild=0xffffffffff, max=1000000, active=0"
+ 0: main : wild=0xfffffffff, max=1000000, active=0"
tail -n +3 orig-expout | head -7
- echo " 1: table1 : wild=0xffffffffff, max= 1024, active=0"
+ echo " 1: table1 : wild=0xfffffffff, max= 1024, active=0"
tail -n +11 orig-expout) > expout
AT_CHECK([ovs-ofctl -O OpenFlow12 dump-tables br0], [0], [expout])
OVS_VSWITCHD_STOP