Lines Matching refs:illg

46 #define	IPMP_ILLGRP_TO_IPST(illg)	((illg)->ig_ipmp_ill->ill_ipst)  argument
542 ipmp_illgrp_t *illg; in ipmp_illgrp_create() local
548 if ((illg = kmem_zalloc(sizeof (ipmp_illgrp_t), KM_NOSLEEP)) == NULL) in ipmp_illgrp_create()
551 list_create(&illg->ig_if, sizeof (ill_t), offsetof(ill_t, ill_grpnode)); in ipmp_illgrp_create()
552 list_create(&illg->ig_actif, sizeof (ill_t), in ipmp_illgrp_create()
554 list_create(&illg->ig_arpent, sizeof (ipmp_arpent_t), in ipmp_illgrp_create()
557 illg->ig_ipmp_ill = ill; in ipmp_illgrp_create()
558 ill->ill_grp = illg; in ipmp_illgrp_create()
559 ipmp_illgrp_set_mtu(illg, mtu, mtu); in ipmp_illgrp_create()
561 return (illg); in ipmp_illgrp_create()
568 ipmp_illgrp_destroy(ipmp_illgrp_t *illg) in ipmp_illgrp_destroy() argument
570 ASSERT(IAM_WRITER_ILL(illg->ig_ipmp_ill)); in ipmp_illgrp_destroy()
571 ASSERT(IS_IPMP(illg->ig_ipmp_ill)); in ipmp_illgrp_destroy()
576 ASSERT(illg->ig_next_ill == NULL); in ipmp_illgrp_destroy()
577 ASSERT(illg->ig_cast_ill == NULL); in ipmp_illgrp_destroy()
578 ASSERT(list_is_empty(&illg->ig_arpent)); in ipmp_illgrp_destroy()
579 ASSERT(list_is_empty(&illg->ig_if)); in ipmp_illgrp_destroy()
580 ASSERT(list_is_empty(&illg->ig_actif)); in ipmp_illgrp_destroy()
581 ASSERT(illg->ig_nactif == 0); in ipmp_illgrp_destroy()
586 illg->ig_ipmp_ill->ill_grp = NULL; in ipmp_illgrp_destroy()
587 illg->ig_ipmp_ill = NULL; in ipmp_illgrp_destroy()
588 list_destroy(&illg->ig_if); in ipmp_illgrp_destroy()
589 list_destroy(&illg->ig_actif); in ipmp_illgrp_destroy()
590 list_destroy(&illg->ig_arpent); in ipmp_illgrp_destroy()
591 kmem_free(illg, sizeof (ipmp_illgrp_t)); in ipmp_illgrp_destroy()
600 ipmp_illgrp_add_ipif(ipmp_illgrp_t *illg, ipif_t *ipif) in ipmp_illgrp_add_ipif() argument
613 entp = ipmp_illgrp_lookup_arpent(illg, &ipif->ipif_lcl_addr); in ipmp_illgrp_add_ipif()
615 ipmp_illgrp_destroy_arpent(illg, entp); in ipmp_illgrp_add_ipif()
618 if ((minill = ipmp_illgrp_min_ill(illg)) != NULL) in ipmp_illgrp_add_ipif()
630 ipmp_illgrp_del_ipif(ipmp_illgrp_t *illg, ipif_t *ipif) in ipmp_illgrp_del_ipif() argument
639 maxill = ipmp_illgrp_max_ill(illg); in ipmp_illgrp_del_ipif()
651 ipmp_illgrp_max_ill(ipmp_illgrp_t *illg) in ipmp_illgrp_max_ill() argument
655 ASSERT(IAM_WRITER_ILL(illg->ig_ipmp_ill)); in ipmp_illgrp_max_ill()
657 ill = list_head(&illg->ig_actif); in ipmp_illgrp_max_ill()
658 for (; ill != NULL; ill = list_next(&illg->ig_actif, ill)) { in ipmp_illgrp_max_ill()
671 ipmp_illgrp_min_ill(ipmp_illgrp_t *illg) in ipmp_illgrp_min_ill() argument
675 ASSERT(IAM_WRITER_ILL(illg->ig_ipmp_ill)); in ipmp_illgrp_min_ill()
677 ill = list_head(&illg->ig_actif); in ipmp_illgrp_min_ill()
678 for (; ill != NULL; ill = list_next(&illg->ig_actif, ill)) { in ipmp_illgrp_min_ill()
694 ipmp_illgrp_ipmp_ill(ipmp_illgrp_t *illg) in ipmp_illgrp_ipmp_ill() argument
696 return (illg->ig_ipmp_ill); in ipmp_illgrp_ipmp_ill()
704 ipmp_illgrp_next_ill(ipmp_illgrp_t *illg) in ipmp_illgrp_next_ill() argument
707 ip_stack_t *ipst = IPMP_ILLGRP_TO_IPST(illg); in ipmp_illgrp_next_ill()
709 ASSERT(IAM_WRITER_ILL(illg->ig_ipmp_ill)); in ipmp_illgrp_next_ill()
712 if ((ill = illg->ig_next_ill) != NULL) { in ipmp_illgrp_next_ill()
713 illg->ig_next_ill = list_next(&illg->ig_actif, ill); in ipmp_illgrp_next_ill()
714 if (illg->ig_next_ill == NULL) in ipmp_illgrp_next_ill()
715 illg->ig_next_ill = list_head(&illg->ig_actif); in ipmp_illgrp_next_ill()
727 ipmp_illgrp_hold_next_ill(ipmp_illgrp_t *illg) in ipmp_illgrp_hold_next_ill() argument
731 ip_stack_t *ipst = IPMP_ILLGRP_TO_IPST(illg); in ipmp_illgrp_hold_next_ill()
734 for (i = 0; i < illg->ig_nactif; i++) { in ipmp_illgrp_hold_next_ill()
735 ill = illg->ig_next_ill; in ipmp_illgrp_hold_next_ill()
736 illg->ig_next_ill = list_next(&illg->ig_actif, ill); in ipmp_illgrp_hold_next_ill()
737 if (illg->ig_next_ill == NULL) in ipmp_illgrp_hold_next_ill()
738 illg->ig_next_ill = list_head(&illg->ig_actif); in ipmp_illgrp_hold_next_ill()
755 ipmp_illgrp_hold_cast_ill(ipmp_illgrp_t *illg) in ipmp_illgrp_hold_cast_ill() argument
758 ip_stack_t *ipst = IPMP_ILLGRP_TO_IPST(illg); in ipmp_illgrp_hold_cast_ill()
761 castill = illg->ig_cast_ill; in ipmp_illgrp_hold_cast_ill()
775 ipmp_illgrp_set_cast(ipmp_illgrp_t *illg, ill_t *castill) in ipmp_illgrp_set_cast() argument
777 ill_t *ocastill = illg->ig_cast_ill; in ipmp_illgrp_set_cast()
778 ill_t *ipmp_ill = illg->ig_ipmp_ill; in ipmp_illgrp_set_cast()
779 ip_stack_t *ipst = IPMP_ILLGRP_TO_IPST(illg); in ipmp_illgrp_set_cast()
788 illg, ill_t *, ocastill); in ipmp_illgrp_set_cast()
811 illg->ig_cast_ill = castill; in ipmp_illgrp_set_cast()
819 illg, ill_t *, castill); in ipmp_illgrp_set_cast()
838 ipmp_illgrp_create_arpent(ipmp_illgrp_t *illg, boolean_t proxyarp, in ipmp_illgrp_create_arpent() argument
843 ASSERT(IAM_WRITER_ILL(illg->ig_ipmp_ill)); in ipmp_illgrp_create_arpent()
852 if ((oentp = ipmp_illgrp_lookup_arpent(illg, &entp->ia_ipaddr)) != NULL) in ipmp_illgrp_create_arpent()
853 ipmp_illgrp_destroy_arpent(illg, oentp); in ipmp_illgrp_create_arpent()
865 list_insert_head(&illg->ig_arpent, entp); in ipmp_illgrp_create_arpent()
873 ipmp_illgrp_destroy_arpent(ipmp_illgrp_t *illg, ipmp_arpent_t *entp) in ipmp_illgrp_destroy_arpent() argument
875 ASSERT(IAM_WRITER_ILL(illg->ig_ipmp_ill)); in ipmp_illgrp_destroy_arpent()
877 list_remove(&illg->ig_arpent, entp); in ipmp_illgrp_destroy_arpent()
887 ipmp_illgrp_mark_arpent(ipmp_illgrp_t *illg, ipmp_arpent_t *entp) in ipmp_illgrp_mark_arpent() argument
897 ipmp_illgrp_lookup_arpent(ipmp_illgrp_t *illg, ipaddr_t *addrp) in ipmp_illgrp_lookup_arpent() argument
899 ipmp_arpent_t *entp = list_head(&illg->ig_arpent); in ipmp_illgrp_lookup_arpent()
901 ASSERT(IAM_WRITER_ILL(illg->ig_ipmp_ill)); in ipmp_illgrp_lookup_arpent()
906 for (; entp != NULL; entp = list_next(&illg->ig_arpent, entp)) in ipmp_illgrp_lookup_arpent()
918 ipmp_illgrp_refresh_arpent(ipmp_illgrp_t *illg) in ipmp_illgrp_refresh_arpent() argument
920 ill_t *ill, *ipmp_ill = illg->ig_ipmp_ill; in ipmp_illgrp_refresh_arpent()
929 ill = list_head(&illg->ig_actif); in ipmp_illgrp_refresh_arpent()
930 entp = list_head(&illg->ig_arpent); in ipmp_illgrp_refresh_arpent()
931 for (; entp != NULL; entp = list_next(&illg->ig_arpent, entp)) { in ipmp_illgrp_refresh_arpent()
964 ipmp_illgrp_mark_arpent(illg, entp); in ipmp_illgrp_refresh_arpent()
966 if ((ill = list_next(&illg->ig_actif, ill)) == NULL) in ipmp_illgrp_refresh_arpent()
967 ill = list_head(&illg->ig_actif); in ipmp_illgrp_refresh_arpent()
976 ipmp_illgrp_find_ill(ipmp_illgrp_t *illg, uchar_t *physaddr, uint_t paddrlen) in ipmp_illgrp_find_ill() argument
979 ill_t *ipmp_ill = illg->ig_ipmp_ill; in ipmp_illgrp_find_ill()
980 ip_stack_t *ipst = IPMP_ILLGRP_TO_IPST(illg); in ipmp_illgrp_find_ill()
984 ill = list_head(&illg->ig_if); in ipmp_illgrp_find_ill()
985 for (; ill != NULL; ill = list_next(&illg->ig_if, ill)) { in ipmp_illgrp_find_ill()
998 ipmp_illgrp_set_mtu(ipmp_illgrp_t *illg, uint_t mtu, uint_t mc_mtu) in ipmp_illgrp_set_mtu() argument
1000 ill_t *ill = illg->ig_ipmp_ill; in ipmp_illgrp_set_mtu()
1003 ASSERT(illg->ig_mtu == 0 || IAM_WRITER_ILL(ill)); in ipmp_illgrp_set_mtu()
1009 illg->ig_mtu = mtu; in ipmp_illgrp_set_mtu()
1010 illg->ig_mc_mtu = mc_mtu; in ipmp_illgrp_set_mtu()
1020 ipmp_illgrp_refresh_mtu(ipmp_illgrp_t *illg) in ipmp_illgrp_refresh_mtu() argument
1023 ill_t *ipmp_ill = illg->ig_ipmp_ill; in ipmp_illgrp_refresh_mtu()
1035 ill = list_head(&illg->ig_if); in ipmp_illgrp_refresh_mtu()
1036 for (; ill != NULL; ill = list_next(&illg->ig_if, ill)) { in ipmp_illgrp_refresh_mtu()
1050 if (illg->ig_mtu != mtu || illg->ig_mc_mtu != mc_mtu) in ipmp_illgrp_refresh_mtu()
1051 ipmp_illgrp_set_mtu(illg, mtu, mc_mtu); in ipmp_illgrp_refresh_mtu()
1059 ipmp_illgrp_link_grp(ipmp_illgrp_t *illg, ipmp_grp_t *grp) in ipmp_illgrp_link_grp() argument
1061 ip_stack_t *ipst = IPMP_ILLGRP_TO_IPST(illg); in ipmp_illgrp_link_grp()
1065 if (illg->ig_ipmp_ill->ill_isv6) { in ipmp_illgrp_link_grp()
1066 ASSERT(grp->gr_v6 == NULL || grp->gr_v6 == illg); in ipmp_illgrp_link_grp()
1067 grp->gr_v6 = illg; in ipmp_illgrp_link_grp()
1069 ASSERT(grp->gr_v4 == NULL || grp->gr_v4 == illg); in ipmp_illgrp_link_grp()
1070 grp->gr_v4 = illg; in ipmp_illgrp_link_grp()
1079 ipmp_illgrp_unlink_grp(ipmp_illgrp_t *illg) in ipmp_illgrp_unlink_grp() argument
1081 ipmp_grp_t *grp = illg->ig_ipmp_ill->ill_phyint->phyint_grp; in ipmp_illgrp_unlink_grp()
1082 ip_stack_t *ipst = IPMP_ILLGRP_TO_IPST(illg); in ipmp_illgrp_unlink_grp()
1086 if (illg->ig_ipmp_ill->ill_isv6) { in ipmp_illgrp_unlink_grp()
1104 ipmp_ill_join_illgrp(ill_t *ill, ipmp_illgrp_t *illg) in ipmp_ill_join_illgrp() argument
1115 ipmp_ill = illg->ig_ipmp_ill; in ipmp_ill_join_illgrp()
1164 if (list_is_empty(&illg->ig_if)) { in ipmp_ill_join_illgrp()
1181 ipmp_illgrp_set_mtu(illg, ill->ill_mtu, ill->ill_mc_mtu); in ipmp_ill_join_illgrp()
1192 if (illg->ig_mtu > ill->ill_mtu || in ipmp_ill_join_illgrp()
1193 illg->ig_mc_mtu > ill->ill_mc_mtu) { in ipmp_ill_join_illgrp()
1194 ipmp_illgrp_set_mtu(illg, ill->ill_mtu, in ipmp_ill_join_illgrp()
1200 list_insert_tail(&illg->ig_if, ill); in ipmp_ill_join_illgrp()
1201 ill->ill_grp = illg; in ipmp_ill_join_illgrp()
1228 ipmp_illgrp_t *illg = ill->ill_grp; in ipmp_ill_leave_illgrp() local
1229 ip_stack_t *ipst = IPMP_ILLGRP_TO_IPST(illg); in ipmp_ill_leave_illgrp()
1233 ASSERT(illg != NULL); in ipmp_ill_leave_illgrp()
1235 ipmp_ill = illg->ig_ipmp_ill; in ipmp_ill_leave_illgrp()
1272 list_remove(&illg->ig_if, ill); in ipmp_ill_leave_illgrp()
1287 ipmp_illgrp_refresh_mtu(illg); in ipmp_ill_leave_illgrp()
1289 if (list_is_empty(&illg->ig_if)) { in ipmp_ill_leave_illgrp()
1295 while ((entp = ipmp_illgrp_lookup_arpent(illg, NULL)) != NULL) in ipmp_ill_leave_illgrp()
1296 ipmp_illgrp_destroy_arpent(illg, entp); in ipmp_ill_leave_illgrp()
1311 ill = list_head(&illg->ig_if); in ipmp_ill_leave_illgrp()
1315 } while ((ill = list_next(&illg->ig_if, ill)) != NULL); in ipmp_ill_leave_illgrp()
1428 ipmp_illgrp_t *illg = ill->ill_grp; in ipmp_ill_activate() local
1430 ip_stack_t *ipst = IPMP_ILLGRP_TO_IPST(illg); in ipmp_ill_activate()
1446 if (list_is_empty(&illg->ig_actif)) { in ipmp_ill_activate()
1453 ipmp_illgrp_set_cast(illg, ill); in ipmp_ill_activate()
1460 ipif = illg->ig_ipmp_ill->ill_ipif; in ipmp_ill_activate()
1471 maxill = ipmp_illgrp_max_ill(illg); in ipmp_ill_activate()
1484 list_insert_tail(&illg->ig_actif, ill); in ipmp_ill_activate()
1485 illg->ig_nactif++; in ipmp_ill_activate()
1486 illg->ig_next_ill = ill; in ipmp_ill_activate()
1493 ipmp_illgrp_refresh_arpent(illg); in ipmp_ill_activate()
1501 put(illg->ig_ipmp_ill->ill_rq, linkupmp); in ipmp_ill_activate()
1520 ipmp_illgrp_t *illg = ill->ill_grp; in ipmp_ill_deactivate() local
1521 ip_stack_t *ipst = IPMP_ILLGRP_TO_IPST(illg); in ipmp_ill_deactivate()
1526 ipmp_ill = illg->ig_ipmp_ill; in ipmp_ill_deactivate()
1532 list_remove(&illg->ig_actif, ill); in ipmp_ill_deactivate()
1533 illg->ig_nactif--; in ipmp_ill_deactivate()
1534 illg->ig_next_ill = list_head(&illg->ig_actif); in ipmp_ill_deactivate()
1541 if (ill == illg->ig_cast_ill) in ipmp_ill_deactivate()
1542 ipmp_illgrp_set_cast(illg, list_head(&illg->ig_actif)); in ipmp_ill_deactivate()
1567 ipmp_illgrp_refresh_arpent(illg); in ipmp_ill_deactivate()
1579 if ((minill = ipmp_illgrp_min_ill(illg)) != NULL) in ipmp_ill_deactivate()
1831 ipmp_illgrp_t *illg; in ipmp_ill_hold_ipmp_ill() local
1836 illg = ill->ill_grp; in ipmp_ill_hold_ipmp_ill()
1837 if (illg != NULL && ill_check_and_refhold(illg->ig_ipmp_ill)) { in ipmp_ill_hold_ipmp_ill()
1839 return (illg->ig_ipmp_ill); in ipmp_ill_hold_ipmp_ill()
2199 ipmp_illgrp_t *illg = ncec->ncec_ill->ill_grp; in ipmp_ncec_delete_nce() local
2215 ill = list_head(&illg->ig_if); in ipmp_ncec_delete_nce()
2216 for (; ill != NULL; ill = list_next(&illg->ig_if, ill)) in ipmp_ncec_delete_nce()
2233 ipmp_illgrp_t *illg = ncec->ncec_ill->ill_grp; in ipmp_ncec_refresh_nce() local
2256 ill = list_head(&illg->ig_actif); in ipmp_ncec_refresh_nce()
2257 for (; ill != NULL; ill = list_next(&illg->ig_actif, ill)) { in ipmp_ncec_refresh_nce()