Skip to content

Commit 1374901

Browse files
hz-chengrleon
authored andcommitted
RDMA/erdma: Using the key in FMR WR instead of MR structure
RDMA driver should get the MR key from FMR WR, not the MR structure passed in. Fixes: 1550557 ("RDMA/erdma: Add verbs implementation") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Cheng Xu <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
1 parent ef01622 commit 1374901

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/erdma/erdma_qp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ static int erdma_push_one_sqe(struct erdma_qp *qp, u16 *pi,
407407
to_erdma_access_flags(reg_wr(send_wr)->access);
408408
regmr_sge->addr = cpu_to_le64(mr->ibmr.iova);
409409
regmr_sge->length = cpu_to_le32(mr->ibmr.length);
410-
regmr_sge->stag = cpu_to_le32(mr->ibmr.lkey);
410+
regmr_sge->stag = cpu_to_le32(reg_wr(send_wr)->key);
411411
attrs = FIELD_PREP(ERDMA_SQE_MR_MODE_MASK, 0) |
412412
FIELD_PREP(ERDMA_SQE_MR_ACCESS_MASK, mr->access) |
413413
FIELD_PREP(ERDMA_SQE_MR_MTT_CNT_MASK,

0 commit comments

Comments
 (0)