Implement OpenFlow 1.4+ OFPTC_EVICTION.
[cascardo/ovs.git] / tests / ofproto.at
index c4556f7..54c077d 100644 (file)
@@ -1869,11 +1869,13 @@ OVS_VSWITCHD_START
 # Configure a maximum of 4 flows.
 AT_CHECK(
   [ovs-vsctl \
-     -- --id=@t0 create Flow_Table name=evict flow-limit=4 overflow-policy=evict \
+     -- --id=@t0 create Flow_Table name=evict flow-limit=4 \
      -- set bridge br0 flow_tables:0=@t0 \
    | ${PERL} $srcdir/uuidfilt.pl],
   [0], [<0>
 ])
+# Use mod-table to turn on eviction just to demonstrate that it works.
+AT_CHECK([ovs-ofctl -O OpenFlow14 mod-table br0 0 evict])
 # Add 4 flows.
 for in_port in 4 3 2 1; do
     ovs-ofctl -O Openflow14 add-flow br0 importance=$((in_port + 30)),priority=$((in_port + 5)),hard_timeout=$((in_port + 500)),actions=drop
@@ -1895,7 +1897,7 @@ AT_CHECK([ovs-ofctl -O Openflow14 dump-flows br0 | ofctl_strip | sort], [0], [dn
 OFPST_FLOW reply (OF1.4):
 ])
 # Disable the Eviction configuration.
-AT_CHECK([ovs-vsctl set Flow_Table evict overflow-policy=refuse])
+AT_CHECK([ovs-ofctl -O OpenFlow14 mod-table br0 0 noevict])
 # Adding another flow will cause the system to give error for FULL TABLE.
 AT_CHECK([ovs-ofctl -O Openflow14 add-flow br0 hard_timeout=506,importance=36,priority=11,actions=drop],[1], [], [stderr])
 AT_CHECK([head -n 1 stderr | ofctl_strip], [0],