[ovs-dev] [PATCH 2/3] bond: Do not rebalance hash entries with 0 traffic

Zoltan Kiss zoltan.kiss at citrix.com
Sat Jan 5 21:42:02 UTC 2013


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.kiss at 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




More information about the dev mailing list