---
name: "fi_getinfo"
section: "3"
platform: "linux"
package: "libfabric"
version: "2.7.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/fi_getinfo"
---

# fi\_getinfo(3)

Obtain / free fabric interface information fi\_allocinfo, fi\_dupinfo - Allocate / duplicate an fi\_info structure

## NAME

fi\_getinfo, fi\_freeinfo - Obtain / free fabric interface information

fi\_allocinfo, fi\_dupinfo - Allocate / duplicate an fi\_info structure

## SYNOPSIS

-

  ```
  #include <rdma/fabric.h>
  int fi_getinfo(int version, const char *node, const char *service,
          uint64_t flags, const struct fi_info *hints, struct fi_info **info);
  void fi_freeinfo(struct fi_info *info);
  struct fi_info *fi_allocinfo(void);
  struct fi_info *fi_dupinfo(const struct fi_info *info);
  ```

## ARGUMENTS

- *version*

  Interface version requested by application.

- *node*

  Optional, name or fabric address to resolve.

- *service*

  Optional, service name or port number of address.

- *flags*

  Operation flags for the fi\_getinfo call.

- *hints*

  Reference to an fi\_info structure that specifies criteria for selecting the returned fabric information. The fi\_info hints structure must be allocated using either fi\_allocinfo() or fi\_dupinfo().

- *info*

  A pointer to a linked list of fi\_info structures containing response information.

## DESCRIPTION

The fi\_getinfo() call is used to discover what communication features are available in the system, as well as how they might best be used by an application. The call is loosely modeled on getaddrinfo(). fi\_getinfo() permits an application to exchange information between an application and the libfabric providers regarding its required set of communication. It provides the ability to access complex network details, balanced between being expressive but also simple to use.

fi\_getinfo returns information about available fabric services for reaching a specified node or service, subject to any provided hints. Callers may specify NULL for node, service, and hints in order to retrieve information about what providers are available and their optimal usage models. If no matching fabric information is available, info will be set to NULL and the call will return -FI\_ENODATA.

Based on the input hints, node, and service parameters, a list of fabric domains and endpoints will be returned. Each fi\_info structure will describe an endpoint that meets the application’s specified communication criteria. Each endpoint will be associated with a domain. Applications can restrict the number of returned endpoints by including additional criteria in their search hints. Relaxing or eliminating input hints will increase the number and type of endpoints that are available. Providers that return multiple endpoints to a single fi\_getinfo call should return the endpoints that are highest performing first. Providers may indicate that an endpoint and domain can support additional capabilities than those requested by the user only if such support will not adversely affect application performance or security.

The version parameter is used by the application to request the desired version of the interfaces. The version determines the format of all data structures used by any of the fabric interfaces. Applications should use the FI\_VERSION(major, minor) macro to indicate the version, with hard-coded integer values for the major and minor values. The FI\_MAJOR\_VERSION and FI\_MINOR\_VERSION enum values defined in fabric.h specify the latest version of the installed library. However, it is recommended that the integer values for FI\_MAJOR\_VERSION and FI\_MINOR\_VERSION be used, rather than referencing the enum types in order to ensure compatibility with future versions of the library. This protects against the application being built from source against a newer version of the library that introduces new fields to data structures, which would not be initialized by the application.

Node, service, or hints may be provided, with any combination being supported. If node is provided, fi\_getinfo will attempt to resolve the fabric address to the given node. If node is not given, fi\_getinfo will attempt to resolve the fabric addressing information based on the provided hints. Node is commonly used to provide a network address (such as an IP address) or hostname. Service is usually associated with a transport address (such as a TCP port number). Node and service parameters may be mapped by providers to native fabric addresses. Applications may also pass in an FI\_ADDR\_STR formatted address (see format details below) as the node parameter. In such cases, the service parameter must be NULL.

