Ensure an Rx WQE is in memory before linking

Use a write memory barrier to ensure a WQE is written to memory
before linking it to the previous WQE.

Signed-off-by: Eli Cohen <[EMAIL PROTECTED]>
---
 src/qp.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/qp.c b/src/qp.c
index 23d7774..841e316 100644
--- a/src/qp.c
+++ b/src/qp.c
@@ -390,6 +390,7 @@ int mthca_tavor_post_recv(struct ibv_qp *ibqp, struct 
ibv_recv_wr *wr,
 
                ((struct mthca_next_seg *) prev_wqe)->nda_op =
                        htonl((ind << qp->rq.wqe_shift) | 1);
+               wmb();
                ((struct mthca_next_seg *) prev_wqe)->ee_nds =
                        htonl(MTHCA_NEXT_DBD | size);
 
-- 
1.5.3.8



_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to