for delay in 1000 30000; do
ovs-appctl netdev-dummy/receive p1 'in_port(2),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=64,frag=no),icmp(type=8,code=0)'
+ sleep 1 # ensure the order in which these two packets are processed
ovs-appctl netdev-dummy/receive p2 'in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)'
ovs-appctl time/warp $delay
done
ovs-appctl time/warp 1000
+sleep 1 # wait for revalidator to update stats
AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
ovs-appctl time/warp 1000
ovs-appctl time/warp 1000
ovs-appctl time/warp 1000
+sleep 1
get_ages duration4 hard4 idle4
printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
in_port=1 actions=output:2
in_port=2 actions=mod_vlan_vid:17,output:1
])
+ovs-appctl time/stop
AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
[NXST_FLOW reply:
idle_timeout=60, actions=fin_timeout(idle_timeout=5)
])
-ovs-appctl time/stop
# Check that a TCP SYN packet does not change the timeout. (Because
# flow stats updates are mainly what implements the fin_timeout
# feature, we warp forward a couple of times to ensure that flow stats
AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
warped
])
+sleep 1
AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
[NXST_FLOW reply:
n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)