Skip to content

Commit 6376e92

Browse files
shirazsaleemjgunthorpe
authored andcommitted
i40iw: Zero-out consumer key on allocate stag for FMR
If the application invalidates the MR before the FMR WR, HW parses the consumer key portion of the stag and returns an invalid stag key Asynchronous Event (AE) that tears down the QP. Fix this by zeroing-out the consumer key portion of the allocated stag returned to application for FMR. Fixes: ee855d3b93f3 ("RDMA/i40iw: Add base memory management extensions") Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 23541b2 commit 6376e92

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/infiniband/hw/i40iw/i40iw_verbs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,6 +1637,7 @@ static struct ib_mr *i40iw_alloc_mr(struct ib_pd *pd,
16371637
err_code = -EOVERFLOW;
16381638
goto err;
16391639
}
1640+
stag &= ~I40IW_CQPSQ_STAG_KEY_MASK;
16401641
iwmr->stag = stag;
16411642
iwmr->ibmr.rkey = stag;
16421643
iwmr->ibmr.lkey = stag;

0 commit comments

Comments
 (0)