1fi_getinfo(3) Libfabric v1.10.0 fi_getinfo(3)
2
3
4
6 fi_getinfo, fi_freeinfo - Obtain / free fabric interface information
7
8 fi_allocinfo, fi_dupinfo - Allocate / duplicate an fi_info structure
9
11 #include <rdma/fabric.h>
12
13 int fi_getinfo(int version, const char *node, const char *service,
14 uint64_t flags, const struct fi_info *hints, struct fi_info **info);
15
16 void fi_freeinfo(struct fi_info *info);
17
18 struct fi_info *fi_allocinfo(void);
19
20 struct fi_info *fi_dupinfo(const struct fi_info *info);
21
23 version
24 Interface version requested by application.
25
26 node Optional, name or fabric address to resolve.
27
28 service
29 Optional, service name or port number of address.
30
31 flags Operation flags for the fi_getinfo call.
32
33 hints Reference to an fi_info structure that specifies criteria for
34 selecting the returned fabric information.
35
36 info A pointer to a linked list of fi_info structures containing re‐
37 sponse information.
38
40 fi_getinfo returns information about available fabric services for
41 reaching specified node or service, subject to any provided hints.
42 Callers may specify NULL for node, service, and hints in order to re‐
43 trieve information about what providers are available and their optimal
44 usage models. If no matching fabric information is available, info
45 will be set to NULL and the call will return -FI_ENODATA.
46
47 Based on the input hints, node, and service parameters, a list of fab‐
48 ric domains and endpoints will be returned. Each fi_info structure
49 will describe an endpoint that meets the application's specified commu‐
50 nication criteria. Each endpoint will be associated with a domain.
51 Applications can restrict the number of returned endpoints by including
52 additional criteria in their search hints. Relaxing or eliminating in‐
53 put hints will increase the number and type of endpoints that are
54 available. Providers that return multiple endpoints to a single
55 fi_getinfo call should return the endpoints that are highest performing
56 first. Providers may indicate that an endpoint and domain can support
57 additional capabilities than those requested by the user only if such
58 support will not adversely affect application performance or security.
59
60 The version parameter is used by the application to request the desired
61 version of the interfaces. The version determines the format of all
62 data structures used by any of the fabric interfaces. Applications
63 should use the FI_VERSION(major, minor) macro to indicate the version,
64 with hard-coded integer values for the major and minor values. The
65 FI_MAJOR_VERSION and FI_MINOR_VERSION enum values defined in fabric.h
66 specify the latest version of the installed library. However, it is
67 recommended that the integer values for FI_MAJOR_VERSION and FI_MI‐
68 NOR_VERSION be used, rather than referencing the enum types in order to
69 ensure compatibility with future versions of the library. This pro‐
70 tects against the application being built from source against a newer
71 version of the library that introduces new fields to data structures,
72 which would not be initialized by the application.
73
74 Node, service, or hints may be provided, with any combination being
75 supported. If node is provided, fi_getinfo will attempt to resolve the
76 fabric address to the given node. If node is not given, fi_getinfo
77 will attempt to resolve the fabric addressing information based on the
78 provided hints. Node is commonly used to provide a network address
79 (such as an IP address) or hostname. Service is usually associated
80 with a transport address (such as a TCP port number). Node and service
81 parameters may be mapped by providers to native fabric addresses. Ap‐
82 plications may also pass in an FI_ADDR_STR formatted address (see for‐
83 mat details below) as the node parameter. In such cases, the service
84 parameter must be NULL.
85
86 The hints parameter, if provided, may be used to limit the resulting
87 output as indicated below. As a general rule, specifying a non-zero
88 value for input hints indicates that a provider must support the re‐
89 quested value or fail the operation with -FI_ENODATA. With the excep‐
90 tion of mode bits, hints that are set to zero are treated as a wild‐
91 card. A zeroed hint value results in providers either returning a de‐
92 fault value or a value that works best for their implementation. Mode
93 bits that are set to zero indicate the application does not support any
94 modes.
95
96 The caller must call fi_freeinfo to release fi_info structures returned
97 by this call.
98
99 The fi_allocinfo call will allocate and zero an fi_info structure and
100 all related substructures. The fi_dupinfo will duplicate a single
101 fi_info structure and all the substructures within it.
102
104 struct fi_info {
105 struct fi_info *next;
106 uint64_t caps;
107 uint64_t mode;
108 uint32_t addr_format;
109 size_t src_addrlen;
110 size_t dest_addrlen;
111 void *src_addr;
112 void *dest_addr;
113 fid_t handle;
114 struct fi_tx_attr *tx_attr;
115 struct fi_rx_attr *rx_attr;
116 struct fi_ep_attr *ep_attr;
117 struct fi_domain_attr *domain_attr;
118 struct fi_fabric_attr *fabric_attr;
119 struct fid_nic *nic;
120 };
121
122 next Pointer to the next fi_info structure in the list. Will be NULL
123 if no more structures exist.
124
125 caps - fabric interface capabilities
126 If specified, indicates the desired capabilities of the fabric
127 interfaces. Supported capabilities are listed in the Capabili‐
128 ties section below.
129
130 mode Operational modes supported by the application. See the Mode
131 section below.
132
133 addr_format - address format
134 If specified, indicates the format of addresses referenced by
135 the fabric interfaces and data structures. Supported formats
136 are listed in the Addressing formats section below.
137
138 src_addrlen - source address length
139 Indicates the length of the source address. This value must be
140 > 0 if src_addr is non-NULL. This field will be ignored in
141 hints if FI_SOURCE flag is set, or src_addr is NULL.
142
143 dest_addrlen - destination address length
144 Indicates the length of the destination address. This value
145 must be > 0 if dest_addr is non-NULL. This field will be ig‐
146 nored in hints unless the node and service parameters are NULL
147 or FI_SOURCE flag is set, or if dst_addr is NULL.
148
149 src_addr - source address
150 If specified, indicates the source address. This field will be
151 ignored in hints if FI_SOURCE flag is set. On output a provider
152 shall return an address that corresponds to the indicated fab‐
153 ric, domain, node, and/or service fields. The format of the ad‐
154 dress is indicated by the returned addr_format field. Note that
155 any returned address is only used when opening a local endpoint.
156 The address is not guaranteed to be usable by a peer process.
157
158 dest_addr - destination address
159 If specified, indicates the destination address. This field
160 will be ignored in hints unless the node and service parameters
161 are NULL or FI_SOURCE flag is set. If FI_SOURCE is not speci‐
162 fied, on output a provider shall return an address the corre‐
163 sponds to the indicated node and/or service fields, relative to
164 the fabric and domain. Note that any returned address is only
165 usable locally.
166
167 handle - provider context handle
168 The use of this field is operation specific. If hints->handle
169 is set to struct fid_pep, the hints->handle will be copied to
170 info->handle on output from fi_getinfo. Other values of
171 hints->handle will be handled in a provider specific manner.
172 The fi_info::handle field is also used by fi_endpoint() and
173 fi_reject() calls when processing connection requests or to in‐
174 herit another endpoint's attributes. See fi_eq(3), fi_re‐
175 ject(3), and fi_endpoint(3). The info->handle field will be ig‐
176 nored by fi_dupinfo and fi_freeinfo.
177
178 tx_attr - transmit context attributes
179 Optionally supplied transmit context attributes. Transmit con‐
180 text attributes may be specified and returned as part of fi_get‐
181 info. When provided as hints, requested values of struct
182 fi_tx_ctx_attr should be set. On output, the actual transmit
183 context attributes that can be provided will be returned. Out‐
184 put values will be greater than or equal to the requested input
185 values.
186
187 rx_attr - receive context attributes
188 Optionally supplied receive context attributes. Receive context
189 attributes may be specified and returned as part of fi_getinfo.
190 When provided as hints, requested values of struct fi_rx_ctx_at‐
191 tr should be set. On output, the actual receive context at‐
192 tributes that can be provided will be returned. Output values
193 will be greater than or or equal to the requested input values.
194
195 ep_attr - endpoint attributes
196 Optionally supplied endpoint attributes. Endpoint attributes
197 may be specified and returned as part of fi_getinfo. When pro‐
198 vided as hints, requested values of struct fi_ep_attr should be
199 set. On output, the actual endpoint attributes that can be pro‐
200 vided will be returned. Output values will be greater than or
201 equal to requested input values. See fi_endpoint(3) for de‐
202 tails.
203
204 domain_attr - domain attributes
205 Optionally supplied domain attributes. Domain attributes may be
206 specified and returned as part of fi_getinfo. When provided as
207 hints, requested values of struct fi_domain_attr should be set.
208 On output, the actual domain attributes that can be provided
209 will be returned. Output values will be greater than or equal
210 to requested input values. See fi_domain(3) for details.
211
212 fabric_attr - fabric attributes
213 Optionally supplied fabric attributes. Fabric attributes may be
214 specified and returned as part of fi_getinfo. When provided as
215 hints, requested values of struct fi_fabric_attr should be set.
216 On output, the actual fabric attributes that can be provided
217 will be returned. See fi_fabric(3) for details.
218
219 nic - network interface details
220 Optional attributes related to the hardware NIC associated with
221 the specified fabric, domain, and endpoint data. This field is
222 only valid for providers where the corresponding attributes are
223 closely associated with a hardware NIC. See fi_nic(3) for de‐
224 tails.
225
227 Interface capabilities are obtained by OR-ing the following flags to‐
228 gether. If capabilities in the hint parameter are set to 0, the under‐
229 lying provider will return the set of capabilities which are supported.
230 Otherwise, providers will return data matching the specified set of ca‐
231 pabilities. Providers may indicate support for additional capabilities
232 beyond those requested when the use of expanded capabilities will not
233 adversely affect performance or expose the application to communication
234 beyond that which was requested. Applications may use this feature to
235 request a minimal set of requirements, then check the returned capabil‐
236 ities to enable additional optimizations.
237
238 FI_ATOMIC
239 Specifies that the endpoint supports some set of atomic opera‐
240 tions. Endpoints supporting this capability support operations
241 defined by struct fi_ops_atomic. In the absence of any relevant
242 flags, FI_ATOMIC implies the ability to initiate and be the tar‐
243 get of remote atomic reads and writes. Applications can use the
244 FI_READ, FI_WRITE, FI_REMOTE_READ, and FI_REMOTE_WRITE flags to
245 restrict the types of atomic operations supported by an end‐
246 point.
247
248 FI_DIRECTED_RECV
249 Requests that the communication endpoint use the source address
250 of an incoming message when matching it with a receive buffer.
251 If this capability is not set, then the src_addr parameter for
252 msg and tagged receive operations is ignored.
253
254 FI_FENCE
255 Indicates that the endpoint support the FI_FENCE flag on data
256 transfer operations. Support requires tracking that all previ‐
257 ous transmit requests to a specified remote endpoint complete
258 prior to initiating the fenced operation. Fenced operations are
259 often used to enforce ordering between operations that are not
260 otherwise guaranteed by the underlying provider or protocol.
261
262 FI_HMEM
263 Specifies that the endpoint should support transfers to and from
264 device memory.
265
266 FI_LOCAL_COMM
267 Indicates that the endpoint support host local communication.
268 This flag may be used in conjunction with FI_REMOTE_COMM to in‐
269 dicate that local and remote communication are required. If
270 neither FI_LOCAL_COMM or FI_REMOTE_COMM are specified, then the
271 provider will indicate support for the configuration that mini‐
272 mally affects performance. Providers that set FI_LOCAL_COMM but
273 not FI_REMOTE_COMM, for example a shared memory provider, may
274 only be used to communication between processes on the same sys‐
275 tem.
276
277 FI_MSG Specifies that an endpoint should support sending and receiving
278 messages or datagrams. Message capabilities imply support for
279 send and/or receive queues. Endpoints supporting this capabili‐
280 ty support operations defined by struct fi_ops_msg.
281
282 The caps may be used to specify or restrict the type of messaging oper‐
283 ations that are supported. In the absence of any relevant flags,
284 FI_MSG implies the ability to send and receive messages. Applications
285 can use the FI_SEND and FI_RECV flags to optimize an endpoint as
286 send-only or receive-only.
287
288 FI_MULTICAST
289 Indicates that the endpoint support multicast data transfers.
290 This capability must be paired with FI_MSG. Applications can
291 use FI_SEND and FI_RECV to optimize multicast as send-only or
292 receive-only.
293
294 FI_MULTI_RECV
295 Specifies that the endpoint must support the FI_MULTI_RECV flag
296 when posting receive buffers.
297
298 FI_NAMED_RX_CTX
299 Requests that endpoints which support multiple receive contexts
300 allow an initiator to target (or name) a specific receive con‐
301 text as part of a data transfer operation.
302
303 FI_READ
304 Indicates that the user requires an endpoint capable of initiat‐
305 ing reads against remote memory regions. This flag requires
306 that FI_RMA and/or FI_ATOMIC be set.
307
308 FI_RECV
309 Indicates that the user requires an endpoint capable of receiv‐
310 ing message data transfers. Message transfers include base mes‐
311 sage operations as well as tagged message functionality.
312
313 FI_REMOTE_COMM
314 Indicates that the endpoint support communication with endpoints
315 located at remote nodes (across the fabric). See FI_LOCAL_COMM
316 for additional details. Providers that set FI_REMOTE_COMM but
317 not FI_LOCAL_COMM, for example NICs that lack loopback support,
318 cannot be used to communicate with processes on the same system.
319
320 FI_REMOTE_READ
321 Indicates that the user requires an endpoint capable of receiv‐
322 ing read memory operations from remote endpoints. This flag re‐
323 quires that FI_RMA and/or FI_ATOMIC be set.
324
325 FI_REMOTE_WRITE
326 Indicates that the user requires an endpoint capable of receiv‐
327 ing write memory operations from remote endpoints. This flag
328 requires that FI_RMA and/or FI_ATOMIC be set.
329
330 FI_RMA Specifies that the endpoint should support RMA read and write
331 operations. Endpoints supporting this capability support opera‐
332 tions defined by struct fi_ops_rma. In the absence of any rele‐
333 vant flags, FI_RMA implies the ability to initiate and be the
334 target of remote memory reads and writes. Applications can use
335 the FI_READ, FI_WRITE, FI_REMOTE_READ, and FI_REMOTE_WRITE flags
336 to restrict the types of RMA operations supported by an end‐
337 point.
338
339 FI_RMA_EVENT
340 Requests that an endpoint support the generation of completion
341 events when it is the target of an RMA and/or atomic operation.
342 This flag requires that FI_REMOTE_READ and/or FI_REMOTE_WRITE be
343 enabled on the endpoint.
344
345 FI_RMA_PMEM
346 Indicates that the provider is 'persistent memory aware' and
347 supports RMA operations to and from persistent memory. Persis‐
348 tent memory aware providers must support registration of memory
349 that is backed by non- volatile memory, RMA transfers to/from
350 persistent memory, and enhanced completion semantics. This flag
351 requires that FI_RMA be set. This capability is experimental.
352
353 FI_SEND
354 Indicates that the user requires an endpoint capable of sending
355 message data transfers. Message transfers include base message
356 operations as well as tagged message functionality.
357
358 FI_SHARED_AV
359 Requests or indicates support for address vectors which may be
360 shared among multiple processes.
361
362 FI_SOURCE
363 Requests that the endpoint return source addressing data as part
364 of its completion data. This capability only applies to connec‐
365 tionless endpoints. Note that returning source address informa‐
366 tion may require that the provider perform address translation
367 and/or look-up based on data available in the underlying proto‐
368 col in order to provide the requested data, which may adversely
369 affect performance. The performance impact may be greater for
370 address vectors of type FI_AV_TABLE.
371
372 FI_SOURCE_ERR
373 Must be paired with FI_SOURCE. When specified, this requests
374 that raw source addressing data be returned as part of comple‐
375 tion data for any address that has not been inserted into the
376 local address vector. Use of this capability may require the
377 provider to validate incoming source address data against ad‐
378 dresses stored in the local address vector, which may adversely
379 affect performance.
380
381 FI_TAGGED
382 Specifies that the endpoint should handle tagged message trans‐
383 fers. Tagged message transfers associate a user-specified key
384 or tag with each message that is used for matching purposes at
385 the remote side. Endpoints supporting this capability support
386 operations defined by struct fi_ops_tagged. In the absence of
387 any relevant flags, FI_TAGGED implies the ability to send and
388 receive tagged messages. Applications can use the FI_SEND and
389 FI_RECV flags to optimize an endpoint as send-only or re‐
390 ceive-only.
391
392 FI_TRIGGER
393 Indicates that the endpoint should support triggered operations.
394 Endpoints support this capability must meet the usage model as
395 described by fi_trigger.3.
396
397 FI_VARIABLE_MSG
398 Requests that the provider must notify a receiver when a vari‐
399 able length message is ready to be received prior to attempting
400 to place the data. Such notification will include the size of
401 the message and any associated message tag (for FI_TAGGED). See
402 'Variable Length Messages' in fi_msg.3 for full details. Vari‐
403 able length messages are any messages larger than an endpoint
404 configurable size. This flag requires that FI_MSG and/or
405 FI_TAGGED be set.
406
407 FI_WRITE
408 Indicates that the user requires an endpoint capable of initiat‐
409 ing writes against remote memory regions. This flag requires
410 that FI_RMA and/or FI_ATOMIC be set.
411
412 Capabilities may be grouped into three general categories: primary,
413 secondary, and primary modifiers. Primary capabilities must explicitly
414 be requested by an application, and a provider must enable support for
415 only those primary capabilities which were selected. Primary modifiers
416 are used to limit a primary capability, such as restricting an endpoint
417 to being send-only. If no modifiers are specified for an applicable
418 capability, all relevant modifiers are assumed. See above definitions
419 for details.
420
421 Secondary capabilities may optionally be requested by an application.
422 If requested, a provider must support the capability or fail the
423 fi_getinfo request (FI_ENODATA). A provider may optionally report
424 non-selected secondary capabilities if doing so would not compromise
425 performance or security.
426
427 Primary capabilities: FI_MSG, FI_RMA, FI_TAGGED, FI_ATOMIC, FI_MULTI‐
428 CAST, FI_NAMED_RX_CTX, FI_DIRECTED_RECV, FI_VARIABLE_MSG, FI_HMEM
429
430 Primary modifiers: FI_READ, FI_WRITE, FI_RECV, FI_SEND, FI_REMOTE_READ,
431 FI_REMOTE_WRITE
432
433 Secondary capabilities: FI_MULTI_RECV, FI_SOURCE, FI_RMA_EVENT,
434 FI_SHARED_AV, FI_TRIGGER, FI_FENCE, FI_LOCAL_COMM, FI_REMOTE_COMM,
435 FI_SOURCE_ERR, FI_RMA_PMEM.
436
438 The operational mode bits are used to convey requirements that an ap‐
439 plication must adhere to when using the fabric interfaces. Modes spec‐
440 ify optimal ways of accessing the reported endpoint or domain. Appli‐
441 cations that are designed to support a specific mode of operation may
442 see improved performance when that mode is desired by the provider. It
443 is recommended that providers support applications that disable any
444 provider preferred modes.
445
446 On input to fi_getinfo, applications set the mode bits that they sup‐
447 port. On output, providers will clear mode bits that are not necessary
448 to achieve high-performance. Mode bits that remain set indicate appli‐
449 cation requirements for using the fabric interfaces created using the
450 returned fi_info. The set of modes are listed below. If a NULL hints
451 structure is provided, then the provider's supported set of modes will
452 be returned in the info structure(s).
453
454 FI_ASYNC_IOV
455 Applications can reference multiple data buffers as part of a
456 single operation through the use of IO vectors (SGEs). Typical‐
457 ly, the contents of an IO vector are copied by the provider into
458 an internal buffer area, or directly to the underlying hardware.
459 However, when a large number of IOV entries are supported, IOV
460 buffering may have a negative impact on performance and memory
461 consumption. The FI_ASYNC_IOV mode indicates that the applica‐
462 tion must provide the buffering needed for the IO vectors. When
463 set, an application must not modify an IO vector of length > 1,
464 including any related memory descriptor array, until the associ‐
465 ated operation has completed.
466
467 FI_BUFFERED_RECV
468 The buffered receive mode bit indicates that the provider owns
469 the data buffer(s) that are accessed by the networking layer for
470 received messages. Typically, this implies that data must be
471 copied from the provider buffer into the application buffer.
472 Applications that can handle message processing from network al‐
473 located data buffers can set this mode bit to avoid copies. For
474 full details on application requirements to support this mode,
475 see the 'Buffered Receives' section in fi_msg(3). This mode bit
476 applies to FI_MSG and FI_TAGGED receive operations.
477
478 FI_CONTEXT
479 Specifies that the provider requires that applications use
480 struct fi_context as their per operation context parameter for
481 operations that generated full completions. This structure
482 should be treated as opaque to the application. For performance
483 reasons, this structure must be allocated by the user, but may
484 be used by the fabric provider to track the operation. Typical‐
485 ly, users embed struct fi_context within their own context
486 structure. The struct fi_context must remain valid until the
487 corresponding operation completes or is successfully canceled.
488 As such, fi_context should NOT be allocated on the stack. Doing
489 so is likely to result in stack corruption that will be diffi‐
490 cult to debug. Users should not update or interpret the fields
491 in this structure, or reuse it until the original operation has
492 completed. If an operation does not generate a completion (i.e.
493 the endpoint was configured with FI_SELECTIVE_COMPLETION and the
494 operation was not initiated with the FI_COMPLETION flag) then
495 the context parameter is ignored by the fabric provider. The
496 structure is specified in rdma/fabric.h.
497
498 FI_CONTEXT2
499 This bit is similar to FI_CONTEXT, but doubles the provider's
500 requirement on the size of the per context structure. When set,
501 this specifies that the provider requires that applications use
502 struct fi_context2 as their per operation context parameter.
503 Or, optionally, an application can provide an array of two
504 fi_context structures (e.g. struct fi_context[2]) instead. The
505 requirements for using struct fi_context2 are identical as de‐
506 fined for FI_CONTEXT above.
507
508 FI_LOCAL_MR
509 The provider is optimized around having applications register
510 memory for locally accessed data buffers. Data buffers used in
511 send and receive operations and as the source buffer for RMA and
512 atomic operations must be registered by the application for ac‐
513 cess domains opened with this capability. This flag is defined
514 for compatibility and is ignored if the application version is
515 1.5 or later and the domain mr_mode is set to anything other
516 than FI_MR_BASIC or FI_MR_SCALABLE. See the domain attribute
517 mr_mode fi_domain(3) and fi_mr(3).
518
519 FI_MSG_PREFIX
520 Message prefix mode indicates that an application will provide
521 buffer space in front of all message send and receive buffers
522 for use by the provider. Typically, the provider uses this
523 space to implement a protocol, with the protocol headers being
524 written into the prefix area. The contents of the prefix space
525 should be treated as opaque. The use of FI_MSG_PREFIX may im‐
526 prove application performance over certain providers by reducing
527 the number of IO vectors referenced by underlying hardware and
528 eliminating provider buffer allocation.
529
530 FI_MSG_PREFIX only applies to send and receive operations, including
531 tagged sends and receives. RMA and atomics do not require the applica‐
532 tion to provide prefix buffers. Prefix buffer space must be provided
533 with all sends and receives, regardless of the size of the transfer or
534 other transfer options. The ownership of prefix buffers is treated the
535 same as the corresponding message buffers, but the size of the prefix
536 buffer is not counted toward any message limits, including inject.
537
538 Applications that support prefix mode must supply buffer space before
539 their own message data. The size of space that must be provided is
540 specified by the msg_prefix_size endpoint attribute. Providers are re‐
541 quired to define a msg_prefix_size that is a multiple of 8 bytes. Ad‐
542 ditionally, applications may receive provider generated packets that do
543 not contain application data. Such received messages will indicate a
544 transfer size of that is equal to or smaller than msg_prefix_size.
545
546 The buffer pointer given to all send and receive operations must point
547 to the start of the prefix region of the buffer (as opposed to the pay‐
548 load). For scatter-gather send/recv operations, the prefix buffer must
549 be a contiguous region, though it may or may not be directly adjacent
550 to the payload portion of the buffer.
551
552 FI_NOTIFY_FLAGS_ONLY
553 This bit indicates that general completion flags may not be set
554 by the provider, and are not needed by the application. If
555 specified, completion flags which simply report the type of op‐
556 eration that completed (e.g. send or receive) may not be set.
557 However, completion flags that are used for remote notifications
558 will still be set when applicable. See fi_cq(3) for details on
559 which completion flags are valid when this mode bit is enabled.
560
561 FI_RESTRICTED_COMP
562 This bit indicates that the application will only share comple‐
563 tion queues and counters among endpoints, transmit contexts, and
564 receive contexts that have the same set of capability flags.
565
566 FI_RX_CQ_DATA
567 This mode bit only applies to data transfers that set FI_RE‐
568 MOTE_CQ_DATA. When set, a data transfer that carries remote CQ
569 data will consume a receive buffer at the target. This is true
570 even for operations that would normally not consume posted re‐
571 ceive buffers, such as RMA write operations.
572
574 Multiple fabric interfaces take as input either a source or destination
575 address parameter. This includes struct fi_info (src_addr and dest_ad‐
576 dr), CM calls (getname, getpeer, connect, join, and leave), and AV
577 calls (insert, lookup, and straddr). The fi_info addr_format field in‐
578 dicates the expected address format for these operations.
579
580 A provider may support one or more of the following addressing formats.
581 In some cases, a selected addressing format may need to be translated
582 or mapped into an address which is native to the fabric. See fi_av(3).
583
584 FI_ADDR_BGQ
585 Address is an IBM proprietary format that is used with their
586 Blue Gene Q systems.
587
588 FI_ADDR_EFA
589 Address is an Amazon Elastic Fabric Adapter (EFA) proprietary
590 format.
591
592 FI_ADDR_GNI
593 Address is a Cray proprietary format that is used with their GNI
594 protocol.
595
596 FI_ADDR_PSMX
597 Address is an Intel proprietary format used with their Perfor‐
598 mance Scaled Messaging protocol.
599
600 FI_ADDR_PSMX2
601 Address is an Intel proprietary format used with their Perfor‐
602 mance Scaled Messaging protocol version 2.
603
604 FI_ADDR_STR
605 Address is a formatted character string. The length and content
606 of the string is address and/or provider specific, but in gener‐
607 al follows a URI model:
608
609 address_format[://[node][:[service][/[field3]...][?[key=value][&k2=v2]...]]]
610
611 Examples: - fi_sockaddr://10.31.6.12:7471 - fi_sockad‐
612 dr_in6://[fe80::6:12]:7471 - fi_sockaddr://10.31.6.12:7471?qos=3
613
614 Since the string formatted address does not contain any provider infor‐
615 mation, the prov_name field of the fabric attribute structure should be
616 used to filter by provider if necessary.
617
618 FI_FORMAT_UNSPEC
619 FI_FORMAT_UNSPEC indicates that a provider specific address for‐
620 mat should be selected. Provider specific addresses may be pro‐
621 tocol specific or a vendor proprietary format. Applications
622 that select FI_FORMAT_UNSPEC should be prepared to treat re‐
623 turned addressing data as opaque. FI_FORMAT_UNSPEC targets apps
624 which make use of an out of band address exchange. Applications
625 which use FI_FORMAT_UNSPEC may use fi_getname() to obtain a
626 provider specific address assigned to an allocated endpoint.
627
628 FI_SOCKADDR
629 Address is of type sockaddr. The specific socket address format
630 will be determined at run time by interfaces examining the
631 sa_family field.
632
633 FI_SOCKADDR_IB
634 Address is of type sockaddr_ib (defined in Linux kernel source)
635
636 FI_SOCKADDR_IN
637 Address is of type sockaddr_in (IPv4).
638
639 FI_SOCKADDR_IN6
640 Address is of type sockaddr_in6 (IPv6).
641
642 FI_ADDR_PSMX
643 Address is an Intel proprietary format that is used with their
644 PSMX (extended performance scaled messaging) protocol.
645
647 The operation of the fi_getinfo call may be controlled through the use
648 of input flags. Valid flags include the following.
649
650 FI_NUMERICHOST
651 Indicates that the node parameter is a numeric string represen‐
652 tation of a fabric address, such as a dotted decimal IP address.
653 Use of this flag will suppress any lengthy name resolution pro‐
654 tocol.
655
656 FI_PROV_ATTR_ONLY
657 Indicates that the caller is only querying for what providers
658 are potentially available. All providers will return exactly
659 one fi_info struct, regardless of whether that provider is us‐
660 able on the current platform or not. The returned fi_info
661 struct will contain default values for all members, with the ex‐
662 ception of fabric_attr. The fabric_attr member will have the
663 prov_name and prov_version values filled in.
664
665 FI_SOURCE
666 Indicates that the node and service parameters specify the local
667 source address to associate with an endpoint. If specified, ei‐
668 ther the node and/or service parameter must be non-NULL. This
669 flag is often used with passive endpoints.
670
672 fi_getinfo() returns 0 on success. On error, fi_getinfo() returns a
673 negative value corresponding to fabric errno. Fabric errno values are
674 defined in rdma/fi_errno.h.
675
676 fi_allocinfo() returns a pointer to a new fi_info structure on success,
677 or NULL on error. fi_dupinfo() duplicates a single fi_info structure
678 and all the substructures within it, returning a pointer to the new
679 fi_info structure on success, or NULL on error. Both calls require
680 that the returned fi_info structure be freed via fi_freeinfo().
681
683 FI_EBADFLAGS
684 The specified endpoint or domain capability or operation flags
685 are invalid.
686
687 FI_ENODATA
688 Indicates that no providers could be found which support the re‐
689 quested fabric information.
690
691 FI_ENOMEM
692 Indicates that there was insufficient memory to complete the op‐
693 eration.
694
696 If hints are provided, the operation will be controlled by the values
697 that are supplied in the various fields (see section on fi_info). Ap‐
698 plications that require specific communication interfaces, domains, ca‐
699 pabilities or other requirements, can specify them using fields in
700 hints. Libfabric returns a linked list in info that points to a list
701 of matching interfaces. info is set to NULL if there are no communica‐
702 tion interfaces or none match the input hints.
703
704 If node is provided, fi_getinfo will attempt to resolve the fabric ad‐
705 dress to the given node. If node is not provided, fi_getinfo will at‐
706 tempt to resolve the fabric addressing information based on the provid‐
707 ed hints. The caller must call fi_freeinfo to release fi_info struc‐
708 tures returned by fi_getinfo.
709
710 If neither node, service or hints are provided, then fi_getinfo simply
711 returns the list all available communication interfaces.
712
713 Multiple threads may call fi_getinfo simultaneously, without any re‐
714 quirement for serialization.
715
717 fi_open(3), fi_endpoint(3), fi_domain(3), fi_nic(3)
718
720 OpenFabrics.
721
722
723
724Libfabric Programmer's Manual 2020-04-14 fi_getinfo(3)