[ewg] [PATCH] libibverbs: Add valgrind support to XRC verbs

Dotan Barak dotanb at dev.mellanox.co.il
Thu Mar 27 06:27:05 PDT 2008


Add valgrind support to XRC verbs.

Signed-off-by: Dotan Barak <dotanb at dev.mellanox.co.il>


Index: ofa_1_3_dev_user/src/userspace/libibverbs/src/cmd.c
===================================================================
--- ofa_1_3_dev_user.orig/src/userspace/libibverbs/src/cmd.c	2008-03-16 17:22:47.000000000 +0200
+++ ofa_1_3_dev_user/src/userspace/libibverbs/src/cmd.c	2008-03-27 15:11:46.000000000 +0200
@@ -853,6 +853,8 @@
 	    sizeof cmd)
 		return errno;
 
+	VALGRIND_MAKE_MEM_DEFINED(&resp, sizeof resp);
+
 	*xrc_rcv_qpn = resp.qpn;
 
 	return 0;
@@ -1352,6 +1354,8 @@
 	if (write(context->cmd_fd, &cmd, sizeof cmd) != sizeof cmd)
 		return errno;
 
+	VALGRIND_MAKE_MEM_DEFINED(resp, resp_size);
+
 	d->handle = resp->xrcd_handle;
 
 	return 0;



More information about the ewg mailing list