Skip to contentSkip to conversation

libibmad/smp.c: Fix to smp_query_via for attribute data

PATCH Applied Hal Rosenstock 2 participants 2 messages Apr 5, 2011 – Apr 8, 2011 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 libibmad/smp.c: Fix to smp_query_via for attribute data

smp_query_via() does not allow setting the sent mad data. Change the data to be both in and out arguments.

---
Changes since v1:
Proper formatting

src/smp.c +1 -1
index 3ff58ce..2809ffe 100644
@@ -102,7 +102,7 @@ uint8_t *smp_query_via(void *rcvbuf, ib_portid_t * portid, unsigned attrid,
 	portid->sl = 0;
 	portid->qp = 0;
 
-	return mad_rpc(srcport, &rpc, portid, 0, rcvbuf);
+	return mad_rpc(srcport, &rpc, portid, rcvbuf, rcvbuf);
 }
 
 uint8_t *smp_query(void *rcvbuf, ib_portid_t * portid, unsigned attrid,

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 4D9B6C30.7000006-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org

Applied
#2 lore raw

I am a bit concerned about how this might affect callers of the function but I can't find anywhere that it would be an issue in infiniband-diags.

We will go with it and see if anything comes up.

Applied, thanks,
Ira

Quoted 27 lines · On Tue, 5 Apr 2011 12:23:28 -0700 Hal Rosenstock…

smp_query_via() does not allow setting the sent mad data. Change the data to be both in and out arguments.

---
Changes since v1:
Proper formatting

src/smp.c +1 -2
index 3ff58ce..2809ffe 100644
@@ -102,7 +102,7 @@ uint8_t *smp_query_via(void *rcvbuf, ib_portid_t * portid, unsigned attrid,
 	portid->sl = 0;
 	portid->qp = 0;
 
-	return mad_rpc(srcport, &rpc, portid, 0, rcvbuf);
+	return mad_rpc(srcport, &rpc, portid, rcvbuf, rcvbuf);
 }
 
 uint8_t *smp_query(void *rcvbuf, ib_portid_t * portid, unsigned attrid,
--

To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 9 lines
Ira Weiny
Math Programmer/Computer Scientist
Lawrence Livermore National Lab
925-423-8008
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html