aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rxe
diff options
context:
space:
mode:
authorBob Pearson <rpearsonhpe@gmail.com>2021-10-07 15:40:50 -0500
committerJason Gunthorpe <jgg@nvidia.com>2021-10-12 13:25:26 -0300
commit4da698eabf0f7c1c1806670d3fd3895512fdf43b (patch)
tree4d387f838593c159f4d562c1575a6c0908a82d3b /drivers/infiniband/sw/rxe
parentRDMA/rxe: Create AH index and return to user space (diff)
downloadlinux-dev-4da698eabf0f7c1c1806670d3fd3895512fdf43b.tar.xz
linux-dev-4da698eabf0f7c1c1806670d3fd3895512fdf43b.zip
RDMA/rxe: Replace ah->pd by ah->ibah.pd
The pd field in struct rxe_ah is redundant with the pd field in the rdma-core's ib_ah. Eliminate the pd field in rxe_ah and add an inline to extract the pd from the ibah field. Link: https://lore.kernel.org/r/20211007204051.10086-5-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')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_verbs.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.h b/drivers/infiniband/sw/rxe/rxe_verbs.h
index c56fae23b6a9..35e041450090 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.h
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.h
@@ -46,7 +46,6 @@ struct rxe_pd {
struct rxe_ah {
struct ib_ah ibah;
struct rxe_pool_entry pelem;
- struct rxe_pd *pd;
struct rxe_av av;
bool is_user;
int ah_num;
@@ -468,6 +467,11 @@ static inline struct rxe_mw *to_rmw(struct ib_mw *mw)
return mw ? container_of(mw, struct rxe_mw, ibmw) : NULL;
}
+static inline struct rxe_pd *rxe_ah_pd(struct rxe_ah *ah)
+{
+ return to_rpd(ah->ibah.pd);
+}
+
static inline struct rxe_pd *mr_pd(struct rxe_mr *mr)
{
return to_rpd(mr->ibmr.pd);