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_pool.c | |
parent | 7410c2d0f419d992680855811718925e6f966c63 (diff) |
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_pool.c')
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_pool.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_pool.c b/drivers/infiniband/sw/rxe/rxe_pool.c index 307d8986e7c9..d24901f2af3f 100644 --- a/drivers/infiniband/sw/rxe/rxe_pool.c +++ b/drivers/infiniband/sw/rxe/rxe_pool.c @@ -8,8 +8,6 @@ #include "rxe_loc.h" /* info about object pools - * note that mr and mw share a single index space - * so that one can map an lkey to the correct type of object */ struct rxe_type_info rxe_type_info[RXE_NUM_TYPES] = { [RXE_TYPE_UC] = { @@ -56,18 +54,18 @@ struct rxe_type_info rxe_type_info[RXE_NUM_TYPES] = { }, [RXE_TYPE_MR] = { .name = "rxe-mr", - .size = sizeof(struct rxe_mem), - .elem_offset = offsetof(struct rxe_mem, pelem), - .cleanup = rxe_mem_cleanup, + .size = sizeof(struct rxe_mr), + .elem_offset = offsetof(struct rxe_mr, pelem), + .cleanup = rxe_mr_cleanup, .flags = RXE_POOL_INDEX, .max_index = RXE_MAX_MR_INDEX, .min_index = RXE_MIN_MR_INDEX, }, [RXE_TYPE_MW] = { .name = "rxe-mw", - .size = sizeof(struct rxe_mem), - .elem_offset = offsetof(struct rxe_mem, pelem), - .flags = RXE_POOL_INDEX, + .size = sizeof(struct rxe_mw), + .elem_offset = offsetof(struct rxe_mw, pelem), + .flags = RXE_POOL_INDEX | RXE_POOL_NO_ALLOC, .max_index = RXE_MAX_MW_INDEX, .min_index = RXE_MIN_MW_INDEX, }, |