[libfabric-users] address size

Zhang, Wei wzam at amazon.com
Fri Mar 3 07:11:08 PST 2023


You are right, the addrlen was returned by the fi_getname’s addrlen field.

Note that according to libfabric document, this field is always set, even when the buffer you provided is too small to hold the actual name.


From: Libfabric-users <libfabric-users-bounces at lists.openfabrics.org> on behalf of "Biddiscombe, John A." <john.biddiscombe at cscs.ch>
Date: Friday, March 3, 2023 at 3:04 AM
To: "libfabric-users at lists.openfabrics.org" <libfabric-users at lists.openfabrics.org>
Subject: RE: [EXTERNAL][libfabric-users] address size


CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.



Apologies. more googling shows it is returned by fi_getname in the addrlen field.



JB

________________________________
From: Biddiscombe, John A.
Sent: 03 March 2023 11:59
To: libfabric-users at lists.openfabrics.org
Subject: address size


when using native address formats, I have the following hardcoded into my stuff


#ifdef HAVE_LIBFABRIC_GNI
#define HAVE_LIBFABRIC_LOCALITY_SIZE 48
#endif

#ifdef HAVE_LIBFABRIC_CXI
#define HAVE_LIBFABRIC_LOCALITY_SIZE 4
#endif

#if defined(HAVE_LIBFABRIC_VERBS) || defined(HAVE_LIBFABRIC_TCP) ||                                \
    defined(HAVE_LIBFABRIC_SOCKETS) || defined(HAVE_LIBFABRIC_PSM2)
#define HAVE_LIBFABRIC_LOCALITY_SIZE 16
#define HAVE_LIBFABRIC_LOCALITY_SOCKADDR
#endif

I want to use amazon EFA, and have no idea how large an address struct is with FI_ADDR_EFA

What is the correct way to find this info so that addresses can be safely copied around when compiling against different providers?



Thanks



JB




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/libfabric-users/attachments/20230303/15bd4145/attachment.htm>


More information about the Libfabric-users mailing list