On 1/28/22 12:32, Jason Gunthorpe wrote: > On Thu, Jan 27, 2022 at 03:37:41PM -0600, Bob Pearson wrote: >> >> struct rxe_mcg { >> struct rxe_pool_elem elem; >> + struct rb_node node; >> struct rxe_dev *rxe; >> struct list_head qp_list; >> atomic_t qp_num; >> @@ -397,6 +398,8 @@ struct rxe_dev { >> struct rxe_pool mc_grp_pool; >> >> spinlock_t mcg_lock; /* guard multicast groups */ > > I think you should probably just use a mutex here and simplify > things.. > > Jason That won't work. All lthe code in rxe_mcast.c would be OK but I have to take the lock in rxe_recv.c when we receive a multicast packet and mutexes are not allowed in bottom halves. Bob