[openib-general] [PATCH] libmthca: fix posting atomic work requests
Michael S. Tsirkin
mst at mellanox.co.il
Wed Nov 9 04:17:39 PST 2005
Same thing as previous patch for userspace.
---
Fix posting atomic work requests in libmthca.
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: src/userspace/libmthca/src/qp.c
===================================================================
--- src/userspace/libmthca/src/qp.c (revision 3994)
+++ src/userspace/libmthca/src/qp.c (working copy)
@@ -147,8 +147,8 @@ int mthca_tavor_post_send(struct ibv_qp
}
wqe += sizeof (struct mthca_atomic_seg);
- size += sizeof (struct mthca_raddr_seg) / 16 +
- sizeof (struct mthca_atomic_seg);
+ size += (sizeof (struct mthca_raddr_seg) +
+ sizeof (struct mthca_atomic_seg)) / 16;
break;
case IBV_WR_RDMA_WRITE:
@@ -448,8 +448,8 @@ int mthca_arbel_post_send(struct ibv_qp
}
wqe += sizeof (struct mthca_atomic_seg);
- size += sizeof (struct mthca_raddr_seg) / 16 +
- sizeof (struct mthca_atomic_seg);
+ size += (sizeof (struct mthca_raddr_seg) +
+ sizeof (struct mthca_atomic_seg)) /16;
break;
case IBV_WR_RDMA_WRITE:
--
MST
More information about the general
mailing list