summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rxe/rxe_verbs.h
diff options
context:
space:
mode:
authorBob Pearson <rpearsonhpe@gmail.com>2021-06-07 23:25:50 -0500
committerJason Gunthorpe <jgg@nvidia.com>2021-06-16 20:51:18 -0300
commit32a577b4c3a9d0b5d3e47ac47ffd50774a04f82a (patch)
tree4b5aa5d3879888514c4c1157d5653d5ef7a6137c /drivers/infiniband/sw/rxe/rxe_verbs.h
parentc1a411268a4b17ecdf271f0cefed53e10e9fa166 (diff)
downloadlinux-32a577b4c3a9d0b5d3e47ac47ffd50774a04f82a.tar.gz
linux-32a577b4c3a9d0b5d3e47ac47ffd50774a04f82a.tar.bz2
linux-32a577b4c3a9d0b5d3e47ac47ffd50774a04f82a.zip
RDMA/rxe: Add support for bind MW work requests
Add support for bind MW work requests from user space. Since rdma/core does not support bind mw in ib_send_wr there is no way to support bind mw in kernel space. Added bind_mw local operation in rxe_req.c. Added bind_mw WR operation in rxe_opcode.c. Added bind_mw WC in rxe_comp.c. Added additional fields to rxe_mw in rxe_verbs.h. Added rxe_do_dealloc_mw() subroutine to cleanup an mw when rxe_dealloc_mw is called. Added code to implement bind_mw operation in rxe_mw.c Link: https://lore.kernel.org/r/20210608042552.33275-8-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/rxe_verbs.h')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_verbs.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.h b/drivers/infiniband/sw/rxe/rxe_verbs.h
index 5effb12d22cc..3d0ab8b7804f 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.h
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.h
@@ -315,6 +315,8 @@ struct rxe_mr {
u32 num_map;
struct rxe_map **map;
+
+ atomic_t num_mw;
};
enum rxe_mw_state {
@@ -324,10 +326,15 @@ enum rxe_mw_state {
};
struct rxe_mw {
- struct ib_mw ibmw;
- struct rxe_pool_entry pelem;
- spinlock_t lock;
- enum rxe_mw_state state;
+ struct ib_mw ibmw;
+ struct rxe_pool_entry pelem;
+ spinlock_t lock;
+ enum rxe_mw_state state;
+ struct rxe_qp *qp; /* Type 2 only */
+ struct rxe_mr *mr;
+ int access;
+ u64 addr;
+ u64 length;
};
struct rxe_mc_grp {