RDMA/rxe: Extend rxe_resp.c to support xrc qps
Subsystems (2)
PATCH 13/13 RDMA/rxe: Extend rxe_resp.c to support xrc qps
Extend code in rxe_resp.c to support xrc qp types.
Signed-off-by Bob Pearson <[email protected]>
--- drivers/infiniband/sw/rxe/rxe_loc.h | 3 +- drivers/infiniband/sw/rxe/rxe_mw.c | 14 +-- drivers/infiniband/sw/rxe/rxe_resp.c | 161 +++++++++++++++++++++------ 3 files changed, 138 insertions(+), 40 deletions(-)
drivers/infiniband/sw/rxe/rxe_loc.h +2 -1
@@ -87,7 +87,8 @@ int rxe_alloc_mw(struct ib_mw *ibmw, struct ib_udata *udata);int rxe_dealloc_mw (struct ib_mw *ibmw);int rxe_bind_mw (struct rxe_qp *qp,struct rxe_send_wqe *wqe);int rxe_invalidate_mw (struct rxe_qp *qp,u32 rkey); -struct rxe_mw *rxe_lookup_mw (struct rxe_qp *qp,int access,u32 rkey); +struct rxe_mw *rxe_lookup_mw (struct rxe_pd *pd,struct rxe_qp *qp, +int access,u32 rkey);void rxe_mw_cleanup (struct rxe_pool_elem *elem);/* rxe_net.c */
drivers/infiniband/sw/rxe/rxe_mw.c +7 -7
@@ -280,10 +280,10 @@ int rxe_invalidate_mw(struct rxe_qp *qp, u32 rkey)return ret; } -struct rxe_mw *rxe_lookup_mw (struct rxe_qp *qp,int access,u32 rkey) +struct rxe_mw *rxe_lookup_mw (struct rxe_pd *pd,struct rxe_qp *qp, +int access,u32 rkey) {struct rxe_dev *rxe =to_rdev (qp->ibqp.device); -struct rxe_pd *pd =to_rpd (qp->ibqp.pd);struct rxe_mw *mw;int index = rkey >>8 ;
@@ -291,11 +291,11 @@ struct rxe_mw *rxe_lookup_mw(struct rxe_qp *qp, int access, u32 rkey)if (!mw)return NULL ; -if (unlikely ((mw->rkey != rkey) ||rxe_mw_pd (mw) != pd || - (mw->ibmw.type ==IB_MW_TYPE_2 && mw->qp != qp) || - (mw->length ==0 ) || - (access && !(access & mw->access)) || - mw->state !=RXE_MW_STATE_VALID )) { +if ((mw->rkey != rkey) ||rxe_mw_pd (mw) != pd || + (mw->ibmw.type ==IB_MW_TYPE_2 && + (mw->qp != qp ||qp_type (qp) ==IB_QPT_XRC_TGT )) || + (mw->length ==0 ) || (access && !(access & mw->access)) || + mw->state !=RXE_MW_STATE_VALID ) {rxe_put (mw);return NULL ; }
drivers/infiniband/sw/rxe/rxe_resp.c +129 -32
378 lines not on this page · raw message
Signature · 1 line
2.34.1