[ofa-general] [PATCH] libibmad: clear packet buffer correctly before formating and sending

Ira Weiny weiny2 at llnl.gov
Tue Aug 11 10:04:28 PDT 2009


I found this bug a while back but forgot to submit a patch.

I don't think this will affect the issues Mr. Miller was having with BM, as I believe the BM stuff he was trying all expected a response (thereby calling mad_rpc instead).  But it could be worth a try.

Ira


From: Ira Weiny <weiny2 at llnl.gov>
Date: Tue, 11 Aug 2009 10:00:25 -0700
Subject: [PATCH] libibmad: clear packet buffer correctly before formating and sending


Signed-off-by: Ira Weiny <weiny2 at llnl.gov>
---
 libibmad/src/serv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libibmad/src/serv.c b/libibmad/src/serv.c
index fad1e5b..4d557c2 100644
--- a/libibmad/src/serv.c
+++ b/libibmad/src/serv.c
@@ -59,7 +59,7 @@ int mad_send_via(ib_rpc_t * rpc, ib_portid_t * dport, ib_rmpp_hdr_t * rmpp,
 	uint8_t pktbuf[1024];
 	void *umad = pktbuf;
 
-	memset(pktbuf, 0, umad_size());
+	memset(pktbuf, 0, umad_size() + IB_MAD_SIZE);
 
 	DEBUG("rmpp %p data %p", rmpp, data);
 
-- 
1.5.4.5




More information about the general mailing list