The hints parameter, if provided, may be used to limit the resulting output as indicated below. As a general rule, specifying a non-zero value for input hints indicates that a provider must support the requested value or fail the operation with -FI\_ENODATA. With the exception of mode bits, hints that are set to zero are treated as a wildcard. A zeroed hint value results in providers either returning a default value or a value that works best for their implementation. Mode bits that are set to zero indicate the application does not support any modes.

The caller must call fi\_freeinfo to release fi\_info structures returned by this call.

The fi\_allocinfo call will allocate and zero an fi\_info structure and all related substructures. The fi\_dupinfo will duplicate a single fi\_info structure and all the substructures within it.

## FI\_INFO

-

  ```
  struct fi_info {
      struct fi_info        *next;
      uint64_t              caps;
      uint64_t              mode;
      uint32_t              addr_format;
      size_t                src_addrlen;
      size_t                dest_addrlen;
      void                  *src_addr;
      void                  *dest_addr;
      fid_t                 handle;
      struct fi_tx_attr     *tx_attr;
      struct fi_rx_attr     *rx_attr;
      struct fi_ep_attr     *ep_attr;
      struct fi_domain_attr *domain_attr;
      struct fi_fabric_attr *fabric_attr;
      struct fid_nic        *nic;
  };
  ```

- *next*

  Pointer to the next fi\_info structure in the list. Will be NULL if no more structures exist.

- *caps - fabric interface capabilities*

  If specified, indicates the desired capabilities of the fabric interfaces. Supported capabilities are listed in the *Capabilities* section below.

- *mode*

  Operational modes supported by the application. See the *Mode* section below.

- *addr\_format - address format*

  If specified, indicates the format of addresses referenced by the fabric interfaces and data structures. Supported formats are listed in the *Addressing formats* section below.

- *src\_addrlen - source address length*

  Indicates the length of the source address. This value must be \> 0 if *src\_addr* is non-NULL. This field will be ignored in hints if FI\_SOURCE flag is set, or *src\_addr* is NULL.

- *dest\_addrlen - destination address length*

  Indicates the length of the destination address. This value must be \> 0 if *dest\_addr* is non-NULL. This field will be ignored in hints unless the node and service parameters are NULL or FI\_SOURCE flag is set, or if *dst\_addr* is NULL.

- *src\_addr - source address*

  If specified, indicates the source address. This field will be ignored in hints if FI\_SOURCE flag is set. On output a provider shall return an address that corresponds to the indicated fabric, domain, node, and/or service fields. The format of the address is indicated by the returned *addr\_format* field. Note that any returned address is only used when opening a local endpoint. The address is not guaranteed to be usable by a peer process.

- *dest\_addr - destination address*

  If specified, indicates the destination address. This field will be ignored in hints unless the node and service parameters are NULL or FI\_SOURCE flag is set. If FI\_SOURCE is not specified, on output a provider shall return an address the corresponds to the indicated node and/or service fields, relative to the fabric and domain. Note that any returned address is only usable locally.

- *handle - provider context handle*

  The use of this field is operation specific. If hints-\>handle is set to struct fid\_pep, the hints-\>handle will be copied to info-\>handle on output from fi\_getinfo. Other values of hints-\>handle will be handled in a provider specific manner. The fi\_info::handle field is also used by fi\_endpoint() and fi\_reject() calls when processing connection requests or to inherit another endpoint’s attributes. See [fi\_eq(3)](/fi_eq/3.md), [fi\_reject(3)](/fi_reject/3.md), and [fi\_endpoint(3)](/fi_endpoint/3.md). The info-\>handle field will be ignored by fi\_dupinfo and fi\_freeinfo.

- *tx\_attr - transmit context attributes*

  Optionally supplied transmit context attributes. Transmit context attributes may be specified and returned as part of fi\_getinfo. When provided as hints, requested values of struct fi\_tx\_ctx\_attr should be set. On output, the actual transmit context attributes that can be provided will be returned. Output values will be greater than or equal to the requested input values.

