bond: raise minimal bond distribution per interface
authorAndy Zhou <azhou@nicira.com>
Wed, 7 May 2014 05:31:00 +0000 (22:31 -0700)
committerAndy Zhou <azhou@nicira.com>
Thu, 8 May 2014 05:39:31 +0000 (22:39 -0700)
Raise the minimal per interface packet distribution from 7 to 24.

With 256 packet distributing to 3 interfaces, the expected packets per
interface should be 256/3 = 85.3

Tested with 200 runs, the average number of packet sent to a single
interface is 85.9. close to the expected number, standard deviation
within the 200 run is 24.4. Tested with 2x standard deviation with
10K test runs, got around 0.1% failure rate. 2.5x standard deviation
passes 100K test runs without failure.

Using 2.5x for the unit test, 83.5 - 2.5 * 24.4, Round down to the
whole number of 24.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Reviewed-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
tests/ofproto-dpif.at

index c46e997..3723459 100644 (file)
@@ -191,9 +191,9 @@ AT_CHECK([ovs-appctl dpif/dump-flows br0 |grep tcp > br0_flows.txt])
 AT_CHECK([ovs-appctl dpif/dump-flows br1 |grep tcp > br1_flows.txt])
 # Make sure there is resonable distribution to all three ports.
 # We don't want to make this check precise, in case hash function changes.
-AT_CHECK([test `grep in_port.4 br1_flows.txt |wc -l` -gt 7])
-AT_CHECK([test `grep in_port.5 br1_flows.txt |wc -l` -gt 7])
-AT_CHECK([test `grep in_port.6 br1_flows.txt |wc -l` -gt 7])
+AT_CHECK([test `grep in_port.4 br1_flows.txt |wc -l` -gt 24])
+AT_CHECK([test `grep in_port.5 br1_flows.txt |wc -l` -gt 24])
+AT_CHECK([test `grep in_port.6 br1_flows.txt |wc -l` -gt 24])
 OVS_VSWITCHD_STOP()
 AT_CLEANUP