Lines Matching defs:mpg

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