30 lines
969 B
Diff
30 lines
969 B
Diff
As in libmthca, need to initialize SRQ WQE scatter entries to the
|
|
invalid lkey at work queue creation time.
|
|
|
|
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
|
|
|
|
Index: libmlx4/src/srq.c
|
|
===================================================================
|
|
--- libmlx4.orig/src/srq.c 2009-12-09 15:08:52.000000000 +0200
|
|
+++ libmlx4/src/srq.c 2009-12-09 18:44:32.000000000 +0200
|
|
@@ -128,6 +128,7 @@ int mlx4_alloc_srq_buf(struct ibv_pd *pd
|
|
struct mlx4_srq *srq)
|
|
{
|
|
struct mlx4_wqe_srq_next_seg *next;
|
|
+ struct mlx4_wqe_data_seg *scatter;
|
|
int size;
|
|
int buf_size;
|
|
int i;
|
|
@@ -160,6 +161,11 @@ int mlx4_alloc_srq_buf(struct ibv_pd *pd
|
|
for (i = 0; i < srq->max; ++i) {
|
|
next = get_wqe(srq, i);
|
|
next->next_wqe_index = htons((i + 1) & (srq->max - 1));
|
|
+
|
|
+ for (scatter = (void *) (next + 1);
|
|
+ (void *) scatter < (void *) next + (1 << srq->wqe_shift);
|
|
+ ++scatter)
|
|
+ scatter->lkey = htonl(MLX4_INVALID_LKEY);
|
|
}
|
|
|
|
srq->head = 0;
|