Lines Matching refs:best
1560 static struct aggregator *ad_agg_selection_test(struct aggregator *best, in ad_agg_selection_test() argument
1587 if (!best) in ad_agg_selection_test()
1590 if (!curr->is_individual && best->is_individual) in ad_agg_selection_test()
1593 if (curr->is_individual && !best->is_individual) in ad_agg_selection_test()
1594 return best; in ad_agg_selection_test()
1596 if (__agg_has_partner(curr) && !__agg_has_partner(best)) in ad_agg_selection_test()
1599 if (!__agg_has_partner(curr) && __agg_has_partner(best)) in ad_agg_selection_test()
1600 return best; in ad_agg_selection_test()
1604 if (__agg_active_ports(curr) > __agg_active_ports(best)) in ad_agg_selection_test()
1607 if (__agg_active_ports(curr) < __agg_active_ports(best)) in ad_agg_selection_test()
1608 return best; in ad_agg_selection_test()
1613 if (__get_agg_bandwidth(curr) > __get_agg_bandwidth(best)) in ad_agg_selection_test()
1626 return best; in ad_agg_selection_test()
1675 struct aggregator *best, *active, *origin; in ad_agg_selection_logic() local
1684 best = (active && agg_device_up(active)) ? active : NULL; in ad_agg_selection_logic()
1692 best = ad_agg_selection_test(best, agg); in ad_agg_selection_logic()
1695 if (best && in ad_agg_selection_logic()
1696 __get_agg_selection_mode(best->lag_ports) == BOND_AD_STABLE) { in ad_agg_selection_logic()
1706 !__agg_has_partner(best)))) { in ad_agg_selection_logic()
1708 best->actor_oper_aggregator_key)) { in ad_agg_selection_logic()
1709 best = NULL; in ad_agg_selection_logic()
1715 if (best && (best == active)) { in ad_agg_selection_logic()
1716 best = NULL; in ad_agg_selection_logic()
1721 if (best) { in ad_agg_selection_logic()
1723 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1724 best->aggregator_identifier, best->num_of_ports, in ad_agg_selection_logic()
1725 best->actor_oper_aggregator_key, in ad_agg_selection_logic()
1726 best->partner_oper_aggregator_key, in ad_agg_selection_logic()
1727 best->is_individual, best->is_active); in ad_agg_selection_logic()
1729 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1730 best->lag_ports, best->slave); in ad_agg_selection_logic()
1743 if (best->is_individual) in ad_agg_selection_logic()
1747 best->is_active = 1; in ad_agg_selection_logic()
1749 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1750 best->aggregator_identifier); in ad_agg_selection_logic()
1752 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1753 best->aggregator_identifier, best->num_of_ports, in ad_agg_selection_logic()
1754 best->actor_oper_aggregator_key, in ad_agg_selection_logic()
1755 best->partner_oper_aggregator_key, in ad_agg_selection_logic()
1756 best->is_individual, best->is_active); in ad_agg_selection_logic()