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.
* 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: