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);
3467 ifbond_ref bond; in ifbond_list_find_moved_port() local
3472 TAILQ_FOREACH(bond, &g_bond->ifbond_list, ifb_bond_list) { in ifbond_list_find_moved_port()
3473 TAILQ_FOREACH(p, &bond->ifb_port_list, po_port_list) { in ifbond_list_find_moved_port()
3509 ifbond_selection(ifbond_ref bond) in ifbond_selection() argument
3518 lag = ifbond_find_best_LAG(bond, &active_media); in ifbond_selection()
3519 if (lag != bond->ifb_active_lag) { in ifbond_selection()
3520 if (bond->ifb_active_lag != NULL) { in ifbond_selection()
3521 ifbond_deactivate_LAG(bond, bond->ifb_active_lag); in ifbond_selection()
3522 bond->ifb_active_lag = NULL; in ifbond_selection()
3524 bond->ifb_active_lag = lag; in ifbond_selection()
3526 ifbond_activate_LAG(bond, lag, active_media); in ifbond_selection()
3536 ifbond_deactivate_LAG(bond, lag); in ifbond_selection()
3537 ifbond_activate_LAG(bond, lag, active_media); in ifbond_selection()
3543 all_ports_ready = ifbond_all_ports_ready(bond); in ifbond_selection()
3545 TAILQ_FOREACH(p, &bond->ifb_port_list, po_port_list) { in ifbond_selection()
3552 if (bond->ifb_max_active > 0) { in ifbond_selection()
3553 if (lag->lag_selected_port_count < bond->ifb_max_active) { in ifbond_selection()
3580 ifbond_find_best_LAG(ifbond_ref bond, int * active_media) in ifbond_find_best_LAG() argument
3588 if (bond->ifb_active_lag != NULL) { in ifbond_find_best_LAG()
3589 best_lag = bond->ifb_active_lag; in ifbond_find_best_LAG()
3591 if (bond->ifb_max_active > 0 in ifbond_find_best_LAG()
3592 && best_count > bond->ifb_max_active) { in ifbond_find_best_LAG()
3593 best_count = bond->ifb_max_active; in ifbond_find_best_LAG()
3597 TAILQ_FOREACH(lag, &bond->ifb_lag_list, lag_list) { in ifbond_find_best_LAG()
3602 if (lag == bond->ifb_active_lag) { in ifbond_find_best_LAG()
3610 if (bond->ifb_max_active > 0 in ifbond_find_best_LAG()
3611 && count > bond->ifb_max_active) { in ifbond_find_best_LAG()
3613 count = bond->ifb_max_active; in ifbond_find_best_LAG()
3631 ifbond_deactivate_LAG(__unused ifbond_ref bond, LAG_ref lag) in ifbond_deactivate_LAG() argument
3642 ifbond_activate_LAG(ifbond_ref bond, LAG_ref lag, int active_media) in ifbond_activate_LAG() argument
3647 if (bond->ifb_max_active > 0) { in ifbond_activate_LAG()
3648 need = bond->ifb_max_active; in ifbond_activate_LAG()
3657 if (bond->ifb_max_active > 0) { in ifbond_activate_LAG()
3676 ifbond_set_max_active(ifbond_ref bond, int max_active)
3678 LAG_ref lag = bond->ifb_active_lag;
3680 bond->ifb_max_active = max_active;
3681 if (bond->ifb_max_active <= 0 || lag == NULL) {
3684 if (lag->lag_selected_port_count > bond->ifb_max_active) {
3688 remove_count = lag->lag_selected_port_count - bond->ifb_max_active;
3704 ifbond_all_ports_ready(ifbond_ref bond) in ifbond_all_ports_ready() argument
3709 if (bond->ifb_active_lag == NULL) { in ifbond_all_ports_ready()
3712 TAILQ_FOREACH(p, &bond->ifb_active_lag->lag_port_list, po_lag_port_list) { in ifbond_all_ports_ready()
3726 ifbond_all_ports_attached(ifbond_ref bond, bondport_ref this_port) in ifbond_all_ports_attached() argument
3730 TAILQ_FOREACH(p, &bond->ifb_port_list, po_port_list) { in ifbond_all_ports_attached()
3742 ifbond_get_LAG_matching_port(ifbond_ref bond, bondport_ref p) in ifbond_get_LAG_matching_port() argument
3746 TAILQ_FOREACH(lag, &bond->ifb_lag_list, lag_list) { in ifbond_get_LAG_matching_port()
3794 ifbond_ref bond = p->po_bond; in bondport_link_status_changed() local
3816 if (bond->ifb_mode == IF_BOND_MODE_LACP) { in bondport_link_status_changed()
3818 && bond->ifb_active_lag != NULL in bondport_link_status_changed()
3819 && p->po_lag == bond->ifb_active_lag in bondport_link_status_changed()
3895 ifbond_ref bond = p->po_bond; in bondport_remove_from_LAG() local
3913 return bond->ifb_active_lag == lag; in bondport_remove_from_LAG()
3918 bond->ifb_key, in bondport_remove_from_LAG()
3923 TAILQ_REMOVE(&bond->ifb_lag_list, lag, lag_list); in bondport_remove_from_LAG()
3924 if (bond->ifb_active_lag == lag) { in bondport_remove_from_LAG()
3925 bond->ifb_active_lag = NULL; in bondport_remove_from_LAG()
3951 ifbond_ref bond = p->po_bond; in bondport_assign_to_LAG() local
3966 lag = ifbond_get_LAG_matching_port(bond, p); in bondport_assign_to_LAG()
3976 TAILQ_INSERT_TAIL(&bond->ifb_lag_list, lag, lag_list); in bondport_assign_to_LAG()
3980 bond->ifb_key, in bondport_assign_to_LAG()
4010 ifbond_ref bond = p->po_bond; in bondport_set_selected() local
4014 if (lag != NULL && bond->ifb_active_lag == lag) { in bondport_set_selected()
4086 ifbond_ref bond = p->po_bond; in bondport_RecordPDU() local
4125 && lacp_actor_partner_tlv_get_key(partner) == bond->ifb_key in bondport_RecordPDU()
4160 ifbond_ref bond = p->po_bond; in bondport_UpdateNTT() local
4170 || lacp_actor_partner_tlv_get_key(partner) != bond->ifb_key in bondport_UpdateNTT()
4212 ifbond_ref bond = p->po_bond; in bondport_enable_distributing() local
4214 bond->ifb_distributing_array[bond->ifb_distributing_count++] = p; in bondport_enable_distributing()
4229 ifbond_ref bond; in bondport_disable_distributing() local
4233 bond = p->po_bond; in bondport_disable_distributing()
4234 array = bond->ifb_distributing_array; in bondport_disable_distributing()
4235 count = bond->ifb_distributing_count; in bondport_disable_distributing()
4246 bond->ifb_distributing_count--; in bondport_disable_distributing()