mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-29 04:09:39 +00:00
RDMA/bnxt_re: Unconditionly fence non wire memory operations
[ Upstream commit a45bc17b36
]
HW requires an unconditonal fence for all non-wire memory operations
through SQ. This guarantees the completions of these memory operations.
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b73bc820c4
commit
466199b440
1 changed files with 11 additions and 4 deletions
|
@ -1963,10 +1963,13 @@ static int bnxt_re_build_inv_wqe(struct ib_send_wr *wr,
|
|||
wqe->type = BNXT_QPLIB_SWQE_TYPE_LOCAL_INV;
|
||||
wqe->local_inv.inv_l_key = wr->ex.invalidate_rkey;
|
||||
|
||||
/* Need unconditional fence for local invalidate
|
||||
* opcode to work as expected.
|
||||
*/
|
||||
wqe->flags |= BNXT_QPLIB_SWQE_FLAGS_UC_FENCE;
|
||||
|
||||
if (wr->send_flags & IB_SEND_SIGNALED)
|
||||
wqe->flags |= BNXT_QPLIB_SWQE_FLAGS_SIGNAL_COMP;
|
||||
if (wr->send_flags & IB_SEND_FENCE)
|
||||
wqe->flags |= BNXT_QPLIB_SWQE_FLAGS_UC_FENCE;
|
||||
if (wr->send_flags & IB_SEND_SOLICITED)
|
||||
wqe->flags |= BNXT_QPLIB_SWQE_FLAGS_SOLICIT_EVENT;
|
||||
|
||||
|
@ -1987,8 +1990,12 @@ static int bnxt_re_build_reg_wqe(struct ib_reg_wr *wr,
|
|||
wqe->frmr.levels = qplib_frpl->hwq.level + 1;
|
||||
wqe->type = BNXT_QPLIB_SWQE_TYPE_REG_MR;
|
||||
|
||||
if (wr->wr.send_flags & IB_SEND_FENCE)
|
||||
wqe->flags |= BNXT_QPLIB_SWQE_FLAGS_UC_FENCE;
|
||||
/* Need unconditional fence for reg_mr
|
||||
* opcode to function as expected.
|
||||
*/
|
||||
|
||||
wqe->flags |= BNXT_QPLIB_SWQE_FLAGS_UC_FENCE;
|
||||
|
||||
if (wr->wr.send_flags & IB_SEND_SIGNALED)
|
||||
wqe->flags |= BNXT_QPLIB_SWQE_FLAGS_SIGNAL_COMP;
|
||||
|
||||
|
|
Loading…
Reference in a new issue