[openib-general] Re: ib_uat kernel panic without async callback
Arlin Davis
ardavis at ichips.intel.com
Fri Jul 15 10:04:03 PDT 2005
Hal Rosenstock wrote:
>Hi Arlin,
>
>On Thu, 2005-07-14 at 19:23, Arlin Davis wrote:
>
>
>>>OK. I looked into this and it appears to me that the route is not copied
>>>back to userspace until the callback is made.
>>>
>>>-- Hal
>>>
>>>
>>>
>>>
>>ok, I will always get the callback for now and ignore a return of 1.
>>Is this the expected behavior because it does not match the documentation.
>>
>>
>
>I can look at changing the implementation but I'm curious about what
>specifically in the documentation you are referring to.
>
>
at.h
* The following asynchronous resolution function behavior is as follows:
* If the resolve operation can be fulfilled immediately, then the output
* structures are set and the number of filled structures is returned.
*
* If the resolve operation cannot by fulfilled immediately and
* an ib_at_completion structure is not provided,
* then the function immediately returns -EWOULDBLOCK.
*
* If ib_at_completion structure is provided and an asynchronous
* operation is started, the function immediately returns zero,
* and the request ID field (req_id) is set if the pointer is
* non NULL. This request ID may be used to cancel the operation,
* or to poll its status.
Your implementation is fine, as long as the correct return values are used
and the sync version works. I currently get returned a 1 but the ib_route
data is not filled in and the req_id == 0. I would expect a 0 returned
and a
valid req_id if the ib_route cannot be processed.
for ret = ib_at_route_by_ip( async_cb provided ), I read this as:
if ret > 0 then ib_route output data is written, resolve complete
if ret == 0 then req_id is written with valid id to cancel or poll
if ret < 0 error
Am I reading this right?
-arlin
>-- Hal
>
>
>
More information about the general
mailing list