Lines Matching refs:mcip

822 				mac_client_impl_t *mcip;  in mac_callback_walker_exit()  local
826 mcip = mpip->mpi_mcip; in mac_callback_walker_exit()
828 ASSERT3P(&mcip->mci_mip->mi_promisc_cb_info, in mac_callback_walker_exit()
830 ASSERT3P(&mcip->mci_mip->mi_promisc_list, in mac_callback_walker_exit()
834 &mcip->mci_promisc_list, in mac_callback_walker_exit()
943 mac_client_impl_t *mcip; in i_mac_perim_enter() local
950 mcip = mac_vnic_lower(mip); in i_mac_perim_enter()
951 mip = mcip->mci_mip; in i_mac_perim_enter()
1005 mac_client_impl_t *mcip; in i_mac_perim_exit() local
1012 mcip = mac_vnic_lower(mip); in i_mac_perim_exit()
1013 mip = mcip->mci_mip; in i_mac_perim_exit()
1034 mac_client_impl_t *mcip; in mac_perim_held() local
1041 mcip = mac_vnic_lower(mip); in mac_perim_held()
1042 mip = mcip->mci_mip; in mac_perim_held()
1413 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_addr_factory_reserve() local
1414 mac_impl_t *mip = mcip->mci_mip; in mac_addr_factory_reserve()
1454 mip->mi_factory_addr[*slot-1].mfa_client = mcip; in mac_addr_factory_reserve()
1468 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_addr_factory_release() local
1469 mac_impl_t *mip = mcip->mci_mip; in mac_addr_factory_release()
1577 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_hwrings_get() local
1578 flow_entry_t *flent = mcip->mci_flent; in mac_hwrings_get()
1605 (mcip == MAC_GROUP_ONLY_CLIENT(grp))); in mac_hwrings_get()
1742 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_client_set_flow_cb() local
1743 flow_entry_t *flent = mcip->mci_flent; in mac_client_set_flow_cb()
1756 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_client_clear_flow_cb() local
1757 flow_entry_t *flent = mcip->mci_flent; in mac_client_clear_flow_cb()
1940 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_hwring_send_priv() local
1941 mac_impl_t *mip = mcip->mci_mip; in mac_hwring_send_priv()
1943 return (mac_provider_tx(mip, rh, mp, mcip)); in mac_hwring_send_priv()
2137 mac_tx_lock_all(mac_client_impl_t *mcip) in mac_tx_lock_all() argument
2142 mutex_enter(&mcip->mci_tx_pcpu[i].pcpu_tx_lock); in mac_tx_lock_all()
2146 mac_tx_unlock_all(mac_client_impl_t *mcip) in mac_tx_unlock_all() argument
2151 mutex_exit(&mcip->mci_tx_pcpu[i].pcpu_tx_lock); in mac_tx_unlock_all()
2155 mac_tx_unlock_allbutzero(mac_client_impl_t *mcip) in mac_tx_unlock_allbutzero() argument
2160 mutex_exit(&mcip->mci_tx_pcpu[i].pcpu_tx_lock); in mac_tx_unlock_allbutzero()
2164 mac_tx_sum_refcnt(mac_client_impl_t *mcip) in mac_tx_sum_refcnt() argument
2170 refcnt += mcip->mci_tx_pcpu[i].pcpu_tx_refcnt; in mac_tx_sum_refcnt()
2181 mac_tx_client_block(mac_client_impl_t *mcip) in mac_tx_client_block() argument
2183 mac_tx_lock_all(mcip); in mac_tx_client_block()
2184 mcip->mci_tx_flag |= MCI_TX_QUIESCE; in mac_tx_client_block()
2185 while (mac_tx_sum_refcnt(mcip) != 0) { in mac_tx_client_block()
2186 mac_tx_unlock_allbutzero(mcip); in mac_tx_client_block()
2187 cv_wait(&mcip->mci_tx_cv, &mcip->mci_tx_pcpu[0].pcpu_tx_lock); in mac_tx_client_block()
2188 mutex_exit(&mcip->mci_tx_pcpu[0].pcpu_tx_lock); in mac_tx_client_block()
2189 mac_tx_lock_all(mcip); in mac_tx_client_block()
2191 mac_tx_unlock_all(mcip); in mac_tx_client_block()
2195 mac_tx_client_unblock(mac_client_impl_t *mcip) in mac_tx_client_unblock() argument
2197 mac_tx_lock_all(mcip); in mac_tx_client_unblock()
2198 mcip->mci_tx_flag &= ~MCI_TX_QUIESCE; in mac_tx_client_unblock()
2199 mac_tx_unlock_all(mcip); in mac_tx_client_unblock()
2205 i_mac_notify(mcip->mci_mip, MAC_NOTE_TX); in mac_tx_client_unblock()
2422 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_srs_perm_quiesce() local
2423 flow_entry_t *flent = mcip->mci_flent; in mac_srs_perm_quiesce()
2424 mac_impl_t *mip = mcip->mci_mip; in mac_srs_perm_quiesce()
2447 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_rx_client_quiesce() local
2448 mac_impl_t *mip = mcip->mci_mip; in mac_rx_client_quiesce()
2452 if (MCIP_DATAPATH_SETUP(mcip)) { in mac_rx_client_quiesce()
2453 (void) mac_rx_classify_flow_quiesce(mcip->mci_flent, in mac_rx_client_quiesce()
2455 (void) mac_flow_walk_nolock(mcip->mci_subflow_tab, in mac_rx_client_quiesce()
2463 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_rx_client_restart() local
2464 mac_impl_t *mip = mcip->mci_mip; in mac_rx_client_restart()
2468 if (MCIP_DATAPATH_SETUP(mcip)) { in mac_rx_client_restart()
2469 (void) mac_rx_classify_flow_restart(mcip->mci_flent, NULL); in mac_rx_client_restart()
2470 (void) mac_flow_walk_nolock(mcip->mci_subflow_tab, in mac_rx_client_restart()
2483 mac_client_impl_t *mcip = srs->srs_mcip; in mac_tx_srs_quiesce() local
2485 ASSERT(MAC_PERIM_HELD((mac_handle_t)mcip->mci_mip)); in mac_tx_srs_quiesce()
2550 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in i_mac_tx_client_quiesce() local
2552 ASSERT(MAC_PERIM_HELD((mac_handle_t)mcip->mci_mip)); in i_mac_tx_client_quiesce()
2554 mac_tx_client_block(mcip); in i_mac_tx_client_quiesce()
2555 if (MCIP_TX_SRS(mcip) != NULL) { in i_mac_tx_client_quiesce()
2556 mac_tx_srs_quiesce(MCIP_TX_SRS(mcip), srs_quiesce_flag); in i_mac_tx_client_quiesce()
2557 (void) mac_flow_walk_nolock(mcip->mci_subflow_tab, in i_mac_tx_client_quiesce()
2577 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_tx_client_restart() local
2579 ASSERT(MAC_PERIM_HELD((mac_handle_t)mcip->mci_mip)); in mac_tx_client_restart()
2581 mac_tx_client_unblock(mcip); in mac_tx_client_restart()
2582 if (MCIP_TX_SRS(mcip) != NULL) { in mac_tx_client_restart()
2583 mac_tx_srs_restart(MCIP_TX_SRS(mcip)); in mac_tx_client_restart()
2584 (void) mac_flow_walk_nolock(mcip->mci_subflow_tab, in mac_tx_client_restart()
2590 mac_tx_client_flush(mac_client_impl_t *mcip) in mac_tx_client_flush() argument
2592 ASSERT(MAC_PERIM_HELD((mac_handle_t)mcip->mci_mip)); in mac_tx_client_flush()
2594 mac_tx_client_quiesce((mac_client_handle_t)mcip); in mac_tx_client_flush()
2595 mac_tx_client_restart((mac_client_handle_t)mcip); in mac_tx_client_flush()
2599 mac_client_quiesce(mac_client_impl_t *mcip) in mac_client_quiesce() argument
2601 mac_rx_client_quiesce((mac_client_handle_t)mcip); in mac_client_quiesce()
2602 mac_tx_client_quiesce((mac_client_handle_t)mcip); in mac_client_quiesce()
2606 mac_client_restart(mac_client_impl_t *mcip) in mac_client_restart() argument
2608 mac_rx_client_restart((mac_client_handle_t)mcip); in mac_client_restart()
2609 mac_tx_client_restart((mac_client_handle_t)mcip); in mac_client_restart()
2664 mac_client_impl_t *mcip; in i_mac_disable() local
2699 mcip = mac_primary_client_handle(mip); in i_mac_disable()
2700 if ((mcip != NULL) && mac_link_has_flows((mac_client_handle_t)mcip)) { in i_mac_disable()
2756 mac_client_impl_t *mcip; in mac_rx_classify() local
2764 if ((mcip = flent->fe_mcip) != NULL && in mac_rx_classify()
2765 mcip->mci_flent != flent) { in mac_rx_classify()
2767 flent = mcip->mci_flent; in mac_rx_classify()
5000 mac_client_impl_t *mcip = MAC_GROUP_ONLY_CLIENT(group); in i_mac_group_add_ring() local
5002 VERIFY3P(mcip, !=, NULL); in i_mac_group_add_ring()
5003 flent = mcip->mci_flent; in i_mac_group_add_ring()
5005 mac_rx_srs_group_setup(mcip, flent, SRST_LINK); in i_mac_group_add_ring()
5006 mac_fanout_setup(mcip, flent, MCIP_RESOURCE_PROPS(mcip), in i_mac_group_add_ring()
5007 mac_rx_deliver, mcip, NULL, NULL); in i_mac_group_add_ring()
5015 mac_client_impl_t *mcip; in i_mac_group_add_ring() local
5033 mcip = mgcp->mgc_client; in i_mac_group_add_ring()
5034 flent = mcip->mci_flent; in i_mac_group_add_ring()
5035 is_aggr = (mcip->mci_state_flags & MCIS_IS_AGGR_CLIENT); in i_mac_group_add_ring()
5036 mac_srs = MCIP_TX_SRS(mcip); in i_mac_group_add_ring()
5038 mac_tx_client_quiesce((mac_client_handle_t)mcip); in i_mac_group_add_ring()
5060 mac_fanout_setup(mcip, flent, MCIP_RESOURCE_PROPS(mcip), in i_mac_group_add_ring()
5061 mac_rx_deliver, mcip, NULL, NULL); in i_mac_group_add_ring()
5062 mac_tx_client_restart((mac_client_handle_t)mcip); in i_mac_group_add_ring()
5132 mac_client_impl_t *mcip; in i_mac_group_rem_ring() local
5159 mac_client_impl_t *mcip; in i_mac_group_rem_ring() local
5177 mcip = MAC_GROUP_ONLY_CLIENT(group); in i_mac_group_rem_ring()
5178 ASSERT(mcip != NULL); in i_mac_group_rem_ring()
5179 ASSERT(mcip->mci_state_flags & MCIS_IS_AGGR_CLIENT); in i_mac_group_rem_ring()
5180 mac_srs = MCIP_TX_SRS(mcip); in i_mac_group_rem_ring()
5190 mac_tx_invoke_callbacks(mcip, (mac_tx_cookie_t)sringp); in i_mac_group_rem_ring()
5191 mac_tx_client_quiesce((mac_client_handle_t)mcip); in i_mac_group_rem_ring()
5193 mac_tx_client_restart((mac_client_handle_t)mcip); in i_mac_group_rem_ring()
5208 mcip = mgcp->mgc_client; in i_mac_group_rem_ring()
5209 mac_srs = MCIP_TX_SRS(mcip); in i_mac_group_rem_ring()
5211 mac_tx_client_quiesce((mac_client_handle_t)mcip); in i_mac_group_rem_ring()
5219 mac_tx_invoke_callbacks(mcip, in i_mac_group_rem_ring()
5235 mac_tx_invoke_callbacks(mcip, in i_mac_group_rem_ring()
5261 mac_tx_client_restart((mac_client_handle_t)mcip); in i_mac_group_rem_ring()
5920 mac_write_flow_desc(flow_entry_t *flent, mac_client_impl_t *mcip) in mac_write_flow_desc() argument
5945 ndesc->nd_devname = mcip->mci_name; in mac_write_flow_desc()
6020 mac_write_link_desc(mac_client_impl_t *mcip) in mac_write_link_desc() argument
6024 flow_entry_t *flent = mcip->mci_flent; in mac_write_link_desc()
6035 ndesc->nd_name = mcip->mci_name; in mac_write_link_desc()
6036 ndesc->nd_devname = mcip->mci_name; in mac_write_link_desc()
6056 mac_write_link_stats(mac_client_impl_t *mcip) in mac_write_link_stats() argument
6075 nstat->ns_name = mcip->mci_name; in mac_write_link_stats()
6076 flent = mcip->mci_flent; in mac_write_link_stats()
6091 mac_srs = (mac_soft_ring_set_t *)(mcip->mci_flent->fe_tx_srs); in mac_write_link_stats()
6126 mac_client_impl_t *mcip = flent->fe_mcip; in mac_log_flowinfo() local
6130 if (mcip == NULL) in mac_log_flowinfo()
6150 if ((ninfo = mac_write_flow_desc(flent, mcip)) == NULL) in mac_log_flowinfo()
6166 if (mcip != NULL && !(mcip->mci_state_flags & MCIS_DESC_LOGGED)) in mac_log_flowinfo()
6185 mac_client_impl_t *mcip; in i_mac_impl_log() local
6199 for (mcip = mip->mi_clients_list; mcip != NULL; in i_mac_impl_log()
6200 mcip = mcip->mci_client_next) { in i_mac_impl_log()
6201 if (!MCIP_DATAPATH_SETUP(mcip)) in i_mac_impl_log()
6204 if (!(mcip->mci_state_flags & MCIS_DESC_LOGGED)) { in i_mac_impl_log()
6205 ninfo = mac_write_link_desc(mcip); in i_mac_impl_log()
6225 mcip->mci_state_flags |= MCIS_DESC_LOGGED; in i_mac_impl_log()
6230 ninfo = mac_write_link_stats(mcip); in i_mac_impl_log()
6238 mcip->mci_state_flags &= ~MCIS_DESC_LOGGED; in i_mac_impl_log()
6241 if (mcip->mci_subflow_tab != NULL) { in i_mac_impl_log()
6243 mcip->mci_subflow_tab, mac_log_flowinfo, in i_mac_impl_log()
6475 mac_flow_update_priority(mac_client_impl_t *mcip, flow_entry_t *flent) in mac_flow_update_priority() argument
6486 pri = FLOW_PRIORITY(mcip->mci_min_pri, in mac_flow_update_priority()
6487 mcip->mci_max_pri, in mac_flow_update_priority()
6490 pri = mcip->mci_max_pri; in mac_flow_update_priority()
6543 mac_client_impl_t *mcip; in mac_reserve_tx_ring() local
6569 mcip = mgcp->mgc_client; in mac_reserve_tx_ring()
6570 mac_tx_client_quiesce((mac_client_handle_t)mcip); in mac_reserve_tx_ring()
6571 srs = MCIP_TX_SRS(mcip); in mac_reserve_tx_ring()
6573 mac_tx_invoke_callbacks(mcip, in mac_reserve_tx_ring()
6577 mac_tx_client_restart((mac_client_handle_t)mcip); in mac_reserve_tx_ring()
6589 mac_client_impl_t *mcip; in mac_get_grp_primary() local
6592 mcip = mgcp->mgc_client; in mac_get_grp_primary()
6593 if (mcip->mci_flent->fe_type & FLOW_PRIMARY_MAC) in mac_get_grp_primary()
6594 return (mcip); in mac_get_grp_primary()
6614 mac_client_impl_t *mcip; in mac_reclaim_ring_from_grp() local
6621 mcip = MAC_GROUP_ONLY_CLIENT(group); in mac_reclaim_ring_from_grp()
6622 if (mcip == NULL) in mac_reclaim_ring_from_grp()
6623 mcip = mac_get_grp_primary(group); in mac_reclaim_ring_from_grp()
6624 ASSERT(mcip != NULL); in mac_reclaim_ring_from_grp()
6625 ASSERT(mcip->mci_share == 0); in mac_reclaim_ring_from_grp()
6627 mrp = MCIP_RESOURCE_PROPS(mcip); in mac_reclaim_ring_from_grp()
6632 if (mac_rx_switch_group(mcip, group, defgrp) != 0) in mac_reclaim_ring_from_grp()
6681 mcip = MAC_GROUP_ONLY_CLIENT(tgrp); in mac_reclaim_ring_from_grp()
6682 if (mcip == NULL) in mac_reclaim_ring_from_grp()
6683 mcip = mac_get_grp_primary(tgrp); in mac_reclaim_ring_from_grp()
6684 ASSERT(mcip != NULL); in mac_reclaim_ring_from_grp()
6685 mrp = MCIP_RESOURCE_PROPS(mcip); in mac_reclaim_ring_from_grp()
6700 (mac_client_handle_t)mcip); in mac_reclaim_ring_from_grp()
6701 mac_tx_switch_group(mcip, tgrp, in mac_reclaim_ring_from_grp()
6704 (mac_client_handle_t)mcip); in mac_reclaim_ring_from_grp()
6740 mcip = MAC_GROUP_ONLY_CLIENT(group); in mac_reclaim_ring_from_grp()
6741 if (mcip == NULL) in mac_reclaim_ring_from_grp()
6742 mcip = mac_get_grp_primary(group); in mac_reclaim_ring_from_grp()
6743 ASSERT(mcip != NULL); in mac_reclaim_ring_from_grp()
6744 mrp = MCIP_RESOURCE_PROPS(mcip); in mac_reclaim_ring_from_grp()
6745 mac_tx_client_quiesce((mac_client_handle_t)mcip); in mac_reclaim_ring_from_grp()
6749 mac_tx_switch_group(mcip, group, defgrp); in mac_reclaim_ring_from_grp()
6771 mac_tx_client_restart((mac_client_handle_t)mcip); in mac_reclaim_ring_from_grp()
6775 mac_tx_client_restart((mac_client_handle_t)mcip); in mac_reclaim_ring_from_grp()
6780 mac_tx_client_restart((mac_client_handle_t)mcip); in mac_reclaim_ring_from_grp()
6784 mac_tx_client_restart((mac_client_handle_t)mcip); in mac_reclaim_ring_from_grp()
6933 mac_group_add_client(mac_group_t *grp, mac_client_impl_t *mcip) in mac_group_add_client() argument
6938 if (mgcp->mgc_client == mcip) in mac_group_add_client()
6945 mgcp->mgc_client = mcip; in mac_group_add_client()
6951 mac_group_remove_client(mac_group_t *grp, mac_client_impl_t *mcip) in mac_group_remove_client() argument
6957 if (mgcp->mgc_client == mcip) in mac_group_remove_client()
6975 mac_client_impl_t *mcip; in i_mac_clients_hw() local
6979 mcip = mgcip->mgc_client; in i_mac_clients_hw()
6980 mrp = MCIP_RESOURCE_PROPS(mcip); in i_mac_clients_hw()
6981 if (mcip->mci_share != 0 || (mrp->mrp_mask & mask) != 0) in i_mac_clients_hw()
6996 mac_reserve_rx_group(mac_client_impl_t *mcip, uint8_t *mac_addr, boolean_t move) in mac_reserve_rx_group() argument
6998 mac_share_handle_t share = mcip->mci_share; in mac_reserve_rx_group()
6999 mac_impl_t *mip = mcip->mci_mip; in mac_reserve_rx_group()
7004 mac_resource_props_t *mrp = MCIP_RESOURCE_PROPS(mcip); in mac_reserve_rx_group()
7018 isprimary = mcip->mci_flent->fe_type & FLOW_PRIMARY_MAC; in mac_reserve_rx_group()
7036 if (mcip->mci_state_flags & MCIS_EXCLUSIVE) in mac_reserve_rx_group()
7175 (mac_client_handle_t)mcip, in mac_reserve_rx_group()
7178 if (mac_is_primary_client(mcip) && !rxhw) in mac_reserve_rx_group()
7262 (mac_client_handle_t)mcip, in mac_reserve_rx_group()
7291 mac_release_rx_group(mac_client_impl_t *mcip, mac_group_t *group) in mac_release_rx_group() argument
7293 mac_impl_t *mip = mcip->mci_mip; in mac_release_rx_group()
7324 if (mcip->mci_share != 0) { in mac_release_rx_group()
7325 mip->mi_share_capab.ms_sremove(mcip->mci_share, in mac_release_rx_group()
7352 mac_rx_move_macaddr(mac_client_impl_t *mcip, mac_group_t *fgrp, in mac_rx_move_macaddr() argument
7355 mac_impl_t *mip = mcip->mci_mip; in mac_rx_move_macaddr()
7362 mac_rx_client_quiesce((mac_client_handle_t)mcip); in mac_rx_move_macaddr()
7363 VERIFY3P(mcip->mci_unicast, !=, NULL); in mac_rx_move_macaddr()
7364 bcopy(mcip->mci_unicast->ma_addr, maddr, mcip->mci_unicast->ma_len); in mac_rx_move_macaddr()
7369 use_hw = (mcip->mci_state_flags & MCIS_UNICAST_HW) != 0; in mac_rx_move_macaddr()
7370 vid = i_mac_flow_vid(mcip->mci_flent); in mac_rx_move_macaddr()
7379 if (mac_check_macaddr_shared(mcip->mci_unicast)) in mac_rx_move_macaddr()
7382 err = mac_remove_macaddr_vlan(mcip->mci_unicast, vid); in mac_rx_move_macaddr()
7385 mac_rx_client_restart((mac_client_handle_t)mcip); in mac_rx_move_macaddr()
7395 mcip->mci_unicast = NULL; in mac_rx_move_macaddr()
7401 rw_enter(&mcip->mci_rw_lock, RW_WRITER); in mac_rx_move_macaddr()
7402 for (muip = mcip->mci_unicast_list; muip != NULL; muip = muip->mui_next) in mac_rx_move_macaddr()
7404 rw_exit(&mcip->mci_rw_lock); in mac_rx_move_macaddr()
7419 mcip->mci_name, err2); in mac_rx_move_macaddr()
7422 mac_rx_client_restart((mac_client_handle_t)mcip); in mac_rx_move_macaddr()
7431 mcip->mci_unicast = mac_find_macaddr(mip, maddr); in mac_rx_move_macaddr()
7432 rw_enter(&mcip->mci_rw_lock, RW_WRITER); in mac_rx_move_macaddr()
7433 for (muip = mcip->mci_unicast_list; muip != NULL; muip = muip->mui_next) in mac_rx_move_macaddr()
7434 muip->mui_map = mcip->mci_unicast; in mac_rx_move_macaddr()
7435 rw_exit(&mcip->mci_rw_lock); in mac_rx_move_macaddr()
7436 mac_rx_client_restart((mac_client_handle_t)mcip); in mac_rx_move_macaddr()
7448 mac_rx_switch_group(mac_client_impl_t *mcip, mac_group_t *fgrp, in mac_rx_switch_group() argument
7455 mac_impl_t *mip = mcip->mci_mip; in mac_rx_switch_group()
7458 VERIFY3P(fgrp, ==, mcip->mci_flent->fe_rx_ring_group); in mac_rx_switch_group()
7460 if ((err = mac_rx_move_macaddr(mcip, fgrp, tgrp)) != 0) in mac_rx_switch_group()
7469 mac_rx_srs_group_teardown(mcip->mci_flent, B_TRUE); in mac_rx_switch_group()
7495 mac_release_rx_group(mcip, fgrp); in mac_rx_switch_group()
7499 mac_group_remove_client(fgrp, mcip); in mac_rx_switch_group()
7500 mac_group_add_client(tgrp, mcip); in mac_rx_switch_group()
7501 mcip->mci_flent->fe_rx_ring_group = tgrp; in mac_rx_switch_group()
7507 if (mac_check_macaddr_shared(mcip->mci_unicast)) { in mac_rx_switch_group()
7516 if (mcip->mci_unicast == gmcip->mci_unicast) { in mac_rx_switch_group()
7544 mac_rx_srs_group_setup(mcip, mcip->mci_flent, SRST_LINK); in mac_rx_switch_group()
7545 mac_fanout_setup(mcip, mcip->mci_flent, in mac_rx_switch_group()
7546 MCIP_RESOURCE_PROPS(mcip), mac_rx_deliver, mcip, NULL, in mac_rx_switch_group()
7561 mac_reserve_tx_group(mac_client_impl_t *mcip, boolean_t move) in mac_reserve_tx_group() argument
7563 mac_impl_t *mip = mcip->mci_mip; in mac_reserve_tx_group()
7569 mac_share_handle_t share = mcip->mci_share; in mac_reserve_tx_group()
7570 mac_resource_props_t *mrp = MCIP_RESOURCE_PROPS(mcip); in mac_reserve_tx_group()
7582 isprimary = mcip->mci_flent->fe_type & FLOW_PRIMARY_MAC; in mac_reserve_tx_group()
7738 (mac_client_handle_t)mcip, -1, in mac_reserve_tx_group()
7771 mac_client_set_rings((mac_client_handle_t)mcip, -1, in mac_reserve_tx_group()
7779 mac_release_tx_group(mac_client_impl_t *mcip, mac_group_t *grp) in mac_release_tx_group() argument
7781 mac_impl_t *mip = mcip->mci_mip; in mac_release_tx_group()
7782 mac_share_handle_t share = mcip->mci_share; in mac_release_tx_group()
7784 mac_soft_ring_set_t *srs = MCIP_TX_SRS(mcip); in mac_release_tx_group()
7793 mac_tx_invoke_callbacks(mcip, in mac_release_tx_group()
7823 mac_client_impl_t *mcip = flent->fe_mcip; in mac_tx_dismantle_soft_rings() local
7841 mac_tx_invoke_callbacks(mcip, in mac_tx_dismantle_soft_rings()
7856 mac_tx_switch_group(mac_client_impl_t *mcip, mac_group_t *fgrp, in mac_tx_switch_group() argument
7860 mac_impl_t *mip = mcip->mci_mip; in mac_tx_switch_group()
7861 flow_entry_t *flent = mcip->mci_flent; in mac_tx_switch_group()
7875 mac_group_remove_client(fgrp, mcip); in mac_tx_switch_group()
7877 if (mac_check_macaddr_shared(mcip->mci_unicast)) { in mac_tx_switch_group()
7882 if (mcip->mci_unicast != gmcip->mci_unicast) in mac_tx_switch_group()
7946 if (gmcip == mcip) in mac_tx_switch_group()
7966 mac_group_remove_client(fgrp, mcip); in mac_tx_switch_group()
7967 mac_release_tx_group(mcip, fgrp); in mac_tx_switch_group()
7972 mac_group_add_client(tgrp, mcip); in mac_tx_switch_group()
7977 mac_tx_srs_group_setup(mcip, flent, SRST_LINK); in mac_tx_switch_group()
7978 mac_fanout_setup(mcip, flent, MCIP_RESOURCE_PROPS(mcip), in mac_tx_switch_group()
7979 mac_rx_deliver, mcip, NULL, NULL); in mac_tx_switch_group()
7989 mac_client_tx_notify_add(mac_client_impl_t *mcip, in mac_client_tx_notify_add() argument
7995 ASSERT(MAC_PERIM_HELD((mac_handle_t)mcip->mci_mip)); in mac_client_tx_notify_add()
8004 mcbi = &mcip->mci_tx_notify_cb_info; in mac_client_tx_notify_add()
8006 mac_callback_add(mcbi, &mcip->mci_tx_notify_cb_list, &mtnfp->mtnf_link); in mac_client_tx_notify_add()
8012 mac_client_tx_notify_remove(mac_client_impl_t *mcip, mac_tx_notify_cb_t *mtnfp) in mac_client_tx_notify_remove() argument
8017 ASSERT(MAC_PERIM_HELD((mac_handle_t)mcip->mci_mip)); in mac_client_tx_notify_remove()
8019 if (!mac_callback_find(&mcip->mci_tx_notify_cb_info, in mac_client_tx_notify_remove()
8020 &mcip->mci_tx_notify_cb_list, &mtnfp->mtnf_link)) { in mac_client_tx_notify_remove()
8023 "found, mcip 0x%p mtnfp 0x%p", (void *)mcip, (void *)mtnfp); in mac_client_tx_notify_remove()
8027 mcbi = &mcip->mci_tx_notify_cb_info; in mac_client_tx_notify_remove()
8028 cblist = &mcip->mci_tx_notify_cb_list; in mac_client_tx_notify_remove()
8033 mac_callback_remove_wait(&mcip->mci_tx_notify_cb_info); in mac_client_tx_notify_remove()
8045 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_client_tx_notify() local
8048 i_mac_perim_enter(mcip->mci_mip); in mac_client_tx_notify()
8052 mtnfp = mac_client_tx_notify_add(mcip, callb_func, ptr); in mac_client_tx_notify()
8054 mac_client_tx_notify_remove(mcip, (mac_tx_notify_cb_t *)ptr); in mac_client_tx_notify()
8056 i_mac_perim_exit(mcip->mci_mip); in mac_client_tx_notify()
8170 mac_group_ring_modify(mac_client_impl_t *mcip, mac_group_t *group, in mac_group_ring_modify() argument
8173 mac_resource_props_t *mrp = MCIP_RESOURCE_PROPS(mcip); in mac_group_ring_modify()
8178 mac_impl_t *mip = mcip->mci_mip; in mac_group_ring_modify()
8202 ASSERT(mcip->mci_share == 0); in mac_group_ring_modify()
8211 ASSERT(mac_is_primary_client(mcip)); in mac_group_ring_modify()
8274 mcip = tgrp->mrg_clients->mgc_client; in mac_group_ring_modify()
8275 VERIFY3P(mcip, !=, NULL); in mac_group_ring_modify()
8280 if (mac_rx_switch_group(mcip, tgrp, in mac_group_ring_modify()
8292 mcip = tgrp->mrg_clients->mgc_client; in mac_group_ring_modify()
8293 VERIFY3P(mcip, !=, NULL); in mac_group_ring_modify()
8300 (mac_client_handle_t)mcip); in mac_group_ring_modify()
8301 mac_tx_switch_group(mcip, tgrp, defgrp); in mac_group_ring_modify()
8303 (mac_client_handle_t)mcip); in mac_group_ring_modify()
8310 group, mcip->mci_share, modify)) != 0) { in mac_group_ring_modify()
8410 mac_client_impl_t *mcip; in mac_pool_link_update() local
8419 for (mcip = mip->mi_clients_list; mcip != NULL; in mac_pool_link_update()
8420 mcip = mcip->mci_client_next) { in mac_pool_link_update()
8424 mac_client_get_resources((mac_client_handle_t)mcip, mrp); in mac_pool_link_update()
8425 emrp = MCIP_EFFECTIVE_PROPS(mcip); in mac_pool_link_update()
8475 if (MCIP_DATAPATH_SETUP(mcip)) { in mac_pool_link_update()
8478 mac_fanout_setup(mcip, mcip->mci_flent, mrp, in mac_pool_link_update()
8479 mac_rx_deliver, mcip, NULL, cpupart); in mac_pool_link_update()
8484 mac_update_resources(mrp, MCIP_RESOURCE_PROPS(mcip), in mac_pool_link_update()
8493 if (MCIP_DATAPATH_SETUP(mcip)) { in mac_pool_link_update()
8496 mac_fanout_setup(mcip, mcip->mci_flent, mrp, in mac_pool_link_update()
8497 mac_rx_deliver, mcip, NULL, NULL); in mac_pool_link_update()
8499 mac_update_resources(mrp, MCIP_RESOURCE_PROPS(mcip), in mac_pool_link_update()
8570 mac_set_rings_effective(mac_client_impl_t *mcip) in mac_set_rings_effective() argument
8572 mac_impl_t *mip = mcip->mci_mip; in mac_set_rings_effective()
8575 flow_entry_t *flent = mcip->mci_flent; in mac_set_rings_effective()
8576 mac_resource_props_t *emrp = MCIP_EFFECTIVE_PROPS(mcip); in mac_set_rings_effective()
8652 emrp = MCIP_EFFECTIVE_PROPS(mcip); in mac_set_rings_effective()
8666 mac_check_primary_relocation(mac_client_impl_t *mcip, boolean_t rxhw) in mac_check_primary_relocation() argument
8668 mac_impl_t *mip = mcip->mci_mip; in mac_check_primary_relocation()
8670 flow_entry_t *flent = mcip->mci_flent; in mac_check_primary_relocation()
8671 mac_resource_props_t *mrp = MCIP_RESOURCE_PROPS(mcip); in mac_check_primary_relocation()
8700 ngrp = mac_reserve_rx_group(mcip, mac_addr, B_TRUE); in mac_check_primary_relocation()
8703 if (mac_rx_switch_group(mcip, defgrp, ngrp) != 0) { in mac_check_primary_relocation()
8707 return (mcip); in mac_check_primary_relocation()
8949 mac_client_impl_t *mcip) in mac_provider_tx() argument
8957 if (mcip->mci_state_flags & MCIS_SHARE_BOUND) in mac_provider_tx()
8961 mac_promisc_dispatch(mip, mp, mcip, B_FALSE); in mac_provider_tx()