ofproto/bond: simplify rebalancing logic
authorAndy Zhou <azhou@nicira.com>
Tue, 15 Sep 2015 20:51:17 +0000 (13:51 -0700)
committerAndy Zhou <azhou@nicira.com>
Wed, 23 Sep 2015 01:06:40 +0000 (18:06 -0700)
commitc460a6a7bc751c1917981c326fedf45e15f06aed
treee68f1f3886d97f02b5b386a2e9cc498e451eef9d
parentec96e6637630d33301540993509c5b037b3c422d
ofproto/bond: simplify rebalancing logic

The current bond relancing logic is more complicated than necessary.
When considering a bucket for rebalancing, we just need to make sure
post rebalancing traffic will be closer to the ideal traffic split
than before. This patch implements the simplification.

There is a bug is current algorithm that causes a heavyly loaded bucket
to ping-pong for each reblancing interval. The simplied loigc also fixes
this bug.

Though not the main motivation for the change, computations are now
done with integer math rather than floating math.

Reported-by: Gregory Smith <gasmith@nutanix.com>
tested-by: Gregory Smith <gasmith@nutanix.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
AUTHORS
ofproto/bond.c