Lines Matching full:best
1549 * the current best, according to the ad_select policy.
1551 static struct aggregator *ad_agg_selection_test(struct aggregator *best, in ad_agg_selection_test() argument
1554 /* 0. If no best, select current. in ad_agg_selection_test()
1556 * 1. If the current agg is not individual, and the best is in ad_agg_selection_test()
1559 * 2. If current agg is individual and the best is not, keep best. in ad_agg_selection_test()
1561 * 3. Therefore, current and best are both individual or both not in ad_agg_selection_test()
1564 * 3a. If current agg partner replied, and best agg partner did not, in ad_agg_selection_test()
1567 * 3b. If current agg partner did not reply and best agg partner in ad_agg_selection_test()
1568 * did reply, keep best. in ad_agg_selection_test()
1570 * 4. Therefore, current and best both have partner replies or in ad_agg_selection_test()
1578 if (!best) in ad_agg_selection_test()
1581 if (!curr->is_individual && best->is_individual) in ad_agg_selection_test()
1584 if (curr->is_individual && !best->is_individual) in ad_agg_selection_test()
1585 return best; in ad_agg_selection_test()
1587 if (__agg_has_partner(curr) && !__agg_has_partner(best)) in ad_agg_selection_test()
1590 if (!__agg_has_partner(curr) && __agg_has_partner(best)) in ad_agg_selection_test()
1591 return best; in ad_agg_selection_test()
1595 if (__agg_active_ports(curr) > __agg_active_ports(best)) in ad_agg_selection_test()
1598 if (__agg_active_ports(curr) < __agg_active_ports(best)) in ad_agg_selection_test()
1599 return best; in ad_agg_selection_test()
1604 if (__get_agg_bandwidth(curr) > __get_agg_bandwidth(best)) in ad_agg_selection_test()
1617 return best; in ad_agg_selection_test()
1666 struct aggregator *best, *active, *origin; in ad_agg_selection_logic() local
1675 best = (active && agg_device_up(active)) ? active : NULL; in ad_agg_selection_logic()
1683 best = ad_agg_selection_test(best, agg); in ad_agg_selection_logic()
1686 if (best && in ad_agg_selection_logic()
1687 __get_agg_selection_mode(best->lag_ports) == BOND_AD_STABLE) { in ad_agg_selection_logic()
1690 * partner) or if both the best and active don't have an in ad_agg_selection_logic()
1697 !__agg_has_partner(best)))) { in ad_agg_selection_logic()
1699 best->actor_oper_aggregator_key)) { in ad_agg_selection_logic()
1700 best = NULL; in ad_agg_selection_logic()
1706 if (best && (best == active)) { in ad_agg_selection_logic()
1707 best = NULL; in ad_agg_selection_logic()
1711 /* if there is new best aggregator, activate it */ in ad_agg_selection_logic()
1712 if (best) { in ad_agg_selection_logic()
1713 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()
1714 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1715 best->aggregator_identifier, best->num_of_ports, in ad_agg_selection_logic()
1716 best->actor_oper_aggregator_key, in ad_agg_selection_logic()
1717 best->partner_oper_aggregator_key, in ad_agg_selection_logic()
1718 best->is_individual, best->is_active); in ad_agg_selection_logic()
1719 netdev_dbg(bond->dev, "(slave %s): best ports %p slave %p\n", in ad_agg_selection_logic()
1720 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1721 best->lag_ports, best->slave); in ad_agg_selection_logic()
1734 if (best->is_individual) in ad_agg_selection_logic()
1738 best->is_active = 1; in ad_agg_selection_logic()
1740 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1741 best->aggregator_identifier); in ad_agg_selection_logic()
1743 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1744 best->aggregator_identifier, best->num_of_ports, in ad_agg_selection_logic()
1745 best->actor_oper_aggregator_key, in ad_agg_selection_logic()
1746 best->partner_oper_aggregator_key, in ad_agg_selection_logic()
1747 best->is_individual, best->is_active); in ad_agg_selection_logic()