[ofw] Problem in building opensm with the 6001 compiler
Hefty, Sean
sean.hefty at intel.com
Thu Sep 2 09:03:15 PDT 2010
> A pointer to the actual context of the request (a copy of the oriignal
> request structure) is attached as the p_madw-
> >context.ni_context.node_guid
Also see this comment:
/*
Provide MAD context such that the call back will know what to do.
We have to keep the entire request structure so we know the CB.
Since we can not rely on the client to keep it around until
the response - we duplicate it and will later dispose it (in CB).
To store on the MADW we cast it into what opensm has:
p_madw->context.ni_context.node_guid
*/
p_query_req_copy = malloc(sizeof(*p_query_req_copy));
if (!p_query_req_copy) {
OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 5511: "
"Unable to acquire memory for query copy\n");
osm_mad_pool_put(p_bind->p_mad_pool, p_madw);
status = IB_INSUFFICIENT_RESOURCES;
goto Exit;
}
*p_query_req_copy = *p_query_req;
p_madw->context.ni_context.node_guid =
(ib_net64_t) (long)p_query_req_copy;
The (long) cast should probably be (uintptr_t) when saving and restoring the pointer.
More information about the ofw
mailing list