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

Ben Pfaff blp at nicira.com
Mon Jan 7 19:36:49 UTC 2013


On Sat, Jan 05, 2013 at 09:42:02PM +0000, Zoltan Kiss wrote:
> 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>

Can this ever trigger?  I don't see how these hash entries would end
up on the list iterated by choose_entry_to_migrate(), because
bond_rebalance() skips over entries that have tx_bytes == 0 and does
not add them to the bond_slave's list:

    for (e = &bond->hash[0]; e <= &bond->hash[BOND_MASK]; e++) {
        if (e->slave && e->tx_bytes) {
            e->slave->tx_bytes += e->tx_bytes;
            list_push_back(&e->slave->entries, &e->list_node);
        }
    }




More information about the dev mailing list