Skip to contentSkip to conversation

RDMA/rxe: Fix mw bind to allow any consumer key portion

PATCH Applied Bob Pearson 2 participants 2 messages Jul 14, 2022 – Jul 21, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/rxe: Fix mw bind to allow any consumer key portion

The current implementation of rxe_check_bind_mw() in rxe_mw.c is incorrect since it requires the new key portion provided by the mw consumer to be different than the previous key portion. This is not required by the IBA. This patch removes that test.

Fixes 32a577b4c3a9 ("Add support for bind MW work requests")
---
 drivers/infiniband/sw/rxe/rxe_mw.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/infiniband/sw/rxe/rxe_mw.c +0 -7
index bb6a1edaaee8..cfd75c48e4b0 100644
@@ -50,8 +50,6 @@ int rxe_dealloc_mw(struct ib_mw *ibmw)
 static int rxe_check_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe,
 			 struct rxe_mw *mw, struct rxe_mr *mr)
 {
-	u32 key = wqe->wr.wr.mw.rkey & 0xff;
-
 	if (mw->ibmw.type == IB_MW_TYPE_1) {
 		if (unlikely(mw->state != RXE_MW_STATE_VALID)) {
 			pr_err_once(
@@ -89,11 +87,6 @@ static int rxe_check_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe,
 		}
 	}
 
-	if (unlikely(key == (mw->rkey & 0xff))) {
-		pr_err_once("attempt to bind MW with same key\n");
-		return -EINVAL;
-	}
-
 	/* remaining checks only apply to a nonzero MR */
 	if (!mr)
 		return 0;

base-commit: 2635d2a8d4664b665bc12e15eee88e9b1b40ae7b

Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw
Quoted 11 lines · Bob Pearson

The current implementation of rxe_check_bind_mw() in rxe_mw.c is incorrect since it requires the new key portion provided by the mw consumer to be different than the previous key portion. This is not required by the IBA. This patch removes that test.

Fixes 32a577b4c3a9 ("Add support for bind MW work requests")
---
 drivers/infiniband/sw/rxe/rxe_mw.c | 7 -------
 1 file changed, 7 deletions(-)

Applied to for-next, thanks

Jason