During rebalancing there could be hash entries with 0 bytes traffic
on them. It is unnecessary to move them.

Signed-off-by: Zoltan Kiss <zoltan.k...@citrix.com>
---
 lib/bond.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/bond.c b/lib/bond.c
index 87962de..a95c9b0 100644
--- a/lib/bond.c
+++ b/lib/bond.c
@@ -763,6 +763,11 @@ choose_entry_to_migrate(const struct bond_slave *from, 
uint64_t to_tx_bytes)
         double old_ratio, new_ratio;
         uint64_t delta;
 
+        if (e->tx_bytes == 0) {
+            /* Moving entry which doesn't carry traffic is pointless */
+            continue;
+        }
+
         if (to_tx_bytes == 0) {
             /* Nothing on the new slave, move it. */
             return e;
-- 
1.8.0

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to