[ofiwg] Resource Management RX CQ and address vectors

Hefty, Sean sean.hefty at intel.com
Wed Apr 14 10:22:05 PDT 2021

> I'm working with Mehdi Bendahhou (Atos) on a new provider.
> We have a few questions about the API specification.


> First, we were wondering how to deal with the MULTI_RECV option when
> checking overruns of the RX CQ.
> When fi_recv is called with this option we cannot know how many messages
> will be received and thus how many completions may result of this operation.
> If resource management is enabled, documentation states that the
> provider must return -FI_EAGAIN if an operation could result in CQ overruns.
> Is there a specific case to apply with the MULTI_RECV option ? If not,
> what should we do in this situation ?

This probably needs to be handled as part of flow control, to back off the sender if handling the receive would result in CQ overflow.  In the current implementations that I'm aware of that handle MULTI_RECV, CQ overflow is handled.  The overflow entries are queued in separate location.  For example, the util_cq code will handle this.

We can discuss if the man pages need to be updated exclude multi-recv from resource management requirements.

> Second, we are unsure about the state of an address vector during the
> execution of an application.
> Are address vectors static as soon as the endpoint is enabled or can
> they change dynamically ?

They can change dynamically, and some applications do this (fabtest for one).  But ultimately, this comes down to what your hardware can do and its target applications.  If needed, you can document this restriction.  I know there are environments where the implementation ends up using a static address vector, possibly pre-loaded before the app starts and shared between processes.

> Last, in a connectionless endpoint, is it required for a receiving
> application to have the sender address in its address vector if the
> fi_recv is posted with a src_addr to FI_ADDR_UNSPEC and/or
> FI_DIRECTED_RECV is disabled ?

No, the receiver does not have to have the sender's address in its AV.  Unidirectional transfers are supported.  The use of an out of band, separate communication library, should not be required.

> If this helps to answer the last two questions, we are trying to
> determine if at any given point an endpoint is able to retrieve a list
> of all address/endpoints it is communicating with (both in emission and
> reception).

It's not required from an API perspective.

FWIW, the util providers (rxm, rxd) handle this by maintaining a map between addresses in the local AV, versus those peers that its communicating with.  It's possible for the AV to contains addresses where remote communication has not (yet) be setup.  Likewise, the endpoint may communicate with peers that are not in the local AV.

- Sean

More information about the ofiwg mailing list