Lines Matching refs:bond

84 SYSCTL_NODE(_net_link, OID_AUTO, bond, CTLFLAG_RW | CTLFLAG_LOCKED, 0,
574 ifbond_activate_LAG(ifbond_ref bond, LAG_ref lag, int active_media);
577 ifbond_deactivate_LAG(ifbond_ref bond, LAG_ref lag);
580 ifbond_all_ports_ready(ifbond_ref bond);
583 ifbond_find_best_LAG(ifbond_ref bond, int * active_media);
589 ifbond_selection(ifbond_ref bond);
3473 ifbond_ref bond; in ifbond_list_find_moved_port() local
3478 TAILQ_FOREACH(bond, &g_bond->ifbond_list, ifb_bond_list) { in ifbond_list_find_moved_port()
3479 TAILQ_FOREACH(p, &bond->ifb_port_list, po_port_list) { in ifbond_list_find_moved_port()
3515 ifbond_selection(ifbond_ref bond) in ifbond_selection() argument
3524 lag = ifbond_find_best_LAG(bond, &active_media); in ifbond_selection()
3525 if (lag != bond->ifb_active_lag) { in ifbond_selection()
3526 if (bond->ifb_active_lag != NULL) { in ifbond_selection()
3527 ifbond_deactivate_LAG(bond, bond->ifb_active_lag); in ifbond_selection()
3528 bond->ifb_active_lag = NULL; in ifbond_selection()
3530 bond->ifb_active_lag = lag; in ifbond_selection()
3532 ifbond_activate_LAG(bond, lag, active_media); in ifbond_selection()
3542 ifbond_deactivate_LAG(bond, lag); in ifbond_selection()
3543 ifbond_activate_LAG(bond, lag, active_media); in ifbond_selection()
3549 all_ports_ready = ifbond_all_ports_ready(bond); in ifbond_selection()
3551 TAILQ_FOREACH(p, &bond->ifb_port_list, po_port_list) { in ifbond_selection()
3558 if (bond->ifb_max_active > 0) { in ifbond_selection()
3559 if (lag->lag_selected_port_count < bond->ifb_max_active) { in ifbond_selection()
3586 ifbond_find_best_LAG(ifbond_ref bond, int * active_media) in ifbond_find_best_LAG() argument
3594 if (bond->ifb_active_lag != NULL) { in ifbond_find_best_LAG()
3595 best_lag = bond->ifb_active_lag; in ifbond_find_best_LAG()
3597 if (bond->ifb_max_active > 0 in ifbond_find_best_LAG()
3598 && best_count > bond->ifb_max_active) { in ifbond_find_best_LAG()
3599 best_count = bond->ifb_max_active; in ifbond_find_best_LAG()
3603 TAILQ_FOREACH(lag, &bond->ifb_lag_list, lag_list) { in ifbond_find_best_LAG()
3608 if (lag == bond->ifb_active_lag) { in ifbond_find_best_LAG()
3616 if (bond->ifb_max_active > 0 in ifbond_find_best_LAG()
3617 && count > bond->ifb_max_active) { in ifbond_find_best_LAG()
3619 count = bond->ifb_max_active; in ifbond_find_best_LAG()
3637 ifbond_deactivate_LAG(__unused ifbond_ref bond, LAG_ref lag) in ifbond_deactivate_LAG() argument
3648 ifbond_activate_LAG(ifbond_ref bond, LAG_ref lag, int active_media) in ifbond_activate_LAG() argument
3653 if (bond->ifb_max_active > 0) { in ifbond_activate_LAG()
3654 need = bond->ifb_max_active; in ifbond_activate_LAG()
3663 if (bond->ifb_max_active > 0) { in ifbond_activate_LAG()
3682 ifbond_set_max_active(ifbond_ref bond, int max_active)
3684 LAG_ref lag = bond->ifb_active_lag;
3686 bond->ifb_max_active = max_active;
3687 if (bond->ifb_max_active <= 0 || lag == NULL) {
3690 if (lag->lag_selected_port_count > bond->ifb_max_active) {
3694 remove_count = lag->lag_selected_port_count - bond->ifb_max_active;
3710 ifbond_all_ports_ready(ifbond_ref bond) in ifbond_all_ports_ready() argument
3715 if (bond->ifb_active_lag == NULL) { in ifbond_all_ports_ready()
3718 TAILQ_FOREACH(p, &bond->ifb_active_lag->lag_port_list, po_lag_port_list) { in ifbond_all_ports_ready()
3732 ifbond_all_ports_attached(ifbond_ref bond, bondport_ref this_port) in ifbond_all_ports_attached() argument
3736 TAILQ_FOREACH(p, &bond->ifb_port_list, po_port_list) { in ifbond_all_ports_attached()
3748 ifbond_get_LAG_matching_port(ifbond_ref bond, bondport_ref p) in ifbond_get_LAG_matching_port() argument
3752 TAILQ_FOREACH(lag, &bond->ifb_lag_list, lag_list) { in ifbond_get_LAG_matching_port()
3800 ifbond_ref bond = p->po_bond; in bondport_link_status_changed() local
3822 if (bond->ifb_mode == IF_BOND_MODE_LACP) { in bondport_link_status_changed()
3824 && bond->ifb_active_lag != NULL in bondport_link_status_changed()
3825 && p->po_lag == bond->ifb_active_lag in bondport_link_status_changed()
3901 ifbond_ref bond = p->po_bond; in bondport_remove_from_LAG() local
3919 return bond->ifb_active_lag == lag; in bondport_remove_from_LAG()
3924 bond->ifb_key, in bondport_remove_from_LAG()
3929 TAILQ_REMOVE(&bond->ifb_lag_list, lag, lag_list); in bondport_remove_from_LAG()
3930 if (bond->ifb_active_lag == lag) { in bondport_remove_from_LAG()
3931 bond->ifb_active_lag = NULL; in bondport_remove_from_LAG()
3957 ifbond_ref bond = p->po_bond; in bondport_assign_to_LAG() local
3972 lag = ifbond_get_LAG_matching_port(bond, p); in bondport_assign_to_LAG()
3982 TAILQ_INSERT_TAIL(&bond->ifb_lag_list, lag, lag_list); in bondport_assign_to_LAG()
3986 bond->ifb_key, in bondport_assign_to_LAG()
4016 ifbond_ref bond = p->po_bond; in bondport_set_selected() local
4020 if (lag != NULL && bond->ifb_active_lag == lag) { in bondport_set_selected()
4092 ifbond_ref bond = p->po_bond; in bondport_RecordPDU() local
4131 && lacp_actor_partner_tlv_get_key(partner) == bond->ifb_key in bondport_RecordPDU()
4166 ifbond_ref bond = p->po_bond; in bondport_UpdateNTT() local
4176 || lacp_actor_partner_tlv_get_key(partner) != bond->ifb_key in bondport_UpdateNTT()
4218 ifbond_ref bond = p->po_bond; in bondport_enable_distributing() local
4220 bond->ifb_distributing_array[bond->ifb_distributing_count++] = p; in bondport_enable_distributing()
4235 ifbond_ref bond; in bondport_disable_distributing() local
4239 bond = p->po_bond; in bondport_disable_distributing()
4240 array = bond->ifb_distributing_array; in bondport_disable_distributing()
4241 count = bond->ifb_distributing_count; in bondport_disable_distributing()
4252 bond->ifb_distributing_count--; in bondport_disable_distributing()