ovs-appctl time/warp $delay
done
+ovs-appctl time/warp 6000
sleep 1
OVS_VSWITCHD_STOP
ovs-appctl -t test-netflow exit
-AT_CHECK([[sed -e 's/, uptime [0-9]*//
-s/, now [0-9.]*//
-s/time \([0-9]*\)\.\.\.\1$/time <moment>/
-s/time [0-9]*\.\.\.[0-9]*/time <range>/
-' netflow.log | sort]], [0],
- [
-header: v5, seq 0, engine 2,1
-header: v5, seq 1, engine 2,1
-seq 0: 192.168.0.1 > 192.168.0.2, if 1 > 65535, 1 pkts, 60 bytes, ICMP 8:0, time <moment>
-seq 1: 192.168.0.1 > 192.168.0.2, if 1 > 2, 1 pkts, 60 bytes, ICMP 8:0, time <moment>
-seq 1: 192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0, time <range>
-])
+AT_CHECK([grep "192.168.0.1 > 192.168.0.2, if 1 > 65535, 1 pkts, 60 bytes, ICMP 8:0" netflow.log | wc -l], [0], [dnl
+1
+], [ignore])
+
+AT_CHECK([grep "192.168.0.1 > 192.168.0.2, if 1 > 2, 1 pkts, 60 bytes, ICMP 8:0" netflow.log | wc -l], [0], [dnl
+1
+], [ignore])
+
+combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
+separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`
+AT_CHECK([test $separate = 2 || test $combined = 1], [0])
+
AT_CLEANUP
dnl Test that basic NetFlow reports active expirations correctly.
AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
])
-# There should be 1 expiration for MAC learning,
-# at least 5 active and a final expiration in one direction,
-# and at least 5 active and a final expiration in the other direction.
-echo $n_recs
-AT_CHECK([test $n_recs -ge 13])
-
AT_CLEANUP
AT_SETUP([idle_age and hard_age increase over time])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
dummy@ovs-dummy: hit:0 missed:0
- flows: cur: 0, avg: 0, max: 0
- br0: hit:0 missed:0
+ br0:
br0 65534/100: (dummy)
p1 1/1: (dummy)
p2 2/2: (dummy)
- br1: hit:0 missed:0
+ br1:
br1 65534/101: (dummy)
p3 3/3: (dummy)
])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
dummy@ovs-dummy: hit:13 missed:2
- flows: cur: 2, avg: 1, max: 2
- br0: hit:9 missed:1
+ br0:
br0 65534/100: (dummy)
p2 2/2: (dummy)
pbr0 1/none: (patch: peer=pbr1)
- br1: hit:4 missed:1
+ br1:
br1 65534/101: (dummy)
p3 3/3: (dummy)
pbr1 1/none: (patch: peer=pbr0)
OVS_VSWITCHD_STOP
AT_CLEANUP
-AT_SETUP([ofproto-dpif - ovs-appctl dpif/show rates])
-OVS_VSWITCHD_START([set Bridge br0 fail-mode=secure])
-ADD_OF_PORTS([br0], 1, 2)
-
-AT_CHECK([ovs-appctl time/stop])
-AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
-
-for i in $(seq 1 61); do
- ovs-appctl netdev-dummy/receive 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,ttl=64,frag=no),icmp(type=8,code=0)'
- ovs-appctl time/warp 10000
- ovs-appctl time/warp 50000
-done
-
-AT_CHECK([ovs-appctl time/warp 10000], [0], [warped
-])
-
-AT_CHECK([ovs-appctl dpif/show | sed 's/ 10[[0-9]]\{3\}(ms)$/ 10000(ms)/'], [0], [dnl
-dummy@ovs-dummy: hit:0 missed:61
- flows: cur: 0, avg: 0, max: 1
- br0: hit:0 missed:61
- br0 65534/100: (dummy)
- p1 1/1: (dummy)
- p2 2/2: (dummy)
-])
-
-OVS_VSWITCHD_STOP
-AT_CLEANUP
-
AT_SETUP([ofproto-dpif - port duration])
OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
ADD_OF_PORTS([br0], 1, 2)
table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
])
-AT_CHECK([ovs-appctl dpif/disable-megaflows], [0], [megaflows disabled
+AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
], [])
AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])