[ewg] [PATCH] perftest rdma_lat.c bug fix

Oren Meron orenmeron at mellanox.co.il
Mon Jan 14 04:27:29 PST 2008


	Perftest: fix bug rdma_lat.c. Messages up to 400 bytes will be
sent Inline.

	Signed-off-by: Oren Meron <orenmeron at dev.mellanox.co.il>

	--- a/rdma_lat.c
</git/?p=~orenmeron/perftest.git;a=blob;f=rdma_lat.c;h=7df0801b7b39c4482
539fd86051e99c8743dd469;hb=ebe29bbf864cba7c01cd98e71266dd556fccbc14>  
	+++ b/rdma_lat.c
</git/?p=~orenmeron/perftest.git;a=blob;f=rdma_lat.c;h=68c91208454bceaad
a39cbc1aca1688fae5c3f40;hb=9cb3794d20a9a8f9c8c62b4b3c03aedf49d01d61>  
	@@ -58,6
</git/?p=~orenmeron/perftest.git;a=blob;f=rdma_lat.c;h=7df0801b7b39c4482
539fd86051e99c8743dd469;hb=ebe29bbf864cba7c01cd98e71266dd556fccbc14>
+58,7
</git/?p=~orenmeron/perftest.git;a=blob;f=rdma_lat.c;h=68c91208454bceaad
a39cbc1aca1688fae5c3f40;hb=9cb3794d20a9a8f9c8c62b4b3c03aedf49d01d61>  @@

	#include "get_clock.h" 
	#define PINGPONG_RDMA_WRID 3 
	+#define MAX_INLINE 400 
	static int page_size; 
	static pid_t pid; 
	@@ -602,7
</git/?p=~orenmeron/perftest.git;a=blob;f=rdma_lat.c;h=7df0801b7b39c4482
539fd86051e99c8743dd469;hb=ebe29bbf864cba7c01cd98e71266dd556fccbc14>
+603,7
</git/?p=~orenmeron/perftest.git;a=blob;f=rdma_lat.c;h=68c91208454bceaad
a39cbc1aca1688fae5c3f40;hb=9cb3794d20a9a8f9c8c62b4b3c03aedf49d01d61>  @@
static struct pingpong_context *pp_init_ctx(void *ptr, struct pp_data
*data) 
	.max_recv_wr = 1, 
	.max_send_sge = 1, 
	.max_recv_sge = 1, 
	- .max_inline_data = 0 
	+ .max_inline_data = MAX_INLINE 
	}, 
	.qp_type = IBV_QPT_RC 
	}; 
	@@ -640,7
</git/?p=~orenmeron/perftest.git;a=blob;f=rdma_lat.c;h=7df0801b7b39c4482
539fd86051e99c8743dd469;hb=ebe29bbf864cba7c01cd98e71266dd556fccbc14>
+641,7
</git/?p=~orenmeron/perftest.git;a=blob;f=rdma_lat.c;h=68c91208454bceaad
a39cbc1aca1688fae5c3f40;hb=9cb3794d20a9a8f9c8c62b4b3c03aedf49d01d61>  @@
static struct pingpong_context *pp_init_ctx(void *ptr, struct pp_data
*data) 
	} 
	} 
	- return ctx; 
	+ return ctx; 
	} 
	static int pp_connect_ctx(struct pingpong_context *ctx, struct
pp_data *data) 
	@@ -1191,7
</git/?p=~orenmeron/perftest.git;a=blob;f=rdma_lat.c;h=7df0801b7b39c4482
539fd86051e99c8743dd469;hb=ebe29bbf864cba7c01cd98e71266dd556fccbc14>
+1192,11
</git/?p=~orenmeron/perftest.git;a=blob;f=rdma_lat.c;h=68c91208454bceaad
a39cbc1aca1688fae5c3f40;hb=9cb3794d20a9a8f9c8c62b4b3c03aedf49d01d61>  @@
int main(int argc, char *argv[]) 
	ctx->wr.sg_list = &ctx->list; 
	ctx->wr.num_sge = 1; 
	ctx->wr.opcode = IBV_WR_RDMA_WRITE; 
	- ctx->wr.send_flags = IBV_SEND_SIGNALED | IBV_SEND_INLINE; 
	+ if (ctx->size > MAX_INLINE || ctx->size == 0) { 
	+ ctx->wr.send_flags = IBV_SEND_SIGNALED; 
	+ } else { 
	+ ctx->wr.send_flags = IBV_SEND_SIGNALED | IBV_SEND_INLINE; 
	+ } 
	ctx->wr.next = NULL; 
	scnt = 0;


Oren   Meron
Performance

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ewg/attachments/20080114/899f4b9d/attachment.html>


More information about the ewg mailing list