Lines Matching refs:best

1541 static struct aggregator *ad_agg_selection_test(struct aggregator *best,  in ad_agg_selection_test()  argument
1568 if (!best) in ad_agg_selection_test()
1571 if (!curr->is_individual && best->is_individual) in ad_agg_selection_test()
1574 if (curr->is_individual && !best->is_individual) in ad_agg_selection_test()
1575 return best; in ad_agg_selection_test()
1577 if (__agg_has_partner(curr) && !__agg_has_partner(best)) in ad_agg_selection_test()
1580 if (!__agg_has_partner(curr) && __agg_has_partner(best)) in ad_agg_selection_test()
1581 return best; in ad_agg_selection_test()
1585 if (__agg_active_ports(curr) > __agg_active_ports(best)) in ad_agg_selection_test()
1588 if (__agg_active_ports(curr) < __agg_active_ports(best)) in ad_agg_selection_test()
1589 return best; in ad_agg_selection_test()
1594 if (__get_agg_bandwidth(curr) > __get_agg_bandwidth(best)) in ad_agg_selection_test()
1607 return best; in ad_agg_selection_test()
1656 struct aggregator *best, *active, *origin; in ad_agg_selection_logic() local
1665 best = (active && agg_device_up(active)) ? active : NULL; in ad_agg_selection_logic()
1673 best = ad_agg_selection_test(best, agg); in ad_agg_selection_logic()
1676 if (best && in ad_agg_selection_logic()
1677 __get_agg_selection_mode(best->lag_ports) == BOND_AD_STABLE) { in ad_agg_selection_logic()
1687 !__agg_has_partner(best)))) { in ad_agg_selection_logic()
1689 best->actor_oper_aggregator_key)) { in ad_agg_selection_logic()
1690 best = NULL; in ad_agg_selection_logic()
1696 if (best && (best == active)) { in ad_agg_selection_logic()
1697 best = NULL; in ad_agg_selection_logic()
1702 if (best) { in ad_agg_selection_logic()
1704 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1705 best->aggregator_identifier, best->num_of_ports, in ad_agg_selection_logic()
1706 best->actor_oper_aggregator_key, in ad_agg_selection_logic()
1707 best->partner_oper_aggregator_key, in ad_agg_selection_logic()
1708 best->is_individual, best->is_active); in ad_agg_selection_logic()
1710 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1711 best->lag_ports, best->slave); in ad_agg_selection_logic()
1724 if (best->is_individual) in ad_agg_selection_logic()
1728 best->is_active = 1; in ad_agg_selection_logic()
1730 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1731 best->aggregator_identifier); in ad_agg_selection_logic()
1733 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1734 best->aggregator_identifier, best->num_of_ports, in ad_agg_selection_logic()
1735 best->actor_oper_aggregator_key, in ad_agg_selection_logic()
1736 best->partner_oper_aggregator_key, in ad_agg_selection_logic()
1737 best->is_individual, best->is_active); in ad_agg_selection_logic()