- *rx\_attr - receive context attributes*

  Optionally supplied receive context attributes. Receive context attributes may be specified and returned as part of fi\_getinfo. When provided as hints, requested values of struct fi\_rx\_ctx\_attr should be set. On output, the actual receive context attributes that can be provided will be returned. Output values will be greater than or or equal to the requested input values.

- *ep\_attr - endpoint attributes*

  Optionally supplied endpoint attributes. Endpoint attributes may be specified and returned as part of fi\_getinfo. When provided as hints, requested values of struct fi\_ep\_attr should be set. On output, the actual endpoint attributes that can be provided will be returned. Output values will be greater than or equal to requested input values. See [fi\_endpoint(3)](/fi_endpoint/3.md) for details.

- *domain\_attr - domain attributes*

  Optionally supplied domain attributes. Domain attributes may be specified and returned as part of fi\_getinfo. When provided as hints, requested values of struct fi\_domain\_attr should be set. On output, the actual domain attributes that can be provided will be returned. Output values will be greater than or equal to requested input values. See [fi\_domain(3)](/fi_domain/3.md) for details.

- *fabric\_attr - fabric attributes*

  Optionally supplied fabric attributes. Fabric attributes may be specified and returned as part of fi\_getinfo. When provided as hints, requested values of struct fi\_fabric\_attr should be set. On output, the actual fabric attributes that can be provided will be returned. See [fi\_fabric(3)](/fi_fabric/3.md) for details.

- *nic - network interface details*

  Optional attributes related to the hardware NIC associated with the specified fabric, domain, and endpoint data. This field is only valid for providers where the corresponding attributes are closely associated with a hardware NIC. See [fi\_nic(3)](/fi_nic/3.md) for details.

## CAPABILITIES

Interface capabilities are obtained by OR-ing the following flags together. If a NULL hints structure is provided, the underlying provider will return the set of capabilities which are supported. If a hints structure is provided but the capabilities in the hints structure are set to 0, the underlying provider will only return the set of capabilities that the provider can support with the mode bits set by the application in the hints structure. Otherwise, if capabilities are specified with non-zero values, providers will return data matching the specified set of capabilities. Providers may indicate support for additional capabilities beyond those requested when the use of expanded capabilities will not adversely affect performance or expose the application to communication beyond that which was requested. Applications may use this feature to request a minimal set of requirements, then check the returned capabilities to enable additional optimizations.

- *FI\_ATOMIC*

  Specifies that the endpoint supports some set of atomic operations. Endpoints supporting this capability support operations defined by struct fi\_ops\_atomic. In the absence of any relevant flags, FI\_ATOMIC implies the ability to initiate and be the target of remote atomic reads and writes. Applications can use the FI\_READ, FI\_WRITE, FI\_REMOTE\_READ, and FI\_REMOTE\_WRITE flags to restrict the types of atomic operations supported by an endpoint.

- *FI\_AV\_USER\_ID*

  Requests that the provider support the association of a user specified identifier with each address vector (AV) address. User identifiers are returned with completion data in place of the AV address. See [fi\_domain(3)](/fi_domain/3.md) and [fi\_av(3)](/fi_av/3.md) for more details.

- *FI\_COLLECTIVE*

  Requests support for collective operations. Endpoints that support this capability support the collective operations defined in [fi\_collective(3)](/fi_collective/3.md).

- *FI\_DIRECTED\_RECV*

  Requests that the communication endpoint use the source address of an incoming message when matching it with a receive buffer. If this capability is not set, then the src\_addr parameter for msg and tagged receive operations is ignored.

- *FI\_TAGGED\_DIRECTED\_RECV*

  Similar to FI\_DIRECTED\_RECV, but only applies to tagged receive operations.

- *FI\_EXACT\_DIRECTED\_RECV*

  Similar to FI\_DIRECTED\_RECV, but requires the source address to be exact, i.e., FI\_ADDR\_UNSPEC is not allowed. This capability can be used alone, or in conjunction with FI\_DIRECTED\_RECV or FI\_TAGGED\_DIRECTED\_RECV as a modifier to disallow FI\_ADDR\_UNSPEC being used as the source address.

