Lines Matching refs:mcip

857 	mac_client_impl_t	*mcip;  in i_mac_perim_enter()  local
864 mcip = mac_vnic_lower(mip); in i_mac_perim_enter()
865 mip = mcip->mci_mip; in i_mac_perim_enter()
919 mac_client_impl_t *mcip; in i_mac_perim_exit() local
926 mcip = mac_vnic_lower(mip); in i_mac_perim_exit()
927 mip = mcip->mci_mip; in i_mac_perim_exit()
948 mac_client_impl_t *mcip; in mac_perim_held() local
955 mcip = mac_vnic_lower(mip); in mac_perim_held()
956 mip = mcip->mci_mip; in mac_perim_held()
1326 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_addr_factory_reserve() local
1327 mac_impl_t *mip = mcip->mci_mip; in mac_addr_factory_reserve()
1367 mip->mi_factory_addr[*slot-1].mfa_client = mcip; in mac_addr_factory_reserve()
1381 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_addr_factory_release() local
1382 mac_impl_t *mip = mcip->mci_mip; in mac_addr_factory_release()
1490 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_hwrings_get() local
1491 flow_entry_t *flent = mcip->mci_flent; in mac_hwrings_get()
1517 (mcip == MAC_GROUP_ONLY_CLIENT(grp))); in mac_hwrings_get()
1678 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_hwring_send_priv() local
1679 mac_impl_t *mip = mcip->mci_mip; in mac_hwring_send_priv()
1681 MAC_TX(mip, rh, mp, mcip); in mac_hwring_send_priv()
1809 mac_tx_lock_all(mac_client_impl_t *mcip) in mac_tx_lock_all() argument
1814 mutex_enter(&mcip->mci_tx_pcpu[i].pcpu_tx_lock); in mac_tx_lock_all()
1818 mac_tx_unlock_all(mac_client_impl_t *mcip) in mac_tx_unlock_all() argument
1823 mutex_exit(&mcip->mci_tx_pcpu[i].pcpu_tx_lock); in mac_tx_unlock_all()
1827 mac_tx_unlock_allbutzero(mac_client_impl_t *mcip) in mac_tx_unlock_allbutzero() argument
1832 mutex_exit(&mcip->mci_tx_pcpu[i].pcpu_tx_lock); in mac_tx_unlock_allbutzero()
1836 mac_tx_sum_refcnt(mac_client_impl_t *mcip) in mac_tx_sum_refcnt() argument
1842 refcnt += mcip->mci_tx_pcpu[i].pcpu_tx_refcnt; in mac_tx_sum_refcnt()
1853 mac_tx_client_block(mac_client_impl_t *mcip) in mac_tx_client_block() argument
1855 mac_tx_lock_all(mcip); in mac_tx_client_block()
1856 mcip->mci_tx_flag |= MCI_TX_QUIESCE; in mac_tx_client_block()
1857 while (mac_tx_sum_refcnt(mcip) != 0) { in mac_tx_client_block()
1858 mac_tx_unlock_allbutzero(mcip); in mac_tx_client_block()
1859 cv_wait(&mcip->mci_tx_cv, &mcip->mci_tx_pcpu[0].pcpu_tx_lock); in mac_tx_client_block()
1860 mutex_exit(&mcip->mci_tx_pcpu[0].pcpu_tx_lock); in mac_tx_client_block()
1861 mac_tx_lock_all(mcip); in mac_tx_client_block()
1863 mac_tx_unlock_all(mcip); in mac_tx_client_block()
1867 mac_tx_client_unblock(mac_client_impl_t *mcip) in mac_tx_client_unblock() argument
1869 mac_tx_lock_all(mcip); in mac_tx_client_unblock()
1870 mcip->mci_tx_flag &= ~MCI_TX_QUIESCE; in mac_tx_client_unblock()
1871 mac_tx_unlock_all(mcip); in mac_tx_client_unblock()
1877 i_mac_notify(mcip->mci_mip, MAC_NOTE_TX); in mac_tx_client_unblock()
2094 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_srs_perm_quiesce() local
2095 flow_entry_t *flent = mcip->mci_flent; in mac_srs_perm_quiesce()
2096 mac_impl_t *mip = mcip->mci_mip; in mac_srs_perm_quiesce()
2119 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_rx_client_quiesce() local
2120 mac_impl_t *mip = mcip->mci_mip; in mac_rx_client_quiesce()
2124 if (MCIP_DATAPATH_SETUP(mcip)) { in mac_rx_client_quiesce()
2125 (void) mac_rx_classify_flow_quiesce(mcip->mci_flent, in mac_rx_client_quiesce()
2127 (void) mac_flow_walk_nolock(mcip->mci_subflow_tab, in mac_rx_client_quiesce()
2135 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_rx_client_restart() local
2136 mac_impl_t *mip = mcip->mci_mip; in mac_rx_client_restart()
2140 if (MCIP_DATAPATH_SETUP(mcip)) { in mac_rx_client_restart()
2141 (void) mac_rx_classify_flow_restart(mcip->mci_flent, NULL); in mac_rx_client_restart()
2142 (void) mac_flow_walk_nolock(mcip->mci_subflow_tab, in mac_rx_client_restart()
2155 mac_client_impl_t *mcip = srs->srs_mcip; in mac_tx_srs_quiesce() local
2157 ASSERT(MAC_PERIM_HELD((mac_handle_t)mcip->mci_mip)); in mac_tx_srs_quiesce()
2222 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in i_mac_tx_client_quiesce() local
2224 ASSERT(MAC_PERIM_HELD((mac_handle_t)mcip->mci_mip)); in i_mac_tx_client_quiesce()
2226 mac_tx_client_block(mcip); in i_mac_tx_client_quiesce()
2227 if (MCIP_TX_SRS(mcip) != NULL) { in i_mac_tx_client_quiesce()
2228 mac_tx_srs_quiesce(MCIP_TX_SRS(mcip), srs_quiesce_flag); in i_mac_tx_client_quiesce()
2229 (void) mac_flow_walk_nolock(mcip->mci_subflow_tab, in i_mac_tx_client_quiesce()
2249 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_tx_client_restart() local
2251 ASSERT(MAC_PERIM_HELD((mac_handle_t)mcip->mci_mip)); in mac_tx_client_restart()
2253 mac_tx_client_unblock(mcip); in mac_tx_client_restart()
2254 if (MCIP_TX_SRS(mcip) != NULL) { in mac_tx_client_restart()
2255 mac_tx_srs_restart(MCIP_TX_SRS(mcip)); in mac_tx_client_restart()
2256 (void) mac_flow_walk_nolock(mcip->mci_subflow_tab, in mac_tx_client_restart()
2262 mac_tx_client_flush(mac_client_impl_t *mcip) in mac_tx_client_flush() argument
2264 ASSERT(MAC_PERIM_HELD((mac_handle_t)mcip->mci_mip)); in mac_tx_client_flush()
2266 mac_tx_client_quiesce((mac_client_handle_t)mcip); in mac_tx_client_flush()
2267 mac_tx_client_restart((mac_client_handle_t)mcip); in mac_tx_client_flush()
2271 mac_client_quiesce(mac_client_impl_t *mcip) in mac_client_quiesce() argument
2273 mac_rx_client_quiesce((mac_client_handle_t)mcip); in mac_client_quiesce()
2274 mac_tx_client_quiesce((mac_client_handle_t)mcip); in mac_client_quiesce()
2278 mac_client_restart(mac_client_impl_t *mcip) in mac_client_restart() argument
2280 mac_rx_client_restart((mac_client_handle_t)mcip); in mac_client_restart()
2281 mac_tx_client_restart((mac_client_handle_t)mcip); in mac_client_restart()
2336 mac_client_impl_t *mcip; in i_mac_disable() local
2371 mcip = mac_primary_client_handle(mip); in i_mac_disable()
2372 if ((mcip != NULL) && mac_link_has_flows((mac_client_handle_t)mcip)) { in i_mac_disable()
2445 mac_client_impl_t *mcip; in mac_rx_classify() local
2453 if ((mcip = flent->fe_mcip) != NULL && in mac_rx_classify()
2454 mcip->mci_flent != flent) { in mac_rx_classify()
2456 flent = mcip->mci_flent; in mac_rx_classify()
4528 mac_client_impl_t *mcip; in i_mac_group_add_ring() local
4530 mcip = MAC_GROUP_ONLY_CLIENT(group); in i_mac_group_add_ring()
4536 if (mcip != NULL) { in i_mac_group_add_ring()
4537 flent = mcip->mci_flent; in i_mac_group_add_ring()
4539 mac_rx_srs_group_setup(mcip, flent, SRST_LINK); in i_mac_group_add_ring()
4540 mac_fanout_setup(mcip, flent, in i_mac_group_add_ring()
4541 MCIP_RESOURCE_PROPS(mcip), mac_rx_deliver, in i_mac_group_add_ring()
4542 mcip, NULL, NULL); in i_mac_group_add_ring()
4551 mac_client_impl_t *mcip; in i_mac_group_add_ring() local
4569 mcip = mgcp->mgc_client; in i_mac_group_add_ring()
4570 flent = mcip->mci_flent; in i_mac_group_add_ring()
4571 is_aggr = (mcip->mci_state_flags & MCIS_IS_AGGR); in i_mac_group_add_ring()
4572 mac_srs = MCIP_TX_SRS(mcip); in i_mac_group_add_ring()
4574 mac_tx_client_quiesce((mac_client_handle_t)mcip); in i_mac_group_add_ring()
4596 mac_fanout_setup(mcip, flent, MCIP_RESOURCE_PROPS(mcip), in i_mac_group_add_ring()
4597 mac_rx_deliver, mcip, NULL, NULL); in i_mac_group_add_ring()
4598 mac_tx_client_restart((mac_client_handle_t)mcip); in i_mac_group_add_ring()
4668 mac_client_impl_t *mcip; in i_mac_group_rem_ring() local
4695 mac_client_impl_t *mcip; in i_mac_group_rem_ring() local
4713 mcip = MAC_GROUP_ONLY_CLIENT(group); in i_mac_group_rem_ring()
4714 ASSERT(mcip != NULL); in i_mac_group_rem_ring()
4715 ASSERT(mcip->mci_state_flags & MCIS_IS_AGGR); in i_mac_group_rem_ring()
4716 mac_srs = MCIP_TX_SRS(mcip); in i_mac_group_rem_ring()
4726 mac_tx_invoke_callbacks(mcip, (mac_tx_cookie_t)sringp); in i_mac_group_rem_ring()
4727 mac_tx_client_quiesce((mac_client_handle_t)mcip); in i_mac_group_rem_ring()
4729 mac_tx_client_restart((mac_client_handle_t)mcip); in i_mac_group_rem_ring()
4744 mcip = mgcp->mgc_client; in i_mac_group_rem_ring()
4745 mac_srs = MCIP_TX_SRS(mcip); in i_mac_group_rem_ring()
4747 mac_tx_client_quiesce((mac_client_handle_t)mcip); in i_mac_group_rem_ring()
4755 mac_tx_invoke_callbacks(mcip, in i_mac_group_rem_ring()
4771 mac_tx_invoke_callbacks(mcip, in i_mac_group_rem_ring()
4797 mac_tx_client_restart((mac_client_handle_t)mcip); in i_mac_group_rem_ring()
5271 mac_write_flow_desc(flow_entry_t *flent, mac_client_impl_t *mcip) in mac_write_flow_desc() argument
5296 ndesc->nd_devname = mcip->mci_name; in mac_write_flow_desc()
5371 mac_write_link_desc(mac_client_impl_t *mcip) in mac_write_link_desc() argument
5375 flow_entry_t *flent = mcip->mci_flent; in mac_write_link_desc()
5386 ndesc->nd_name = mcip->mci_name; in mac_write_link_desc()
5387 ndesc->nd_devname = mcip->mci_name; in mac_write_link_desc()
5407 mac_write_link_stats(mac_client_impl_t *mcip) in mac_write_link_stats() argument
5426 nstat->ns_name = mcip->mci_name; in mac_write_link_stats()
5427 flent = mcip->mci_flent; in mac_write_link_stats()
5442 mac_srs = (mac_soft_ring_set_t *)(mcip->mci_flent->fe_tx_srs); in mac_write_link_stats()
5477 mac_client_impl_t *mcip = flent->fe_mcip; in mac_log_flowinfo() local
5481 if (mcip == NULL) in mac_log_flowinfo()
5501 if ((ninfo = mac_write_flow_desc(flent, mcip)) == NULL) in mac_log_flowinfo()
5517 if (mcip != NULL && !(mcip->mci_state_flags & MCIS_DESC_LOGGED)) in mac_log_flowinfo()
5536 mac_client_impl_t *mcip; in i_mac_impl_log() local
5550 for (mcip = mip->mi_clients_list; mcip != NULL; in i_mac_impl_log()
5551 mcip = mcip->mci_client_next) { in i_mac_impl_log()
5552 if (!MCIP_DATAPATH_SETUP(mcip)) in i_mac_impl_log()
5555 if (!(mcip->mci_state_flags & MCIS_DESC_LOGGED)) { in i_mac_impl_log()
5556 ninfo = mac_write_link_desc(mcip); in i_mac_impl_log()
5576 mcip->mci_state_flags |= MCIS_DESC_LOGGED; in i_mac_impl_log()
5581 ninfo = mac_write_link_stats(mcip); in i_mac_impl_log()
5589 mcip->mci_state_flags &= ~MCIS_DESC_LOGGED; in i_mac_impl_log()
5592 if (mcip->mci_subflow_tab != NULL) { in i_mac_impl_log()
5594 mcip->mci_subflow_tab, mac_log_flowinfo, in i_mac_impl_log()
5826 mac_flow_update_priority(mac_client_impl_t *mcip, flow_entry_t *flent) in mac_flow_update_priority() argument
5837 pri = FLOW_PRIORITY(mcip->mci_min_pri, in mac_flow_update_priority()
5838 mcip->mci_max_pri, in mac_flow_update_priority()
5841 pri = mcip->mci_max_pri; in mac_flow_update_priority()
5894 mac_client_impl_t *mcip; in mac_reserve_tx_ring() local
5920 mcip = mgcp->mgc_client; in mac_reserve_tx_ring()
5921 mac_tx_client_quiesce((mac_client_handle_t)mcip); in mac_reserve_tx_ring()
5922 srs = MCIP_TX_SRS(mcip); in mac_reserve_tx_ring()
5924 mac_tx_invoke_callbacks(mcip, in mac_reserve_tx_ring()
5928 mac_tx_client_restart((mac_client_handle_t)mcip); in mac_reserve_tx_ring()
5940 mac_client_impl_t *mcip; in mac_get_grp_primary() local
5943 mcip = mgcp->mgc_client; in mac_get_grp_primary()
5944 if (mcip->mci_flent->fe_type & FLOW_PRIMARY_MAC) in mac_get_grp_primary()
5945 return (mcip); in mac_get_grp_primary()
5965 mac_client_impl_t *mcip; in mac_reclaim_ring_from_grp() local
5972 mcip = MAC_GROUP_ONLY_CLIENT(group); in mac_reclaim_ring_from_grp()
5973 if (mcip == NULL) in mac_reclaim_ring_from_grp()
5974 mcip = mac_get_grp_primary(group); in mac_reclaim_ring_from_grp()
5975 ASSERT(mcip != NULL); in mac_reclaim_ring_from_grp()
5976 ASSERT(mcip->mci_share == NULL); in mac_reclaim_ring_from_grp()
5978 mrp = MCIP_RESOURCE_PROPS(mcip); in mac_reclaim_ring_from_grp()
5983 if (mac_rx_switch_group(mcip, group, defgrp) != 0) in mac_reclaim_ring_from_grp()
6032 mcip = MAC_GROUP_ONLY_CLIENT(tgrp); in mac_reclaim_ring_from_grp()
6033 if (mcip == NULL) in mac_reclaim_ring_from_grp()
6034 mcip = mac_get_grp_primary(tgrp); in mac_reclaim_ring_from_grp()
6035 ASSERT(mcip != NULL); in mac_reclaim_ring_from_grp()
6036 mrp = MCIP_RESOURCE_PROPS(mcip); in mac_reclaim_ring_from_grp()
6051 (mac_client_handle_t)mcip); in mac_reclaim_ring_from_grp()
6052 mac_tx_switch_group(mcip, tgrp, in mac_reclaim_ring_from_grp()
6055 (mac_client_handle_t)mcip); in mac_reclaim_ring_from_grp()
6091 mcip = MAC_GROUP_ONLY_CLIENT(group); in mac_reclaim_ring_from_grp()
6092 if (mcip == NULL) in mac_reclaim_ring_from_grp()
6093 mcip = mac_get_grp_primary(group); in mac_reclaim_ring_from_grp()
6094 ASSERT(mcip != NULL); in mac_reclaim_ring_from_grp()
6095 mrp = MCIP_RESOURCE_PROPS(mcip); in mac_reclaim_ring_from_grp()
6096 mac_tx_client_quiesce((mac_client_handle_t)mcip); in mac_reclaim_ring_from_grp()
6100 mac_tx_switch_group(mcip, group, defgrp); in mac_reclaim_ring_from_grp()
6122 mac_tx_client_restart((mac_client_handle_t)mcip); in mac_reclaim_ring_from_grp()
6126 mac_tx_client_restart((mac_client_handle_t)mcip); in mac_reclaim_ring_from_grp()
6131 mac_tx_client_restart((mac_client_handle_t)mcip); in mac_reclaim_ring_from_grp()
6135 mac_tx_client_restart((mac_client_handle_t)mcip); in mac_reclaim_ring_from_grp()
6284 mac_group_add_client(mac_group_t *grp, mac_client_impl_t *mcip) in mac_group_add_client() argument
6289 if (mgcp->mgc_client == mcip) in mac_group_add_client()
6296 mgcp->mgc_client = mcip; in mac_group_add_client()
6303 mac_group_remove_client(mac_group_t *grp, mac_client_impl_t *mcip) in mac_group_remove_client() argument
6309 if (mgcp->mgc_client == mcip) in mac_group_remove_client()
6329 mac_reserve_rx_group(mac_client_impl_t *mcip, uint8_t *mac_addr, boolean_t move) in mac_reserve_rx_group() argument
6331 mac_share_handle_t share = mcip->mci_share; in mac_reserve_rx_group()
6332 mac_impl_t *mip = mcip->mci_mip; in mac_reserve_rx_group()
6337 mac_resource_props_t *mrp = MCIP_RESOURCE_PROPS(mcip); in mac_reserve_rx_group()
6352 isprimary = mcip->mci_flent->fe_type & FLOW_PRIMARY_MAC; in mac_reserve_rx_group()
6368 if (mcip->mci_state_flags & MCIS_EXCLUSIVE) in mac_reserve_rx_group()
6511 (mac_client_handle_t)mcip, in mac_reserve_rx_group()
6514 if (mac_is_primary_client(mcip) && !rxhw) in mac_reserve_rx_group()
6598 (mac_client_handle_t)mcip, in mac_reserve_rx_group()
6627 mac_release_rx_group(mac_client_impl_t *mcip, mac_group_t *group) in mac_release_rx_group() argument
6629 mac_impl_t *mip = mcip->mci_mip; in mac_release_rx_group()
6659 if (mcip->mci_share != NULL) { in mac_release_rx_group()
6660 mip->mi_share_capab.ms_sremove(mcip->mci_share, in mac_release_rx_group()
6695 mac_rx_move_macaddr_prim(mac_client_impl_t *mcip, mac_group_t *grp, in mac_rx_move_macaddr_prim() argument
6698 mac_impl_t *mip = mcip->mci_mip; in mac_rx_move_macaddr_prim()
6703 prim = (mcip->mci_state_flags & MCIS_UNICAST_HW) != 0; in mac_rx_move_macaddr_prim()
6713 if (gmcip != mcip && in mac_rx_move_macaddr_prim()
6715 mcip->mci_unicast == gmcip->mci_unicast)) { in mac_rx_move_macaddr_prim()
6719 (void) mac_remove_macaddr(mcip->mci_unicast); in mac_rx_move_macaddr_prim()
6736 mac_rx_move_macaddr(mac_client_impl_t *mcip, mac_group_t *fgrp, in mac_rx_move_macaddr() argument
6739 mac_impl_t *mip = mcip->mci_mip; in mac_rx_move_macaddr()
6745 mac_rx_client_quiesce((mac_client_handle_t)mcip); in mac_rx_move_macaddr()
6746 ASSERT(mcip->mci_unicast != NULL); in mac_rx_move_macaddr()
6747 bcopy(mcip->mci_unicast->ma_addr, maddr, mcip->mci_unicast->ma_len); in mac_rx_move_macaddr()
6749 prim = (mcip->mci_state_flags & MCIS_UNICAST_HW) != 0; in mac_rx_move_macaddr()
6750 if (mcip->mci_unicast->ma_nusers > 1) { in mac_rx_move_macaddr()
6751 mac_rx_move_macaddr_prim(mcip, fgrp, NULL, maddr, B_FALSE); in mac_rx_move_macaddr()
6754 ASSERT(mcip->mci_unicast->ma_nusers == 1); in mac_rx_move_macaddr()
6755 err = mac_remove_macaddr(mcip->mci_unicast); in mac_rx_move_macaddr()
6757 mac_rx_client_restart((mac_client_handle_t)mcip); in mac_rx_move_macaddr()
6759 mac_rx_move_macaddr_prim(mcip, fgrp, fgrp, maddr, in mac_rx_move_macaddr()
6777 " to group %p failed!!", (void *)mcip, in mac_rx_move_macaddr()
6780 mac_rx_client_restart((mac_client_handle_t)mcip); in mac_rx_move_macaddr()
6782 mac_rx_move_macaddr_prim(mcip, fgrp, fgrp, maddr, in mac_rx_move_macaddr()
6787 mcip->mci_unicast = mac_find_macaddr(mip, maddr); in mac_rx_move_macaddr()
6788 mac_rx_client_restart((mac_client_handle_t)mcip); in mac_rx_move_macaddr()
6790 mac_rx_move_macaddr_prim(mcip, fgrp, tgrp, maddr, B_TRUE); in mac_rx_move_macaddr()
6802 mac_rx_switch_group(mac_client_impl_t *mcip, mac_group_t *fgrp, in mac_rx_switch_group() argument
6809 mac_impl_t *mip = mcip->mci_mip; in mac_rx_switch_group()
6812 ASSERT(fgrp == mcip->mci_flent->fe_rx_ring_group); in mac_rx_switch_group()
6814 if ((err = mac_rx_move_macaddr(mcip, fgrp, tgrp)) != 0) in mac_rx_switch_group()
6823 mac_rx_srs_group_teardown(mcip->mci_flent, B_TRUE); in mac_rx_switch_group()
6834 mac_release_rx_group(mcip, fgrp); in mac_rx_switch_group()
6838 mac_group_remove_client(fgrp, mcip); in mac_rx_switch_group()
6839 mac_group_add_client(tgrp, mcip); in mac_rx_switch_group()
6840 mcip->mci_flent->fe_rx_ring_group = tgrp; in mac_rx_switch_group()
6845 if (mcip->mci_unicast->ma_nusers > 1) { in mac_rx_switch_group()
6854 if (mcip->mci_unicast == gmcip->mci_unicast) { in mac_rx_switch_group()
6878 mac_rx_srs_group_setup(mcip, mcip->mci_flent, SRST_LINK); in mac_rx_switch_group()
6879 mac_fanout_setup(mcip, mcip->mci_flent, in mac_rx_switch_group()
6880 MCIP_RESOURCE_PROPS(mcip), mac_rx_deliver, mcip, NULL, in mac_rx_switch_group()
6894 mac_reserve_tx_group(mac_client_impl_t *mcip, boolean_t move) in mac_reserve_tx_group() argument
6896 mac_impl_t *mip = mcip->mci_mip; in mac_reserve_tx_group()
6902 mac_share_handle_t share = mcip->mci_share; in mac_reserve_tx_group()
6903 mac_resource_props_t *mrp = MCIP_RESOURCE_PROPS(mcip); in mac_reserve_tx_group()
6915 isprimary = mcip->mci_flent->fe_type & FLOW_PRIMARY_MAC; in mac_reserve_tx_group()
7070 (mac_client_handle_t)mcip, -1, in mac_reserve_tx_group()
7103 mac_client_set_rings((mac_client_handle_t)mcip, -1, in mac_reserve_tx_group()
7111 mac_release_tx_group(mac_client_impl_t *mcip, mac_group_t *grp) in mac_release_tx_group() argument
7113 mac_impl_t *mip = mcip->mci_mip; in mac_release_tx_group()
7114 mac_share_handle_t share = mcip->mci_share; in mac_release_tx_group()
7116 mac_soft_ring_set_t *srs = MCIP_TX_SRS(mcip); in mac_release_tx_group()
7125 mac_tx_invoke_callbacks(mcip, in mac_release_tx_group()
7155 mac_client_impl_t *mcip = flent->fe_mcip; in mac_tx_dismantle_soft_rings() local
7173 mac_tx_invoke_callbacks(mcip, in mac_tx_dismantle_soft_rings()
7188 mac_tx_switch_group(mac_client_impl_t *mcip, mac_group_t *fgrp, in mac_tx_switch_group() argument
7192 mac_impl_t *mip = mcip->mci_mip; in mac_tx_switch_group()
7193 flow_entry_t *flent = mcip->mci_flent; in mac_tx_switch_group()
7207 mac_group_remove_client(fgrp, mcip); in mac_tx_switch_group()
7209 if (mcip->mci_unicast->ma_nusers > 1) { in mac_tx_switch_group()
7214 if (mcip->mci_unicast != gmcip->mci_unicast) in mac_tx_switch_group()
7278 if (gmcip == mcip) in mac_tx_switch_group()
7298 mac_group_remove_client(fgrp, mcip); in mac_tx_switch_group()
7299 mac_release_tx_group(mcip, fgrp); in mac_tx_switch_group()
7304 mac_group_add_client(tgrp, mcip); in mac_tx_switch_group()
7309 mac_tx_srs_group_setup(mcip, flent, SRST_LINK); in mac_tx_switch_group()
7310 mac_fanout_setup(mcip, flent, MCIP_RESOURCE_PROPS(mcip), in mac_tx_switch_group()
7311 mac_rx_deliver, mcip, NULL, NULL); in mac_tx_switch_group()
7321 mac_client_tx_notify_add(mac_client_impl_t *mcip, in mac_client_tx_notify_add() argument
7327 ASSERT(MAC_PERIM_HELD((mac_handle_t)mcip->mci_mip)); in mac_client_tx_notify_add()
7336 mcbi = &mcip->mci_tx_notify_cb_info; in mac_client_tx_notify_add()
7338 mac_callback_add(mcbi, &mcip->mci_tx_notify_cb_list, &mtnfp->mtnf_link); in mac_client_tx_notify_add()
7344 mac_client_tx_notify_remove(mac_client_impl_t *mcip, mac_tx_notify_cb_t *mtnfp) in mac_client_tx_notify_remove() argument
7349 ASSERT(MAC_PERIM_HELD((mac_handle_t)mcip->mci_mip)); in mac_client_tx_notify_remove()
7351 if (!mac_callback_find(&mcip->mci_tx_notify_cb_info, in mac_client_tx_notify_remove()
7352 &mcip->mci_tx_notify_cb_list, &mtnfp->mtnf_link)) { in mac_client_tx_notify_remove()
7355 "found, mcip 0x%p mtnfp 0x%p", (void *)mcip, (void *)mtnfp); in mac_client_tx_notify_remove()
7359 mcbi = &mcip->mci_tx_notify_cb_info; in mac_client_tx_notify_remove()
7360 cblist = &mcip->mci_tx_notify_cb_list; in mac_client_tx_notify_remove()
7365 mac_callback_remove_wait(&mcip->mci_tx_notify_cb_info); in mac_client_tx_notify_remove()
7377 mac_client_impl_t *mcip = (mac_client_impl_t *)mch; in mac_client_tx_notify() local
7380 i_mac_perim_enter(mcip->mci_mip); in mac_client_tx_notify()
7384 mtnfp = mac_client_tx_notify_add(mcip, callb_func, ptr); in mac_client_tx_notify()
7386 mac_client_tx_notify_remove(mcip, (mac_tx_notify_cb_t *)ptr); in mac_client_tx_notify()
7388 i_mac_perim_exit(mcip->mci_mip); in mac_client_tx_notify()
7502 mac_group_ring_modify(mac_client_impl_t *mcip, mac_group_t *group, in mac_group_ring_modify() argument
7505 mac_resource_props_t *mrp = MCIP_RESOURCE_PROPS(mcip); in mac_group_ring_modify()
7510 mac_impl_t *mip = mcip->mci_mip; in mac_group_ring_modify()
7534 ASSERT(mcip->mci_share == NULL); in mac_group_ring_modify()
7543 ASSERT(mac_is_primary_client(mcip)); in mac_group_ring_modify()
7604 mcip = MAC_GROUP_ONLY_CLIENT(tgrp); in mac_group_ring_modify()
7605 if (mcip == NULL) in mac_group_ring_modify()
7606 mcip = mac_get_grp_primary(tgrp); in mac_group_ring_modify()
7607 ASSERT(mcip != NULL); in mac_group_ring_modify()
7608 mrp = MCIP_RESOURCE_PROPS(mcip); in mac_group_ring_modify()
7615 if (mac_rx_switch_group(mcip, tgrp, in mac_group_ring_modify()
7625 mcip = MAC_GROUP_ONLY_CLIENT(tgrp); in mac_group_ring_modify()
7626 if (mcip == NULL) in mac_group_ring_modify()
7627 mcip = mac_get_grp_primary(tgrp); in mac_group_ring_modify()
7628 mrp = MCIP_RESOURCE_PROPS(mcip); in mac_group_ring_modify()
7637 (mac_client_handle_t)mcip); in mac_group_ring_modify()
7638 mac_tx_switch_group(mcip, tgrp, defgrp); in mac_group_ring_modify()
7640 (mac_client_handle_t)mcip); in mac_group_ring_modify()
7647 group, mcip->mci_share, modify)) != 0) { in mac_group_ring_modify()
7747 mac_client_impl_t *mcip; in mac_pool_link_update() local
7756 for (mcip = mip->mi_clients_list; mcip != NULL; in mac_pool_link_update()
7757 mcip = mcip->mci_client_next) { in mac_pool_link_update()
7761 mac_client_get_resources((mac_client_handle_t)mcip, mrp); in mac_pool_link_update()
7762 emrp = MCIP_EFFECTIVE_PROPS(mcip); in mac_pool_link_update()
7812 if (MCIP_DATAPATH_SETUP(mcip)) { in mac_pool_link_update()
7815 mac_fanout_setup(mcip, mcip->mci_flent, mrp, in mac_pool_link_update()
7816 mac_rx_deliver, mcip, NULL, cpupart); in mac_pool_link_update()
7821 mac_update_resources(mrp, MCIP_RESOURCE_PROPS(mcip), in mac_pool_link_update()
7830 if (MCIP_DATAPATH_SETUP(mcip)) { in mac_pool_link_update()
7833 mac_fanout_setup(mcip, mcip->mci_flent, mrp, in mac_pool_link_update()
7834 mac_rx_deliver, mcip, NULL, NULL); in mac_pool_link_update()
7836 mac_update_resources(mrp, MCIP_RESOURCE_PROPS(mcip), in mac_pool_link_update()
7907 mac_set_rings_effective(mac_client_impl_t *mcip) in mac_set_rings_effective() argument
7909 mac_impl_t *mip = mcip->mci_mip; in mac_set_rings_effective()
7912 flow_entry_t *flent = mcip->mci_flent; in mac_set_rings_effective()
7913 mac_resource_props_t *emrp = MCIP_EFFECTIVE_PROPS(mcip); in mac_set_rings_effective()
7989 emrp = MCIP_EFFECTIVE_PROPS(mcip); in mac_set_rings_effective()
8003 mac_check_primary_relocation(mac_client_impl_t *mcip, boolean_t rxhw) in mac_check_primary_relocation() argument
8005 mac_impl_t *mip = mcip->mci_mip; in mac_check_primary_relocation()
8007 flow_entry_t *flent = mcip->mci_flent; in mac_check_primary_relocation()
8008 mac_resource_props_t *mrp = MCIP_RESOURCE_PROPS(mcip); in mac_check_primary_relocation()
8036 ngrp = mac_reserve_rx_group(mcip, mac_addr, B_TRUE); in mac_check_primary_relocation()
8039 if (mac_rx_switch_group(mcip, defgrp, ngrp) != 0) { in mac_check_primary_relocation()
8043 return (mcip); in mac_check_primary_relocation()