Lines Matching refs:mpg
2734 man_pg_t *mpg; in man_init_dests() local
2749 mpg = man_find_pg_by_id(manp->man_pg, i); in man_init_dests()
2751 if (mpg && man_find_active_path(mpg->mpg_pathp)) in man_init_dests()
2752 man_start_dest(&mdp[i], msp, mpg); in man_init_dests()
2763 man_start_dest(man_dest_t *mdp, manstr_t *msp, man_pg_t *mpg) in man_start_dest() argument
2771 mdp->md_pg_id = mpg->mpg_pg_id; in man_start_dest()
2776 ether_copy(&mpg->mpg_dst_eaddr, &mdp->md_dst_eaddr); in man_start_dest()
2778 ap = man_find_active_path(mpg->mpg_pathp); in man_start_dest()
3996 man_pg_t *mpg; in man_lrsrv() local
4014 mpg = man_find_pg_by_id(mdp->md_msp->ms_manp->man_pg, in man_lrsrv()
4016 ASSERT(mpg != NULL); in man_lrsrv()
4017 mp = man_find_path_by_ppa(mpg->mpg_pathp, in man_lrsrv()
4182 man_pg_t *mpg; in man_do_dr_switch() local
4201 mpg = man_find_pg_by_id(manp->man_pg, adp->a_pg_id); in man_do_dr_switch()
4202 if (mpg == NULL) { in man_do_dr_switch()
4207 if (mpg->mpg_flags & MAN_PG_SWITCHING) { in man_do_dr_switch()
4216 mp = man_find_active_path(mpg->mpg_pathp); in man_do_dr_switch()
4219 ap = man_find_alternate_path(mpg->mpg_pathp); in man_do_dr_switch()
4330 man_pg_t *mpg; in man_do_dr_detach() local
4351 mpg = man_find_pg_by_id(manp->man_pg, adp->a_pg_id); in man_do_dr_detach()
4352 if (mpg == NULL) { in man_do_dr_detach()
4357 if (mpg->mpg_flags & MAN_PG_SWITCHING) { in man_do_dr_detach()
4365 mp = man_find_active_path(mpg->mpg_pathp); in man_do_dr_detach()
4384 mp = mpg->mpg_pathp; in man_do_dr_detach()
4434 man_pg_t *mpg; in man_iswitch() local
4542 mpg = man_find_pg_by_id(manp->man_pg, adp->a_pg_id); in man_iswitch()
4543 ASSERT(mpg != NULL); in man_iswitch()
4544 ASSERT(mpg->mpg_flags & MAN_PG_SWITCHING); in man_iswitch()
4545 mpg->mpg_flags &= ~MAN_PG_SWITCHING; in man_iswitch()
4553 mp = man_find_active_path(mpg->mpg_pathp); in man_iswitch()
4570 mp = man_find_path_by_ppa(mpg->mpg_pathp, in man_iswitch()
4872 man_add_dests(man_pg_t *mpg) in man_add_dests() argument
4879 if (!man_str_uses_pg(msp, mpg)) in man_add_dests()
4882 mdp = &msp->ms_dests[mpg->mpg_pg_id]; in man_add_dests()
4894 man_start_dest(mdp, msp, mpg); in man_add_dests()
4900 man_remove_dests(man_pg_t *mpg) in man_remove_dests() argument
4921 if (!man_str_uses_pg(msp, mpg)) in man_remove_dests()
4939 if (!man_str_uses_pg(msp, mpg)) in man_remove_dests()
4942 mdp = &msp->ms_dests[mpg->mpg_pg_id]; in man_remove_dests()
4993 man_str_uses_pg(manstr_t *msp, man_pg_t *mpg) in man_str_uses_pg() argument
5000 (msp->ms_manp->man_meta_ppa != mpg->mpg_man_ppa)); in man_str_uses_pg()
5068 man_pg_t *mpg; in man_linkcheck_timer() local
5113 mpg = man_find_pg_by_id(mdp->md_msp->ms_manp->man_pg, mdp->md_pg_id); in man_linkcheck_timer()
5114 ASSERT(mpg != NULL); in man_linkcheck_timer()
5115 mp = man_find_path_by_ppa(mpg->mpg_pathp, mdp->md_device.mdev_ppa); in man_linkcheck_timer()
5228 man_pg_t *mpg; in man_do_autoswitch() local
5238 mpg = man_find_pg_by_id(mdp->md_msp->ms_manp->man_pg, mdp->md_pg_id); in man_do_autoswitch()
5239 ASSERT(mpg); in man_do_autoswitch()
5241 if (mpg->mpg_flags & MAN_PG_SWITCHING) in man_do_autoswitch()
5244 mpg->mpg_flags |= MAN_PG_SWITCHING; in man_do_autoswitch()
5251 status = man_autoswitch(mpg, &mdp->md_device, NULL); in man_do_autoswitch()
5269 ap = man_find_alternate_path(mpg->mpg_pathp); in man_do_autoswitch()
5275 status = man_autoswitch(mpg, &ap->mp_device, NULL); in man_do_autoswitch()
5282 mpg->mpg_flags &= ~MAN_PG_SWITCHING; in man_do_autoswitch()
5298 man_autoswitch(man_pg_t *mpg, man_dev_t *st_devp, man_work_t *waiter_wp) in man_autoswitch() argument
5321 status = man_prep_dests_for_switch(mpg, &sdp, &sdp_cnt); in man_autoswitch()
5344 wp->mw_arg.a_pg_id = mpg->mpg_pg_id; in man_autoswitch()
5345 wp->mw_arg.a_man_ppa = mpg->mpg_man_ppa; in man_autoswitch()
5366 man_prep_dests_for_switch(man_pg_t *mpg, man_dest_t **mdpp, int *cntp) in man_prep_dests_for_switch() argument
5376 mpg->mpg_pg_id)); in man_prep_dests_for_switch()
5383 if (man_str_uses_pg(msp, mpg)) in man_prep_dests_for_switch()
5400 if (man_str_uses_pg(msp, mpg)) { in man_prep_dests_for_switch()
5407 mdp = &msp->ms_dests[mpg->mpg_pg_id]; in man_prep_dests_for_switch()
6328 man_pg_t *mpg; in man_pg_assign() local
6350 mpg = man_find_path_by_dev(*mplpp, &mip->mip_devs[i], NULL); in man_pg_assign()
6352 if (mpg == NULL) in man_pg_assign()
6355 if ((mpg->mpg_man_ppa != mip->mip_man_ppa) || in man_pg_assign()
6356 (mpg->mpg_pg_id != mip->mip_pg_id)) { in man_pg_assign()
6371 mpg = man_find_pg_by_id(*mplpp, mip->mip_pg_id); in man_pg_assign()
6372 if (mpg == NULL) { in man_pg_assign()
6374 status = man_pg_create(mplpp, &mpg, mip); in man_pg_assign()
6378 } else if (ether_cmp(&mip->mip_eaddr, &mpg->mpg_dst_eaddr) != 0) { in man_pg_assign()
6382 ether_sprintf(&mpg->mpg_dst_eaddr)); in man_pg_assign()
6432 mp = mpg->mpg_pathp; in man_pg_assign()
6462 man_path_remove(&mpg->mpg_pathp, rp); in man_pg_assign()
6473 man_path_merge(&mpg->mpg_pathp, add_paths); in man_pg_assign()
6496 man_pg_t *mpg; in man_pg_unassign() local
6507 if ((mpg = man_find_pg_by_id(*plpp, mip->mip_pg_id)) == NULL) in man_pg_unassign()
6510 if (man_find_active_path(mpg->mpg_pathp) != NULL) { in man_pg_unassign()
6511 status = man_remove_dests(mpg); in man_pg_unassign()
6519 while (mpg->mpg_pathp) { in man_pg_unassign()
6520 mp = mpg->mpg_pathp; in man_pg_unassign()
6521 mpg->mpg_pathp = mp->mp_next; in man_pg_unassign()
6532 if (tpg == mpg) { in man_pg_unassign()
6538 if (tpg == mpg) in man_pg_unassign()
6663 man_pg_t *mpg; in man_pg_read() local
6670 if ((mpg = man_find_pg_by_id(plp, mip->mip_pg_id)) == NULL) { in man_pg_read()
6676 for (mp = mpg->mpg_pathp; mp != NULL; mp = mp->mp_next) { in man_pg_read()
6684 (void *)mpg, mpg->mpg_pg_id, cnt)); in man_pg_read()
6712 man_pg_t *mpg; in man_pg_create() local
6725 mpg = man_kzalloc(sizeof (man_pg_t), KM_NOSLEEP); in man_pg_create()
6726 if (mpg == NULL) { in man_pg_create()
6731 mpg->mpg_flags = MAN_PG_IDLE; in man_pg_create()
6732 mpg->mpg_pg_id = mip->mip_pg_id; in man_pg_create()
6733 mpg->mpg_man_ppa = mip->mip_man_ppa; in man_pg_create()
6734 ether_copy(&mip->mip_eaddr, &mpg->mpg_dst_eaddr); in man_pg_create()
6737 MAN_DBGCALL(MAN_PATH, man_print_mpg(mpg)); in man_pg_create()
6741 *mplpp = mpg; in man_pg_create()
6745 tpg->mpg_next = mpg; in man_pg_create()
6749 *mpgp = mpg; in man_pg_create()
6763 man_pg_t *mpg; in man_find_path_by_dev() local
6767 for (mpg = plp; mpg != NULL; mpg = mpg->mpg_next) { in man_find_path_by_dev()
6768 for (mp = mpg->mpg_pathp; mp != NULL; mp = mp->mp_next) { in man_find_path_by_dev()
6774 return (mpg); in man_find_path_by_dev()
6788 man_find_pg_by_id(man_pg_t *mpg, int pg_id) in man_find_pg_by_id() argument
6791 for (; mpg != NULL; mpg = mpg->mpg_next) { in man_find_pg_by_id()
6792 if (mpg->mpg_pg_id == pg_id) in man_find_pg_by_id()
6793 return (mpg); in man_find_pg_by_id()
7160 man_pg_t *mpg; in man_pathgroups_report() local
7185 for (mpg = manp->man_pg; mpg != NULL; mpg = mpg->mpg_next) { in man_pathgroups_report()
7193 man_preport(mpg->mpg_pathp, mp); in man_pathgroups_report()
7197 &mpg->mpg_dst_eaddr)); in man_pathgroups_report()
7203 mpg->mpg_pg_id + 'A', in man_pathgroups_report()
7204 ether_sprintf(&mpg->mpg_dst_eaddr), in man_pathgroups_report()
7212 man_preport(mpg->mpg_pathp, mp); in man_pathgroups_report()
7273 man_pg_t *mpg; in man_set_active_path() local
7309 mpg = man_find_pg_by_id(manp->man_pg, pg_id); in man_set_active_path()
7310 if (mpg == NULL) { in man_set_active_path()
7316 np = man_find_path_by_ppa(mpg->mpg_pathp, phys_ppa); in man_set_active_path()
7592 man_pg_t *mpg; in man_do_kstats() local
7603 for (mpg = manp->man_pg; mpg != NULL; mpg = mpg->mpg_next) { in man_do_kstats()
7605 ASSERT(mpg->mpg_man_ppa == manp->man_meta_ppa); in man_do_kstats()
7607 if ((mp = man_find_active_path(mpg->mpg_pathp)) != NULL) { in man_do_kstats()
7615 man_sum_dests_kstats(mp->mp_last_knp, mpg); in man_do_kstats()
7630 man_pg_t *mpg; in man_update_path_kstats() local
7638 for (mpg = manp->man_pg; mpg != NULL; mpg = mpg->mpg_next) { in man_update_path_kstats()
7640 ASSERT(mpg->mpg_man_ppa == manp->man_meta_ppa); in man_update_path_kstats()
7642 if ((mp = man_find_active_path(mpg->mpg_pathp)) != NULL) { in man_update_path_kstats()
7687 man_sum_dests_kstats(kstat_named_t *knp, man_pg_t *mpg) in man_sum_dests_kstats() argument
7700 MAN_DBG(MAN_KSTAT, ("man_sum_dests_kstats: mpg 0x%p", (void *)mpg)); in man_sum_dests_kstats()
7704 if (!man_str_uses_pg(msp, mpg)) in man_sum_dests_kstats()
7707 mdp = &msp->ms_dests[mpg->mpg_pg_id]; in man_sum_dests_kstats()
8227 man_print_mpg(man_pg_t *mpg) in man_print_mpg() argument
8229 cmn_err(CE_CONT, "\tmpg(0x%p)\n", (void *)mpg); in man_print_mpg()
8231 if (mpg == NULL) in man_print_mpg()
8234 cmn_err(CE_CONT, "\tmpg_next: 0x%p\n", (void *)mpg->mpg_next); in man_print_mpg()
8236 cmn_err(CE_CONT, "\tmpg_pg_id: %d\n", mpg->mpg_pg_id); in man_print_mpg()
8238 cmn_err(CE_CONT, "\tmpg_man_ppa: %d\n", mpg->mpg_man_ppa); in man_print_mpg()
8241 ether_sprintf(&mpg->mpg_dst_eaddr)); in man_print_mpg()
8243 cmn_err(CE_CONT, "\tmpg_pathp: 0x%p\n", (void *)mpg->mpg_pathp); in man_print_mpg()