On 30 April 2014 05:29, Alex Wang <[email protected]> wrote:
>
> +dnl disable the stats update, the following 'recv' should not be updated.
> +AT_CHECK([ovs-vsctl set O . other_config:stats-update-interval=10000000])
> +for i in `seq 0 10`; do ovs-appctl time/warp 1000; done
> +for i in `seq 1 5`; do
> + AT_CHECK([ovs-appctl netdev-dummy/receive p1
> 'eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
> +done
>
This might be a little more robust if you also check that after N seconds
(here it's 10000000) the stats are updated. The comment says disable, but
it's actually reducing the frequency to very low.
+ <column name="other_config" key="stats-update-interval"
> + type='{"type": "integer"}'>
> + <p>
> + Period of statistics update to database, in milliseconds. This
> + option will affect the update of the <code>statistics</code>
> column
> + in the following tables: <code>Port</code>,
> <code>Interface</code>,
> + <code>Mirror</code>.
Could you add the default value here?
Do you have a preference on the behaviour when someone sets the
stats-update-interval to 0 or a negative number? 0 sounds like never
updating, but in this code I think it would constantly wake up the main
thread. A negative number doesn't make much sense - I don't know whether we
usually just let users set silly values or try to tell them that they're
doing something odd.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev