[ofw] Patch: Don't use inline for RDMA reads

Tzachi Dar tzachid at mellanox.co.il
Tue Mar 9 03:07:28 PST 2010


In order to allow the ndrping to work also with RDMA reads, the following fix is needed.

This patch should also be applied to the branch.

Thanks
Tzachi

Index: hw/mlx4/user/hca/cq.c
===================================================================
--- hw/mlx4/user/hca/cq.c (revision 5646)
+++ hw/mlx4/user/hca/cq.c (working copy)
@@ -130,7 +130,7 @@
   printf(PFX "local QP operation err "
          "(QPN %06x, WQE index %x, vendor syndrome %02x, "
          "opcode = %02x)\n",
-         htonl(cqe->my_qpn), htonl(cqe->wqe_index),
+         htonl(cqe->my_qpn), htons(cqe->wqe_index),
          cqe->vendor_err,
          cqe->owner_sr_opcode & ~MLX4_CQE_OWNER_MASK);

Index: ulp/nd/user/NdEndpoint.cpp
===================================================================
--- ulp/nd/user/NdEndpoint.cpp (revision 5646)
+++ ulp/nd/user/NdEndpoint.cpp (working copy)
@@ -686,10 +686,10 @@
     wr.p_next = NULL;
     wr.wr_id = (ULONG_PTR)pResult;
     wr.wr_type = Type;
-    if ( pResult->BytesTransferred <= m_MaxInlineSize )
-     wr.send_opt = IB_SEND_OPT_INLINE;
- else
-     wr.send_opt = 0;
+    if ( (pResult->BytesTransferred <= m_MaxInlineSize) && Type != WR_RDMA_READ)
+        wr.send_opt = IB_SEND_OPT_INLINE;
+    else
+        wr.send_opt = 0;
     if( !(Flags & ND_OP_FLAG_SILENT_SUCCESS) )
         wr.send_opt |= IB_SEND_OPT_SIGNALED;
     if( Flags & ND_OP_FLAG_READ_FENCE )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20100309/4a8ea145/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inline.diff
Type: application/octet-stream
Size: 1278 bytes
Desc: inline.diff
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20100309/4a8ea145/attachment.obj>


More information about the ofw mailing list