[ofiwg] Can fi_getname return different addrlen on different EPs?

Dave Goodell (dgoodell) dgoodell at cisco.com
Wed Jun 17 07:01:17 PDT 2015


On Jun 17, 2015, at 6:19 AM, Petrov, Valentin <valentin.petrov at intel.com> wrote:

> Hi, All,
> I’ve got a question regarding fi_getname spec. It is said that fi_getname may return –FI_ETOOSMALL if the provided address storage is not enough and the addrlen in/out parameter will be updated with correct size. The question is: is there implicit demand for all endpoints to return the same addrlen?

Calls to fi_getinfo() returns a struct fi_info object that has three relevant fields: addr_format, src_addrlen, and dest_addrlen (oddly this implies the possibility of the src and destination addresses can be of different length but not different types...).  This info object is used as a parameter to both fi_domain() and fi_endpoint()/fi_passive_ep().  Presumably all the addresses that could be returned from fi_getname() should have a type that matches info->addr_format and a length that matches info->src_addrlen.

> It seems that it has to be the case since the call fi_av_insert takes pointer to the storage of several addresses and a single addrlen argument. Should this be directly noted in the man pages?
>  
> ps
> I know that this sounds weird that a lower level provider has variable address length but this happens (particularly, this is the case with Mellanox MXM library).

Does MXM multiple address formats that cannot be unified in some way?  Or is it more like having a "struct sockaddr" or "struct sockaddr_storage", where it can represent multiple address types but in a unified manner?

-Dave




More information about the ofiwg mailing list