- *FI\_FENCE*

  Indicates that the endpoint support the FI\_FENCE flag on data transfer operations. Support requires tracking that all previous transmit requests to a specified remote endpoint complete prior to initiating the fenced operation. Fenced operations are often used to enforce ordering between operations that are not otherwise guaranteed by the underlying provider or protocol.

- *FI\_HMEM*

  Specifies that the endpoint should support transfers to and from device memory.

- *FI\_LOCAL\_COMM*

  Indicates that the endpoint support host local communication. This flag may be used in conjunction with FI\_REMOTE\_COMM to indicate that local and remote communication are required. If neither FI\_LOCAL\_COMM or FI\_REMOTE\_COMM are specified, then the provider will indicate support for the configuration that minimally affects performance. Providers that set FI\_LOCAL\_COMM but not FI\_REMOTE\_COMM, for example a shared memory provider, may only be used to communication between processes on the same system.

- *FI\_MSG*

  Specifies that an endpoint should support sending and receiving messages or datagrams. Message capabilities imply support for send and/or receive queues. Endpoints supporting this capability support operations defined by struct fi\_ops\_msg.

The caps may be used to specify or restrict the type of messaging operations that are supported. In the absence of any relevant flags, FI\_MSG implies the ability to send and receive messages. Applications can use the FI\_SEND and FI\_RECV flags to optimize an endpoint as send-only or receive-only.

- *FI\_MULTICAST*

  Indicates that the endpoint support multicast data transfers. This capability must be paired with FI\_MSG. Applications can use FI\_SEND and FI\_RECV to optimize multicast as send-only or receive-only.

- *FI\_MULTI\_RECV*

  Specifies that the endpoint must support the FI\_MULTI\_RECV flag when posting receive buffers.

- *FI\_TAGGED\_MULTI\_RECV*

  Specifies that the endpoint must support the FI\_MULTI\_RECV flag when posting tagged receive buffers.

- *FI\_NAMED\_RX\_CTX*

  Requests that endpoints which support multiple receive contexts allow an initiator to target (or name) a specific receive context as part of a data transfer operation.

- *FI\_PEER*

  Specifies that the provider must support being used as a peer provider in the peer API flow. The provider must support importing owner\_ops when opening a CQ, counter, and shared receive queue.

- *FI\_READ*

  Indicates that the user requires an endpoint capable of initiating reads against remote memory regions. This flag requires that FI\_RMA and/or FI\_ATOMIC be set.

- *FI\_RECV*

  Indicates that the user requires an endpoint capable of receiving message data transfers. Message transfers include base message operations as well as tagged message functionality.

- *FI\_REMOTE\_COMM*

  Indicates that the endpoint support communication with endpoints located at remote nodes (across the fabric). See FI\_LOCAL\_COMM for additional details. Providers that set FI\_REMOTE\_COMM but not FI\_LOCAL\_COMM, for example NICs that lack loopback support, cannot be used to communicate with processes on the same system.

- *FI\_REMOTE\_READ*

  Indicates that the user requires an endpoint capable of receiving read memory operations from remote endpoints. This flag requires that FI\_RMA and/or FI\_ATOMIC be set.

- *FI\_REMOTE\_WRITE*

  Indicates that the user requires an endpoint capable of receiving write memory operations from remote endpoints. This flag requires that FI\_RMA and/or FI\_ATOMIC be set.

- *FI\_RMA*

  Specifies that the endpoint should support RMA read and write operations. Endpoints supporting this capability support operations defined by struct fi\_ops\_rma. In the absence of any relevant flags, FI\_RMA implies the ability to initiate and be the target of remote memory reads and writes. Applications can use the FI\_READ, FI\_WRITE, FI\_REMOTE\_READ, and FI\_REMOTE\_WRITE flags to restrict the types of RMA operations supported by an endpoint.

