Lines Matching refs:best
1563 static struct aggregator *ad_agg_selection_test(struct aggregator *best, in ad_agg_selection_test() argument
1590 if (!best) in ad_agg_selection_test()
1593 if (!curr->is_individual && best->is_individual) in ad_agg_selection_test()
1596 if (curr->is_individual && !best->is_individual) in ad_agg_selection_test()
1597 return best; in ad_agg_selection_test()
1599 if (__agg_has_partner(curr) && !__agg_has_partner(best)) in ad_agg_selection_test()
1602 if (!__agg_has_partner(curr) && __agg_has_partner(best)) in ad_agg_selection_test()
1603 return best; in ad_agg_selection_test()
1607 if (__agg_active_ports(curr) > __agg_active_ports(best)) in ad_agg_selection_test()
1610 if (__agg_active_ports(curr) < __agg_active_ports(best)) in ad_agg_selection_test()
1611 return best; in ad_agg_selection_test()
1616 if (__get_agg_bandwidth(curr) > __get_agg_bandwidth(best)) in ad_agg_selection_test()
1629 return best; in ad_agg_selection_test()
1678 struct aggregator *best, *active, *origin; in ad_agg_selection_logic() local
1687 best = (active && agg_device_up(active)) ? active : NULL; in ad_agg_selection_logic()
1695 best = ad_agg_selection_test(best, agg); in ad_agg_selection_logic()
1698 if (best && in ad_agg_selection_logic()
1699 __get_agg_selection_mode(best->lag_ports) == BOND_AD_STABLE) { in ad_agg_selection_logic()
1709 !__agg_has_partner(best)))) { in ad_agg_selection_logic()
1711 best->actor_oper_aggregator_key)) { in ad_agg_selection_logic()
1712 best = NULL; in ad_agg_selection_logic()
1718 if (best && (best == active)) { in ad_agg_selection_logic()
1719 best = NULL; in ad_agg_selection_logic()
1724 if (best) { in ad_agg_selection_logic()
1726 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1727 best->aggregator_identifier, best->num_of_ports, in ad_agg_selection_logic()
1728 best->actor_oper_aggregator_key, in ad_agg_selection_logic()
1729 best->partner_oper_aggregator_key, in ad_agg_selection_logic()
1730 best->is_individual, best->is_active); in ad_agg_selection_logic()
1732 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1733 best->lag_ports, best->slave); in ad_agg_selection_logic()
1746 if (best->is_individual) in ad_agg_selection_logic()
1750 best->is_active = 1; in ad_agg_selection_logic()
1752 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1753 best->aggregator_identifier); in ad_agg_selection_logic()
1755 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1756 best->aggregator_identifier, best->num_of_ports, in ad_agg_selection_logic()
1757 best->actor_oper_aggregator_key, in ad_agg_selection_logic()
1758 best->partner_oper_aggregator_key, in ad_agg_selection_logic()
1759 best->is_individual, best->is_active); in ad_agg_selection_logic()