• Home
  • Raw
  • Download

Lines Matching full:grp

41 	struct rxe_mc_grp *grp;  in rxe_mcast_get_grp()  local
48 grp = rxe_pool_get_key(&rxe->mc_grp_pool, mgid); in rxe_mcast_get_grp()
49 if (grp) in rxe_mcast_get_grp()
52 grp = rxe_alloc(&rxe->mc_grp_pool); in rxe_mcast_get_grp()
53 if (!grp) { in rxe_mcast_get_grp()
58 INIT_LIST_HEAD(&grp->qp_list); in rxe_mcast_get_grp()
59 spin_lock_init(&grp->mcg_lock); in rxe_mcast_get_grp()
60 grp->rxe = rxe; in rxe_mcast_get_grp()
62 rxe_add_key(grp, mgid); in rxe_mcast_get_grp()
69 *grp_p = grp; in rxe_mcast_get_grp()
73 rxe_drop_ref(grp); in rxe_mcast_get_grp()
79 struct rxe_mc_grp *grp) in rxe_mcast_add_grp_elem() argument
86 spin_lock_bh(&grp->mcg_lock); in rxe_mcast_add_grp_elem()
87 list_for_each_entry(elem, &grp->qp_list, qp_list) { in rxe_mcast_add_grp_elem()
94 if (grp->num_qp >= rxe->attr.max_mcast_qp_attach) { in rxe_mcast_add_grp_elem()
105 /* each qp holds a ref on the grp */ in rxe_mcast_add_grp_elem()
106 rxe_add_ref(grp); in rxe_mcast_add_grp_elem()
108 grp->num_qp++; in rxe_mcast_add_grp_elem()
110 elem->grp = grp; in rxe_mcast_add_grp_elem()
112 list_add(&elem->qp_list, &grp->qp_list); in rxe_mcast_add_grp_elem()
117 spin_unlock_bh(&grp->mcg_lock); in rxe_mcast_add_grp_elem()
125 struct rxe_mc_grp *grp; in rxe_mcast_drop_grp_elem() local
128 grp = rxe_pool_get_key(&rxe->mc_grp_pool, mgid); in rxe_mcast_drop_grp_elem()
129 if (!grp) in rxe_mcast_drop_grp_elem()
133 spin_lock_bh(&grp->mcg_lock); in rxe_mcast_drop_grp_elem()
135 list_for_each_entry_safe(elem, tmp, &grp->qp_list, qp_list) { in rxe_mcast_drop_grp_elem()
139 grp->num_qp--; in rxe_mcast_drop_grp_elem()
141 spin_unlock_bh(&grp->mcg_lock); in rxe_mcast_drop_grp_elem()
144 rxe_drop_ref(grp); /* ref held by QP */ in rxe_mcast_drop_grp_elem()
145 rxe_drop_ref(grp); /* ref from get_key */ in rxe_mcast_drop_grp_elem()
150 spin_unlock_bh(&grp->mcg_lock); in rxe_mcast_drop_grp_elem()
152 rxe_drop_ref(grp); /* ref from get_key */ in rxe_mcast_drop_grp_elem()
159 struct rxe_mc_grp *grp; in rxe_drop_all_mcast_groups() local
173 grp = elem->grp; in rxe_drop_all_mcast_groups()
174 spin_lock_bh(&grp->mcg_lock); in rxe_drop_all_mcast_groups()
176 grp->num_qp--; in rxe_drop_all_mcast_groups()
177 spin_unlock_bh(&grp->mcg_lock); in rxe_drop_all_mcast_groups()
178 rxe_drop_ref(grp); in rxe_drop_all_mcast_groups()
185 struct rxe_mc_grp *grp = container_of(arg, typeof(*grp), pelem); in rxe_mc_cleanup() local
186 struct rxe_dev *rxe = grp->rxe; in rxe_mc_cleanup()
188 rxe_drop_key(grp); in rxe_mc_cleanup()
189 rxe_mcast_delete(rxe, &grp->mgid); in rxe_mc_cleanup()