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