]> git.openfabrics.org - compat-rdma/compat-rdma.git/commitdiff
bnxt_re: Unconditionly fence non wire memory operations
authorSelvin Xavier <selvin.xavier@broadcom.com>
Wed, 28 Feb 2018 18:04:32 +0000 (10:04 -0800)
committerSelvin Xavier <selvin.xavier@broadcom.com>
Wed, 28 Feb 2018 18:57:43 +0000 (10:57 -0800)
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 <selvin.xavier@broadcom.com>
linux-next-pending/0026-RDMA-bnxt_re-Unconditionly-fence-non-wire-memory-ope.patch [new file with mode: 0644]

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 (file)
index 0000000..60f18e8
--- /dev/null
@@ -0,0 +1,54 @@
+From 43b054f955c17647712c18bf0200c28f991bec54 Mon Sep 17 00:00:00 2001
+From: Devesh Sharma <devesh.sharma@broadcom.com>
+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 <devesh.sharma@broadcom.com>
+Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
+---
+ 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
+