summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rxe/rxe_pool.h
diff options
context:
space:
mode:
authorBob Pearson <rpearsonhpe@gmail.com>2022-02-08 22:16:36 +0100
committerJason Gunthorpe <jgg@nvidia.com>2022-02-16 16:59:11 +0100
commitd572405518ffd7c21882c1f2e9a568f2e8548d0b (patch)
treebf0bfce87b2c960fb7eb36f9f234d75c547e3a87 /drivers/infiniband/sw/rxe/rxe_pool.h
parentRDMA/rxe: Move mcg_lock to rxe (diff)
downloadlinux-d572405518ffd7c21882c1f2e9a568f2e8548d0b.tar.xz
linux-d572405518ffd7c21882c1f2e9a568f2e8548d0b.zip
RDMA/rxe: Use kzmalloc/kfree for mca
Remove rxe_mca (was rxe_mc_elem) from rxe pools and use kzmalloc and kfree to allocate and free in rxe_mcast.c. Call kzalloc outside of spinlocks to avoid having to use GFP_ATOMIC. Link: https://lore.kernel.org/r/20220208211644.123457-3-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_pool.h')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_pool.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_pool.h b/drivers/infiniband/sw/rxe/rxe_pool.h
index 214279310f4d..9201bb6b8b07 100644
--- a/drivers/infiniband/sw/rxe/rxe_pool.h
+++ b/drivers/infiniband/sw/rxe/rxe_pool.h
@@ -23,7 +23,6 @@ enum rxe_elem_type {
RXE_TYPE_MR,
RXE_TYPE_MW,
RXE_TYPE_MC_GRP,
- RXE_TYPE_MC_ELEM,
RXE_NUM_TYPES, /* keep me last */
};
@@ -156,4 +155,6 @@ void rxe_elem_release(struct kref *kref);
/* drop a reference on an object */
#define rxe_drop_ref(obj) kref_put(&(obj)->elem.ref_cnt, rxe_elem_release)
+#define rxe_read_ref(obj) kref_read(&(obj)->elem.ref_cnt)
+
#endif /* RXE_POOL_H */