Until now, if a given MAC ever transmitted, then it would always show up
in bond information output. There's no benefit to that if the MAC has
gone away permanently. This commit causes them to be deleted when their
load has gone to 0. This takes a fairly long time: if a MAC has sent, say,
one million bytes and then stops transmitting entirely, then it will take
about 20 rebalancing intervals (200 seconds) before it decays to 0 and
gets deleted.
Bug #2157.
---
vswitchd/bridge.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 34c0e78..c1a0945 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -3382,6 +3382,9 @@ bond_rebalance_port(struct port *port)
* historical data to decay to <1% in 7 rebalancing runs. */
for (e = &port->bond_hash[0]; e <= &port->bond_hash[BOND_MASK]; e++) {
e->tx_bytes /= 2;
+ if (!e->tx_bytes) {
+ e->iface_idx = -1;
+ }
}
exit:
--
1.7.1
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev