diff options
author | Bob Pearson <rpearsonhpe@gmail.com> | 2021-03-25 16:24:26 -0500 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-03-30 17:11:30 -0300 |
commit | 364e282c4fe7e24a5f32cd6e93e1056c6a6e3d31 (patch) | |
tree | 38d7b80c1e98434bb05bcaba0d3e671138d8c022 /drivers/infiniband/sw/rxe/rxe_req.c | |
parent | RDMA/efa: Use strscpy instead of strlcpy (diff) | |
download | linux-dev-364e282c4fe7e24a5f32cd6e93e1056c6a6e3d31.tar.xz linux-dev-364e282c4fe7e24a5f32cd6e93e1056c6a6e3d31.zip |
RDMA/rxe: Split MEM into MR and MW
In the original rxe implementation it was intended to use a common object
to represent MRs and MWs but they are different enough to separate these
into two objects.
This allows replacing the mem name with mr for MRs which is more
consistent with the style for the other objects and less likely to be
confusing. This is a long patch that mostly changes mem to mr where it
makes sense and adds a new rxe_mw struct.
Link: https://lore.kernel.org/r/20210325212425.2792-1-rpearson@hpe.com
Signed-off-by: Bob Pearson <rpearson@hpe.com>
Acked-by: Zhu Yanjun <zyjzyj2000@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_req.c')
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_req.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c index 889290793d75..3664cdae7e1f 100644 --- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -464,7 +464,7 @@ static int fill_packet(struct rxe_qp *qp, struct rxe_send_wqe *wqe, } else { err = copy_data(qp->pd, 0, &wqe->dma, payload_addr(pkt), paylen, - from_mem_obj, + from_mr_obj, &crc); if (err) return err; @@ -596,7 +596,7 @@ next_wqe: if (wqe->mask & WR_REG_MASK) { if (wqe->wr.opcode == IB_WR_LOCAL_INV) { struct rxe_dev *rxe = to_rdev(qp->ibqp.device); - struct rxe_mem *rmr; + struct rxe_mr *rmr; rmr = rxe_pool_get_index(&rxe->mr_pool, wqe->wr.ex.invalidate_rkey >> 8); @@ -607,14 +607,14 @@ next_wqe: wqe->status = IB_WC_MW_BIND_ERR; goto exit; } - rmr->state = RXE_MEM_STATE_FREE; + rmr->state = RXE_MR_STATE_FREE; rxe_drop_ref(rmr); wqe->state = wqe_state_done; wqe->status = IB_WC_SUCCESS; } else if (wqe->wr.opcode == IB_WR_REG_MR) { - struct rxe_mem *rmr = to_rmr(wqe->wr.wr.reg.mr); + struct rxe_mr *rmr = to_rmr(wqe->wr.wr.reg.mr); - rmr->state = RXE_MEM_STATE_VALID; + rmr->state = RXE_MR_STATE_VALID; rmr->access = wqe->wr.wr.reg.access; rmr->ibmr.lkey = wqe->wr.wr.reg.key; rmr->ibmr.rkey = wqe->wr.wr.reg.key; |