RDMA/rxe: Remove rxe_alloc()
authorBob Pearson <rpearsonhpe@gmail.com>
Mon, 13 Feb 2023 22:55:52 +0000 (16:55 -0600)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 16 Feb 2023 15:30:11 +0000 (11:30 -0400)
commit72a03627443d5bc7032ab98bd784740cd8a76f8a
treee103c7cf0454e309085e65b782ffbadaa0a1b2d8
parent876e480da2f74715fc70e37723e77ca16a631e35
RDMA/rxe: Remove rxe_alloc()

Currently all the object types in the rxe driver are allocated in
rdma-core except for MRs. By moving tha kzalloc() call outside of
the pool code the rxe_alloc() subroutine can be eliminated and code
checking for MR as a special case can be removed.

This patch moves the kzalloc() and kfree_rcu() calls into the mr
registration and destruction verbs. It removes that code from
rxe_pool.c including the rxe_alloc() subroutine which is no longer
used.

Link: https://lore.kernel.org/r/20230213225551.12437-1-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Reviewed-by: Devesh Sharma <devesh.s.sharma@oracle.com>
Reviewed-by: Devesh Sharma <devesh.s.sharma@oracle.com>
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_mr.c
drivers/infiniband/sw/rxe/rxe_pool.c
drivers/infiniband/sw/rxe/rxe_pool.h
drivers/infiniband/sw/rxe/rxe_verbs.c