[ofiwg] Man pages question

Sur, Sayantan sayantan.sur at intel.com
Thu Aug 13 09:50:37 PDT 2015


>
>
>
>
>> 2.       What is the successful return code for fi_cancel and what
>>should
>> be returned in the case the cancel fails. I assume for the successful
>> cancel it is 0 (all the codes use it) but it is not stated in man pages
>> while there is a special errcode FI_ECANCELED in the fi_errno.
>
>Cancel is an asynchronous operation, which keeps it consistent with the
>rest of the API.  A return value of 0 indicates that the cancel request
>was started.  A non-zero return value indicates an immediate failure.
>The error code FI_ECANCELED is associated with the original request and
>used to indicate that it was canceled before it could successfully
>complete.
>
>Basically, after calling fi_cancel(), you must check the completion data
>of the canceled request to see if it was canceled, or if it completed
>successfully or had some other error before the cancel occurred.  A
>cancel operation is a racy mess.


Is the operation like below?

Application posts a cancel op, that is then enqueued. 0 indicates
successful enqueue, non-zero is failure. When the cancel op is completed,
an entry is placed in the error queue with  fi_cq_err_entry::err_code =
FI_ECANCELED. In addition, fi_cq_read() should return -FI_EVAIL so that
the app knows it has to poll the error queue.

Thanks,
Sayantan.


>
>- Sean
>_______________________________________________
>ofiwg mailing list
>ofiwg at lists.openfabrics.org
>http://lists.openfabrics.org/mailman/listinfo/ofiwg



More information about the ofiwg mailing list