]> git.openfabrics.org - ~shefty/libmlx4.git/commitdiff
Fix inline sends with num_sge > 1
authorGleb Natapov <glebn@voltaire.com>
Tue, 24 Jul 2007 12:14:40 +0000 (15:14 +0300)
committerRoland Dreier <rolandd@cisco.com>
Sat, 28 Jul 2007 04:34:46 +0000 (21:34 -0700)
A work request with IBV_SEND_INLINE set and more than one gather entry
does not have its data copied into the WQE correctly, because the
offset is not updated properly.  Add the missing update of off when a
gather entry does not fill an inline segment exactly.

Signed-off-by: Gleb Natapov <glebn@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
src/qp.c

index 66ee309f0f7e704036f8ca195876660b6e9bc472..83a4fd4821bb832d72215d05b5f243daac8653b9 100644 (file)
--- a/src/qp.c
+++ b/src/qp.c
@@ -288,6 +288,7 @@ int mlx4_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
                                memcpy(wqe, addr, len);
                                wqe += len;
                                seg_len += len;
+                               off += len;
                        }
 
                        if (seg_len) {