config root man

Current Path : /usr/src/contrib/ofed/libmlx4/fixes/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/src/contrib/ofed/libmlx4/fixes/post_rcv_end_of_sg.patch

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;

Man Man