From 40a677a9b93679431c3e74a60b02b09790180b43 Mon Sep 17 00:00:00 2001 From: Selvin Xavier Date: Wed, 28 Feb 2018 10:04:32 -0800 Subject: [PATCH] bnxt_re: Unconditionly fence non wire memory operations HW requires an unconditonal fence for all non-wire memory operations through SQ. This guarantees the completions of these memory operations Bug: 2675 Signed-off-by: Selvin Xavier --- ...onditionly-fence-non-wire-memory-ope.patch | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 linux-next-pending/0026-RDMA-bnxt_re-Unconditionly-fence-non-wire-memory-ope.patch diff --git a/linux-next-pending/0026-RDMA-bnxt_re-Unconditionly-fence-non-wire-memory-ope.patch b/linux-next-pending/0026-RDMA-bnxt_re-Unconditionly-fence-non-wire-memory-ope.patch new file mode 100644 index 0000000..60f18e8 --- /dev/null +++ b/linux-next-pending/0026-RDMA-bnxt_re-Unconditionly-fence-non-wire-memory-ope.patch @@ -0,0 +1,54 @@ +From 43b054f955c17647712c18bf0200c28f991bec54 Mon Sep 17 00:00:00 2001 +From: Devesh Sharma +Date: Fri, 23 Feb 2018 00:40:54 -0800 +Subject: [PATCH 7/8] RDMA/bnxt_re: Unconditionly fence non wire memory + operations + +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 +Signed-off-by: Selvin Xavier +--- + drivers/infiniband/hw/bnxt_re/ib_verbs.c | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c +index 29c62e4..e9709d4 100644 +--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c ++++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c +@@ -2063,10 +2063,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; + +@@ -2087,8 +2090,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; + +-- +1.8.3.1 + -- 2.41.0