[Openib-windows] a documentation lack
Fabian Tillier
ftillier at silverstorm.com
Tue Sep 26 09:41:14 PDT 2006
Hi Leonid,
On 9/26/06, Leonid Keller <leonid at mellanox.co.il> wrote:
>
> Hi Fab,
> We've come across a bug in a user application, which made an ib_query
> request, but didn't return the mad by ib_put_mad, which in turn caused a
> stuck on ib_close_al.
> The source of the problem is IMO in that, that this requirement was not
> stated in the description of ib_query.
That's because ib_query doesn't actually provide the MAD to the user.
The MAD is provided via the query callback, which passes to the user a
ib_query_rec_t structure as its only parameter. The documentation for
the ib_query_rec_t structure states:
* NOTES
* A query result structure is returned to a client through their
* ib_pfn_query_cb_t routine to notify them of the results of a subnet
* administration query. If the query was successful or received an error
* from the subnet administrator, p_result_mad will reference a MAD element
* containing the results. The MAD referenced by p_result_mad is owned by
* the user and remains available even after their callback returns. Users
* must call ib_put_mad() to return the MAD element back to the access layer
* when they are done accessing the results.
*
- Fab
More information about the ofw
mailing list