[ofiwg] Man pages question

Petrov, Valentin valentin.petrov at intel.com
Fri Aug 14 00:01:55 PDT 2015

Ok, but when you say that ret==0 means "cancel request was started" does it imply that the request WILL be successfully canceled later on? Or the failure still may happen?
Valentin Petrov

-----Original Message-----
From: Hefty, Sean 
Sent: Thursday, August 13, 2015 7:27 PM
To: Petrov, Valentin; ofiwg at lists.openfabrics.org
Subject: RE: Man pages question

> 1.       In the atomics section there is a description of "count" as
> "Count of vectored data entries". It is little bit vague for me 
> whether the value is the "byte len" or "number of fi_datatype elements 
> stored in buf. Having looked into the PSM provider code I understood 
> that it is  the number of elements. Should be stated more clear?

The PSM provider is correct.  We can clarify the man page.

> 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.

- Sean

Closed Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park, 
17 Krylatskaya Str., Bldg 4, Moscow 121614, 
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

More information about the ofiwg mailing list