RDMA/rxe: Rename IB_ACCESS_REMOTE
Rename IB_ACCESS_REMOTE to RXE_ACCESS_REMOTE and move to rxe_verbs.h as an enum instead of a #define. Shouldn't use IB_xxx for rxe symbols. Link: https://lore.kernel.org/r/20230530221334.89432-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
a519a612a7
commit
d11442c6bd
@ -45,14 +45,10 @@ int mr_check_range(struct rxe_mr *mr, u64 iova, size_t length)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define IB_ACCESS_REMOTE (IB_ACCESS_REMOTE_READ \
|
|
||||||
| IB_ACCESS_REMOTE_WRITE \
|
|
||||||
| IB_ACCESS_REMOTE_ATOMIC)
|
|
||||||
|
|
||||||
static void rxe_mr_init(int access, struct rxe_mr *mr)
|
static void rxe_mr_init(int access, struct rxe_mr *mr)
|
||||||
{
|
{
|
||||||
u32 lkey = mr->elem.index << 8 | rxe_get_next_key(-1);
|
u32 lkey = mr->elem.index << 8 | rxe_get_next_key(-1);
|
||||||
u32 rkey = (access & IB_ACCESS_REMOTE) ? lkey : 0;
|
u32 rkey = (access & RXE_ACCESS_REMOTE) ? lkey : 0;
|
||||||
|
|
||||||
/* set ibmr->l/rkey and also copy into private l/rkey
|
/* set ibmr->l/rkey and also copy into private l/rkey
|
||||||
* for user MRs these will always be the same
|
* for user MRs these will always be the same
|
||||||
@ -195,7 +191,7 @@ int rxe_mr_init_fast(int max_pages, struct rxe_mr *mr)
|
|||||||
int err;
|
int err;
|
||||||
|
|
||||||
/* always allow remote access for FMRs */
|
/* always allow remote access for FMRs */
|
||||||
rxe_mr_init(IB_ACCESS_REMOTE, mr);
|
rxe_mr_init(RXE_ACCESS_REMOTE, mr);
|
||||||
|
|
||||||
err = rxe_mr_alloc(mr, max_pages);
|
err = rxe_mr_alloc(mr, max_pages);
|
||||||
if (err)
|
if (err)
|
||||||
@ -715,7 +711,7 @@ int rxe_reg_fast_mr(struct rxe_qp *qp, struct rxe_send_wqe *wqe)
|
|||||||
|
|
||||||
mr->access = access;
|
mr->access = access;
|
||||||
mr->lkey = key;
|
mr->lkey = key;
|
||||||
mr->rkey = (access & IB_ACCESS_REMOTE) ? key : 0;
|
mr->rkey = (access & RXE_ACCESS_REMOTE) ? key : 0;
|
||||||
mr->ibmr.iova = wqe->wr.wr.reg.mr->iova;
|
mr->ibmr.iova = wqe->wr.wr.reg.mr->iova;
|
||||||
mr->state = RXE_MR_STATE_VALID;
|
mr->state = RXE_MR_STATE_VALID;
|
||||||
|
|
||||||
|
@ -253,6 +253,12 @@ struct rxe_qp {
|
|||||||
struct execute_work cleanup_work;
|
struct execute_work cleanup_work;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum rxe_access {
|
||||||
|
RXE_ACCESS_REMOTE = (IB_ACCESS_REMOTE_READ
|
||||||
|
| IB_ACCESS_REMOTE_WRITE
|
||||||
|
| IB_ACCESS_REMOTE_ATOMIC),
|
||||||
|
};
|
||||||
|
|
||||||
enum rxe_mr_state {
|
enum rxe_mr_state {
|
||||||
RXE_MR_STATE_INVALID,
|
RXE_MR_STATE_INVALID,
|
||||||
RXE_MR_STATE_FREE,
|
RXE_MR_STATE_FREE,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user