@@ -347,6 +347,20 @@ struct rxe_mr {
struct rxe_map **map;
};
+enum rxe_mw_state {
+ RXE_MW_STATE_INVALID,
+ RXE_MW_STATE_FREE,
+ RXE_MW_STATE_VALID,
+};
+
+struct rxe_mw {
+ struct rxe_pool_entry pelem;
+ struct ib_mw ibmw;
+ struct rxe_qp *qp; /* type 2B only */
+ struct rxe_mem *mr;
+ enum rxe_mw_state state;
+};
+
struct rxe_mc_grp {
struct rxe_pool_entry pelem;
spinlock_t mcg_lock; /* guard group */
@@ -457,10 +471,10 @@ static inline struct rxe_mr *to_rmr(struct ib_mr *mr)
return mr ? container_of(mr, struct rxe_mr, ibmr) : NULL;
}
-//static inline struct rxe_mw *to_rmw(struct ib_mw *mw)
-//{
- //return mw ? container_of(mw, struct rxe_mw, ibmw) : NULL;
-//}
+static inline struct rxe_mw *to_rmw(struct ib_mw *mw)
+{
+ return mw ? container_of(mw, struct rxe_mw, ibmw) : NULL;
+}
int rxe_register_device(struct rxe_dev *rxe, const char *ibdev_name);
Created the new basic rxe_mw structure. Signed-off-by: Bob Pearson <rpearson@hpe.com> --- drivers/infiniband/sw/rxe/rxe_verbs.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-)