Lines Matching full:best

1570  * the current best, according to the ad_select policy.
1572 static struct aggregator *ad_agg_selection_test(struct aggregator *best, in ad_agg_selection_test() argument
1575 /* 0. If no best, select current. in ad_agg_selection_test()
1577 * 1. If the current agg is not individual, and the best is in ad_agg_selection_test()
1580 * 2. If current agg is individual and the best is not, keep best. in ad_agg_selection_test()
1582 * 3. Therefore, current and best are both individual or both not in ad_agg_selection_test()
1585 * 3a. If current agg partner replied, and best agg partner did not, in ad_agg_selection_test()
1588 * 3b. If current agg partner did not reply and best agg partner in ad_agg_selection_test()
1589 * did reply, keep best. in ad_agg_selection_test()
1591 * 4. Therefore, current and best both have partner replies or in ad_agg_selection_test()
1599 if (!best) in ad_agg_selection_test()
1602 if (!curr->is_individual && best->is_individual) in ad_agg_selection_test()
1605 if (curr->is_individual && !best->is_individual) in ad_agg_selection_test()
1606 return best; in ad_agg_selection_test()
1608 if (__agg_has_partner(curr) && !__agg_has_partner(best)) in ad_agg_selection_test()
1611 if (!__agg_has_partner(curr) && __agg_has_partner(best)) in ad_agg_selection_test()
1612 return best; in ad_agg_selection_test()
1616 if (__agg_active_ports(curr) > __agg_active_ports(best)) in ad_agg_selection_test()
1619 if (__agg_active_ports(curr) < __agg_active_ports(best)) in ad_agg_selection_test()
1620 return best; in ad_agg_selection_test()
1625 if (__get_agg_bandwidth(curr) > __get_agg_bandwidth(best)) in ad_agg_selection_test()
1638 return best; in ad_agg_selection_test()
1687 struct aggregator *best, *active, *origin; in ad_agg_selection_logic() local
1696 best = (active && agg_device_up(active)) ? active : NULL; in ad_agg_selection_logic()
1704 best = ad_agg_selection_test(best, agg); in ad_agg_selection_logic()
1707 if (best && in ad_agg_selection_logic()
1708 __get_agg_selection_mode(best->lag_ports) == BOND_AD_STABLE) { in ad_agg_selection_logic()
1711 * partner) or if both the best and active don't have an in ad_agg_selection_logic()
1718 !__agg_has_partner(best)))) { in ad_agg_selection_logic()
1720 best->actor_oper_aggregator_key)) { in ad_agg_selection_logic()
1721 best = NULL; in ad_agg_selection_logic()
1727 if (best && (best == active)) { in ad_agg_selection_logic()
1728 best = NULL; in ad_agg_selection_logic()
1732 /* if there is new best aggregator, activate it */ in ad_agg_selection_logic()
1733 if (best) { in ad_agg_selection_logic()
1734 netdev_dbg(bond->dev, "(slave %s): best Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n", in ad_agg_selection_logic()
1735 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1736 best->aggregator_identifier, best->num_of_ports, in ad_agg_selection_logic()
1737 best->actor_oper_aggregator_key, in ad_agg_selection_logic()
1738 best->partner_oper_aggregator_key, in ad_agg_selection_logic()
1739 best->is_individual, best->is_active); in ad_agg_selection_logic()
1740 netdev_dbg(bond->dev, "(slave %s): best ports %p slave %p\n", in ad_agg_selection_logic()
1741 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1742 best->lag_ports, best->slave); in ad_agg_selection_logic()
1755 if (best->is_individual) in ad_agg_selection_logic()
1759 best->is_active = 1; in ad_agg_selection_logic()
1761 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1762 best->aggregator_identifier); in ad_agg_selection_logic()
1764 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1765 best->aggregator_identifier, best->num_of_ports, in ad_agg_selection_logic()
1766 best->actor_oper_aggregator_key, in ad_agg_selection_logic()
1767 best->partner_oper_aggregator_key, in ad_agg_selection_logic()
1768 best->is_individual, best->is_active); in ad_agg_selection_logic()