[ofa-general] [PATCH] libibmad: Ensure the proper length is passed into umad_recv on each call
Ira Weiny
weiny2 at llnl.gov
Tue Jul 21 15:50:00 PDT 2009
Sasha,
I found that once in a while umad_recv returns a trid from a previously
timedout request and causes _do_madrpc to loop around. If this occurs the
length value has changed from the previous call and results -EINVAL from the
kernel. This fixes the problem.
Ira
From: Ira Weiny <weiny2 at hyperion1.llnl.gov>
Date: Tue, 21 Jul 2009 15:24:49 -0700
Subject: [PATCH] libibmad: Ensure the proper length is passed into umad_recv on each call
Signed-off-by: Ira Weiny <weiny2 at hyperion1.llnl.gov>
---
libibmad/src/rpc.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libibmad/src/rpc.c b/libibmad/src/rpc.c
index efea1d3..0b989da 100644
--- a/libibmad/src/rpc.c
+++ b/libibmad/src/rpc.c
@@ -158,6 +158,7 @@ _do_madrpc(int port_id, void *sndbuf, void *rcvbuf, int agentid, int len,
/* Use same timeout on receive side just in case */
/* send packet is lost somewhere. */
do {
+ length = len;
if (umad_recv(port_id, rcvbuf, &length, timeout) < 0) {
IBWARN("recv failed: %m");
return -1;
--
1.5.4.5
More information about the general
mailing list