- *FI\_RMA\_EVENT*

  Requests that an endpoint support the generation of completion events when it is the target of an RMA and/or atomic operation. This flag requires that FI\_REMOTE\_READ and/or FI\_REMOTE\_WRITE be enabled on the endpoint.

- *FI\_RMA\_PMEM*

  Indicates that the provider is \`persistent memory aware' and supports RMA operations to and from persistent memory. Persistent memory aware providers must support registration of memory that is backed by non- volatile memory, RMA transfers to/from persistent memory, and enhanced completion semantics. This flag requires that FI\_RMA be set. This capability is experimental.

- *FI\_SEND*

  Indicates that the user requires an endpoint capable of sending message data transfers. Message transfers include base message operations as well as tagged message functionality.

- *FI\_SHARED\_AV*

  Requests or indicates support for address vectors which may be shared among multiple processes.

- *FI\_SOURCE*

  Requests that the endpoint return source addressing data as part of its completion data. This capability only applies to connectionless endpoints. Note that returning source address information may require that the provider perform address translation and/or look-up based on data available in the underlying protocol in order to provide the requested data, which may adversely affect performance. The performance impact may be greater for address vectors of type FI\_AV\_TABLE.

- *FI\_SOURCE\_ERR*

  Must be paired with FI\_SOURCE. When specified, this requests that raw source addressing data be returned as part of completion data for any address that has not been inserted into the local address vector. Use of this capability may require the provider to validate incoming source address data against addresses stored in the local address vector, which may adversely affect performance.

- *FI\_TAGGED*

  Specifies that the endpoint should handle tagged message transfers. Tagged message transfers associate a user-specified key or tag with each message that is used for matching purposes at the remote side. Endpoints supporting this capability support operations defined by struct fi\_ops\_tagged. In the absence of any relevant flags, FI\_TAGGED implies the ability to send and receive tagged messages. Applications can use the FI\_SEND and FI\_RECV flags to optimize an endpoint as send-only or receive-only.

- *FI\_TRIGGER*

  Indicates that the endpoint should support triggered operations. Endpoints support this capability must meet the usage model as described by [fi\_trigger(3)](/fi_trigger/3.md).

- *FI\_WRITE*

  Indicates that the user requires an endpoint capable of initiating writes against remote memory regions. This flag requires that FI\_RMA and/or FI\_ATOMIC be set.

- *FI\_XPU*

  Requests support for data path operations initiated from heterogeneous computation devices, such as GPUs. At the endpoint level, indicates the endpoint should support such operations; at the domain level, indicates the domain supports creating an XPU context. See [fi\_xpu(3)](/fi_xpu/3.md) for details.

Capabilities may be grouped into three general categories: primary, secondary, and primary modifiers. Primary capabilities must explicitly be requested by an application, and a provider must enable support for only those primary capabilities which were selected. Primary modifiers are used to limit a primary capability, such as restricting an endpoint to being send-only. If no modifiers are specified for an applicable capability, all relevant modifiers are assumed. See above definitions for details.

Secondary capabilities may optionally be requested by an application. If requested, a provider must support the capability or fail the fi\_getinfo request (FI\_ENODATA). A provider may optionally report non-selected secondary capabilities if doing so would not compromise performance or security.

Primary capabilities: FI\_MSG, FI\_RMA, FI\_TAGGED, FI\_ATOMIC, FI\_MULTICAST, FI\_NAMED\_RX\_CTX, FI\_DIRECTED\_RECV, FI\_TAGGED\_DIRECTED\_RECV, FI\_HMEM, FI\_COLLECTIVE, FI\_XPU, FI\_AV\_USER\_ID, FI\_PEER

Primary modifiers: FI\_READ, FI\_WRITE, FI\_RECV, FI\_SEND, FI\_REMOTE\_READ, FI\_REMOTE\_WRITE

Secondary capabilities: FI\_MULTI\_RECV, FI\_TAGGED\_MULTI\_RECV, FI\_SOURCE, FI\_RMA\_EVENT, FI\_SHARED\_AV, FI\_TRIGGER, FI\_FENCE, FI\_LOCAL\_COMM, FI\_REMOTE\_COMM, FI\_SOURCE\_ERR, FI\_RMA\_PMEM.

## MODE

The operational mode bits are used to convey requirements that an application must adhere to when using the fabric interfaces. Modes specify optimal ways of accessing the reported endpoint or domain. Applications that are designed to support a specific mode of operation may see improved performance when that mode is desired by the provider. It is recommended that providers support applications that disable any provider preferred modes.

On input to fi\_getinfo, applications set the mode bits that they support. On output, providers will clear mode bits that are not necessary to achieve high-performance. Mode bits that remain set indicate application requirements for using the fabric interfaces created using the returned fi\_info. The set of modes are listed below. If a NULL hints structure is provided, then the provider’s supported set of modes will be returned in the info structure(s).

- *FI\_ASYNC\_IOV*

  Applications can reference multiple data buffers as part of a single operation through the use of IO vectors (SGEs). Typically, the contents of an IO vector are copied by the provider into an internal buffer area, or directly to the underlying hardware. However, when a large number of IOV entries are supported, IOV buffering may have a negative impact on performance and memory consumption. The FI\_ASYNC\_IOV mode indicates that the application must provide the buffering needed for the IO vectors. When set, an application must not modify an IO vector of length \> 1, including any related memory descriptor array, until the associated operation has completed.

- *FI\_CONTEXT*

  Specifies that the provider requires that applications use struct fi\_context as their per operation context parameter for operations that generated full completions. This structure should be treated as opaque to the application. For performance reasons, this structure must be allocated by the user, but may be used by the fabric provider to track the operation. Typically, users embed struct fi\_context within their own context structure. The struct fi\_context must remain valid until the corresponding operation completes or is successfully canceled. As such, fi\_context should NOT be allocated on the stack. Doing so is likely to result in stack corruption that will be difficult to debug. Users should not update or interpret the fields in this structure, or reuse it until the original operation has completed. If an operation does not generate a completion (i.e. the endpoint was configured with FI\_SELECTIVE\_COMPLETION and the operation was not initiated with the FI\_COMPLETION flag) then the context parameter is ignored by the fabric provider. The structure is specified in rdma/fabric.h.

- *FI\_CONTEXT2*

  This bit is similar to FI\_CONTEXT, but doubles the provider’s requirement on the size of the per context structure. When set, this specifies that the provider requires that applications use struct fi\_context2 as their per operation context parameter. Or, optionally, an application can provide an array of two fi\_context structures (e.g. struct fi\_context\[2\]) instead. The requirements for using struct fi\_context2 are identical as defined for FI\_CONTEXT above.

- *FI\_LOCAL\_MR* (deprecated)

  The provider is optimized around having applications register memory for locally accessed data buffers. Data buffers used in send and receive operations and as the source buffer for RMA and atomic operations must be registered by the application for access domains opened with this capability. This flag is defined for compatibility and is ignored if the application version is 1.5 or later and the domain mr\_mode is set to anything other than FI\_MR\_BASIC or FI\_MR\_SCALABLE. See the domain attribute mr\_mode [fi\_domain(3)](/fi_domain/3.md) and [fi\_mr(3)](/fi_mr/3.md).

- *FI\_MSG\_PREFIX*

  Message prefix mode indicates that an application will provide buffer space in front of all message send and receive buffers for use by the provider. Typically, the provider uses this space to implement a protocol, with the protocol headers being written into the prefix area. The contents of the prefix space should be treated as opaque. The use of FI\_MSG\_PREFIX may improve application performance over certain providers by reducing the number of IO vectors referenced by underlying hardware and eliminating provider buffer allocation.

FI\_MSG\_PREFIX only applies to send and receive operations, including tagged sends and receives. RMA and atomics do not require the application to provide prefix buffers. Prefix buffer space must be provided with all sends and receives, regardless of the size of the transfer or other transfer options. The ownership of prefix buffers is treated the same as the corresponding message buffers, but the size of the prefix buffer is not counted toward any message limits, including inject.

Applications that support prefix mode must supply buffer space before their own message data. The size of space that must be provided is specified by the msg\_prefix\_size endpoint attribute. Providers are required to define a msg\_prefix\_size that is a multiple of 8 bytes. Additionally, applications may receive provider generated packets that do not contain application data. Such received messages will indicate a transfer size of that is equal to or smaller than msg\_prefix\_size.

The buffer pointer given to all send and receive operations must point to the start of the prefix region of the buffer (as opposed to the payload). For scatter-gather send/recv operations, the prefix buffer must be a contiguous region, though it may or may not be directly adjacent to the payload portion of the buffer.

- *FI\_RX\_CQ\_DATA*

  This mode bit only applies to data transfers that set FI\_REMOTE\_CQ\_DATA. When set, a data transfer that carries remote CQ data will consume a receive buffer at the target. This is true even for operations that would normally not consume posted receive buffers, such as RMA write operations.

## ADDRESSING FORMATS

Multiple fabric interfaces take as input either a source or destination address parameter. This includes struct fi\_info (src\_addr and dest\_addr), CM calls (getname, getpeer, connect, join, and leave), and AV calls (insert, lookup, and straddr). The fi\_info addr\_format field indicates the expected address format for these operations.

A provider may support one or more of the following addressing formats. In some cases, a selected addressing format may need to be translated or mapped into an address which is native to the fabric. See [fi\_av(3)](/fi_av/3.md).

- *FI\_ADDR\_EFA*

  Address is an Amazon Elastic Fabric Adapter (EFA) proprietary format.

- *FI\_ADDR\_PSMX2*

  Address is an Intel proprietary format used with their Performance Scaled Messaging protocol version 2.

- *FI\_ADDR\_PSMX3*

  Address is an Intel proprietary format used with their Performance Scaled Messaging protocol version 3.

- *FI\_ADDR\_STR*

  Address is a formatted character string. The length and content of the string is address and/or provider specific, but in general follows a URI model:

-

  ```
  address_format[://[node][:[service][/[field3]...][?[key=value][&k2=v2]...]]]
  ```

Examples: - fi\_sockaddr://10.31.6.12:7471 - fi\_sockaddr\_in6://\[fe80::6:12\]:7471 - fi\_sockaddr://10.31.6.12:7471?qos=3

Since the string formatted address does not contain any provider information, the prov\_name field of the fabric attribute structure should be used to filter by provider if necessary.

- *FI\_FORMAT\_UNSPEC*

  FI\_FORMAT\_UNSPEC indicates that a provider specific address format should be selected. Provider specific addresses may be protocol specific or a vendor proprietary format. Applications that select FI\_FORMAT\_UNSPEC should be prepared to treat returned addressing data as opaque. FI\_FORMAT\_UNSPEC targets apps which make use of an out of band address exchange. Applications which use FI\_FORMAT\_UNSPEC may use fi\_getname() to obtain a provider specific address assigned to an allocated endpoint.

- *FI\_SOCKADDR*

  Address is of type sockaddr. The specific socket address format will be determined at run time by interfaces examining the sa\_family field.

- *FI\_SOCKADDR\_IB*

  Address is of type sockaddr\_ib (defined in Linux kernel source)

- *FI\_SOCKADDR\_IN*

  Address is of type sockaddr\_in (IPv4).

- *FI\_SOCKADDR\_IN6*

  Address is of type sockaddr\_in6 (IPv6).

- *FI\_SOCKADDR\_IP*

  Address is of type sockaddr\_in (IPv4) or sockaddr\_in6 (IPv6). The specific socket address format will be determined at run time by interfaces examining the sa\_family field. This format is different from FI\_SOCKADDR in that the address can only be IPv4 or IPv6, not any other socket address such as sockaddr\_ib.

## FLAGS

The operation of the fi\_getinfo call may be controlled through the use of input flags. Valid flags include the following.

- *FI\_NUMERICHOST*

  Indicates that the node parameter is a numeric string representation of a fabric address, such as a dotted decimal IP address. Use of this flag will suppress any lengthy name resolution protocol.

- *FI\_PROV\_ATTR\_ONLY*

  Indicates that the caller is only querying for what providers are potentially available. All providers will return exactly one fi\_info struct, regardless of whether that provider is usable on the current platform or not. The returned fi\_info struct will contain default values for all members, with the exception of fabric\_attr. The fabric\_attr member will have the prov\_name and prov\_version values filled in.

- *FI\_SOURCE*

  Indicates that the node and service parameters specify the local source address to associate with an endpoint. If specified, either the node and/or service parameter must be non-NULL. This flag is often used with passive endpoints.

- *FI\_RESCAN*

  Indicates that the provider should rescan available network interfaces. This operation may be computationally expensive.

## RETURN VALUE

fi\_getinfo() returns 0 on success. On error, fi\_getinfo() returns a negative value corresponding to fabric errno. Fabric errno values are defined in rdma/fi\_errno.h.

fi\_allocinfo() returns a pointer to a new fi\_info structure on success, or NULL on error. fi\_dupinfo() duplicates a single fi\_info structure and all the substructures within it, returning a pointer to the new fi\_info structure on success, or NULL on error. Both calls require that the returned fi\_info structure be freed via fi\_freeinfo().

## ERRORS

- *FI\_EBADFLAGS*

  The specified endpoint or domain capability or operation flags are invalid.

- *FI\_ENODATA*

  Indicates that no providers could be found which support the requested fabric information.

- *FI\_ENOMEM*

  Indicates that there was insufficient memory to complete the operation.

- *FI\_ENOSYS*

  Indicates that requested version is newer than the library being used.

## ENVIRONMENT VARIABLES

The following environment variables affect the behavior of fi\_getinfo.

- *FI\_ADDR\_FORMAT*

  Filter fi\_getinfo results to only return entries matching the specified address format. When set, any fi\_info entry whose addr\_format does not match the specified value is removed from the results. Valid values correspond to the constants defined in the *Addressing* *formats* section. By default, no filtering is applied. This variable is intended as a fallback mechanism for environments where the application or middleware cannot be modified. Applications and upper layers should prefer selecting an appropriate address format through fi\_getinfo hints.

## NOTES

Various libfabric calls, including fi\_getinfo, take a struct fi\_info as input. Applications must use libfabric allocated fi\_info structures. A zeroed struct fi\_info can be allocated using fi\_allocinfo, which may then be initialized by the user. A struct fi\_info may be copied for modification using the fi\_dupinfo() call.

If hints are provided, the operation will be controlled by the values that are supplied in the various fields (see section on *fi\_info*). Applications that require specific communication interfaces, domains, capabilities or other requirements, can specify them using fields in *hints*. Libfabric returns a linked list in *info* that points to a list of matching interfaces. *info* is set to NULL if there are no communication interfaces or none match the input hints.

If node is provided, fi\_getinfo will attempt to resolve the fabric address to the given node. If node is not provided, fi\_getinfo will attempt to resolve the fabric addressing information based on the provided hints. The caller must call fi\_freeinfo to release fi\_info structures returned by fi\_getinfo.

If neither node, service or hints are provided, then fi\_getinfo simply returns the list all available communication interfaces.

Multiple threads may call fi\_getinfo simultaneously, without any requirement for serialization.

## SEE ALSO

[fi\_open(3)](/fi_open/3.md), [fi\_endpoint(3)](/fi_endpoint/3.md), [fi\_domain(3)](/fi_domain/3.md), [fi\_nic(3)](/fi_nic/3.md) [fi\_trigger(3)](/fi_trigger/3.md)

## AUTHORS

OpenFabrics.
