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 <[email protected]>
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 <[email protected]>
---
 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

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to