Add support to IBV_SEND_FENCE in post_send.

Signed-off-by: Dotan Barak <[EMAIL PROTECTED]>
Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>

Index: last_stable/src/userspace/libmthca/src/qp.c
===================================================================
--- last_stable.orig/src/userspace/libmthca/src/qp.c    2006-02-26 
13:10:42.000000000 +0200
+++ last_stable/src/userspace/libmthca/src/qp.c 2006-02-26 13:11:54.000000000 
+0200
@@ -282,7 +282,9 @@ int mthca_tavor_post_send(struct ibv_qp 
                              mthca_opcode[wr->opcode]);
 
                ((struct mthca_next_seg *) prev_wqe)->ee_nds =
-                       htonl((size0 ? 0 : MTHCA_NEXT_DBD) | size);
+                       htonl((size0 ? 0 : MTHCA_NEXT_DBD) | size |
+                       ((wr->send_flags & IBV_SEND_FENCE) ?
+                        MTHCA_NEXT_FENCE : 0));
 
                if (!size0) {
                        size0 = size;
@@ -633,7 +634,9 @@ int mthca_arbel_post_send(struct ibv_qp 
                              mthca_opcode[wr->opcode]);
                mb();
                ((struct mthca_next_seg *) prev_wqe)->ee_nds =
-                       htonl(MTHCA_NEXT_DBD | size);
+                       htonl(MTHCA_NEXT_DBD | size |
+                             ((wr->send_flags & IBV_SEND_FENCE) ?
+                                      MTHCA_NEXT_FENCE : 0));
 
                if (!size0) {
                        size0 = size;

-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

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

Reply via email to