1fi_getinfo(3) Libfabric v1.17.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_AV_USER_ID
249 Requests that the provider support the association of a user
250 specified identifier with each address vector (AV) address. Us‐
251 er identifiers are returned with completion data in place of the
252 AV address. See [fi_av(3)] (fi_av.3.html) for more details.
253
254 FI_COLLECTIVE
255 Requests support for collective operations. Endpoints that sup‐
256 port this capability support the collective operations defined
257 in fi_collective(3).
258
259 FI_DIRECTED_RECV
260 Requests that the communication endpoint use the source address
261 of an incoming message when matching it with a receive buffer.
262 If this capability is not set, then the src_addr parameter for
263 msg and tagged receive operations is ignored.
264
265 FI_FENCE
266 Indicates that the endpoint support the FI_FENCE flag on data
267 transfer operations. Support requires tracking that all previ‐
268 ous transmit requests to a specified remote endpoint complete
269 prior to initiating the fenced operation. Fenced operations are
270 often used to enforce ordering between operations that are not
271 otherwise guaranteed by the underlying provider or protocol.
272
273 FI_HMEM
274 Specifies that the endpoint should support transfers to and from
275 device memory.
276
277 FI_LOCAL_COMM
278 Indicates that the endpoint support host local communication.
279 This flag may be used in conjunction with FI_REMOTE_COMM to in‐
280 dicate that local and remote communication are required. If
281 neither FI_LOCAL_COMM or FI_REMOTE_COMM are specified, then the
282 provider will indicate support for the configuration that mini‐
283 mally affects performance. Providers that set FI_LOCAL_COMM but
284 not FI_REMOTE_COMM, for example a shared memory provider, may
285 only be used to communication between processes on the same sys‐
286 tem.
287
288 FI_MSG Specifies that an endpoint should support sending and receiving
289 messages or datagrams. Message capabilities imply support for
290 send and/or receive queues. Endpoints supporting this capabili‐
291 ty support operations defined by struct fi_ops_msg.
292
293 The caps may be used to specify or restrict the type of messaging oper‐
294 ations that are supported. In the absence of any relevant flags,
295 FI_MSG implies the ability to send and receive messages. Applications
296 can use the FI_SEND and FI_RECV flags to optimize an endpoint as send-
297 only or receive-only.
298
299 FI_MULTICAST
300 Indicates that the endpoint support multicast data transfers.
301 This capability must be paired with FI_MSG. Applications can
302 use FI_SEND and FI_RECV to optimize multicast as send-only or
303 receive-only.
304
305 FI_MULTI_RECV
306 Specifies that the endpoint must support the FI_MULTI_RECV flag
307 when posting receive buffers.
308
309 FI_NAMED_RX_CTX
310 Requests that endpoints which support multiple receive contexts
311 allow an initiator to target (or name) a specific receive con‐
312 text as part of a data transfer operation.
313
314 FI_READ
315 Indicates that the user requires an endpoint capable of initiat‐
316 ing reads against remote memory regions. This flag requires
317 that FI_RMA and/or FI_ATOMIC be set.
318
319 FI_RECV
320 Indicates that the user requires an endpoint capable of receiv‐
321 ing message data transfers. Message transfers include base mes‐
322 sage operations as well as tagged message functionality.
323
324 FI_REMOTE_COMM
325 Indicates that the endpoint support communication with endpoints
326 located at remote nodes (across the fabric). See FI_LOCAL_COMM
327 for additional details. Providers that set FI_REMOTE_COMM but
328 not FI_LOCAL_COMM, for example NICs that lack loopback support,
329 cannot be used to communicate with processes on the same system.
330
331 FI_REMOTE_READ
332 Indicates that the user requires an endpoint capable of receiv‐
333 ing read memory operations from remote endpoints. This flag re‐
334 quires that FI_RMA and/or FI_ATOMIC be set.
335
336 FI_REMOTE_WRITE
337 Indicates that the user requires an endpoint capable of receiv‐
338 ing write memory operations from remote endpoints. This flag
339 requires that FI_RMA and/or FI_ATOMIC be set.
340
341 FI_RMA Specifies that the endpoint should support RMA read and write
342 operations. Endpoints supporting this capability support opera‐
343 tions defined by struct fi_ops_rma. In the absence of any rele‐
344 vant flags, FI_RMA implies the ability to initiate and be the
345 target of remote memory reads and writes. Applications can use
346 the FI_READ, FI_WRITE, FI_REMOTE_READ, and FI_REMOTE_WRITE flags
347 to restrict the types of RMA operations supported by an end‐
348 point.
349
350 FI_RMA_EVENT
351 Requests that an endpoint support the generation of completion
352 events when it is the target of an RMA and/or atomic operation.
353 This flag requires that FI_REMOTE_READ and/or FI_REMOTE_WRITE be
354 enabled on the endpoint.
355
356 FI_RMA_PMEM
357 Indicates that the provider is `persistent memory aware' and
358 supports RMA operations to and from persistent memory. Persis‐
359 tent memory aware providers must support registration of memory
360 that is backed by non- volatile memory, RMA transfers to/from
361 persistent memory, and enhanced completion semantics. This flag
362 requires that FI_RMA be set. This capability is experimental.
363
364 FI_SEND
365 Indicates that the user requires an endpoint capable of sending
366 message data transfers. Message transfers include base message
367 operations as well as tagged message functionality.
368
369 FI_SHARED_AV
370 Requests or indicates support for address vectors which may be
371 shared among multiple processes.
372
373 FI_SOURCE
374 Requests that the endpoint return source addressing data as part
375 of its completion data. This capability only applies to connec‐
376 tionless endpoints. Note that returning source address informa‐
377 tion may require that the provider perform address translation
378 and/or look-up based on data available in the underlying proto‐
379 col in order to provide the requested data, which may adversely
380 affect performance. The performance impact may be greater for
381 address vectors of type FI_AV_TABLE.
382
383 FI_SOURCE_ERR
384 Must be paired with FI_SOURCE. When specified, this requests
385 that raw source addressing data be returned as part of comple‐
386 tion data for any address that has not been inserted into the
387 local address vector. Use of this capability may require the
388 provider to validate incoming source address data against ad‐
389 dresses stored in the local address vector, which may adversely
390 affect performance.
391
392 FI_TAGGED
393 Specifies that the endpoint should handle tagged message trans‐
394 fers. Tagged message transfers associate a user-specified key
395 or tag with each message that is used for matching purposes at
396 the remote side. Endpoints supporting this capability support
397 operations defined by struct fi_ops_tagged. In the absence of
398 any relevant flags, FI_TAGGED implies the ability to send and
399 receive tagged messages. Applications can use the FI_SEND and
400 FI_RECV flags to optimize an endpoint as send-only or receive-
401 only.
402
403 FI_TRIGGER
404 Indicates that the endpoint should support triggered operations.
405 Endpoints support this capability must meet the usage model as
406 described by fi_trigger(3).
407
408 FI_VARIABLE_MSG
409 Requests that the provider must notify a receiver when a vari‐
410 able length message is ready to be received prior to attempting
411 to place the data. Such notification will include the size of
412 the message and any associated message tag (for FI_TAGGED). See
413 `Variable Length Messages' in fi_msg.3 for full details. Vari‐
414 able length messages are any messages larger than an endpoint
415 configurable size. This flag requires that FI_MSG and/or
416 FI_TAGGED be set.
417
418 FI_WRITE
419 Indicates that the user requires an endpoint capable of initiat‐
420 ing writes against remote memory regions. This flag requires
421 that FI_RMA and/or FI_ATOMIC be set.
422
423 FI_XPU Specifies that the endpoint should support transfers that may be
424 initiated from heterogenous computation devices, such as GPUs.
425 This flag requires that FI_TRIGGER be set. For additional de‐
426 tails on XPU triggers see fi_trigger(3).
427
428 Capabilities may be grouped into three general categories: primary,
429 secondary, and primary modifiers. Primary capabilities must explicitly
430 be requested by an application, and a provider must enable support for
431 only those primary capabilities which were selected. Primary modifiers
432 are used to limit a primary capability, such as restricting an endpoint
433 to being send-only. If no modifiers are specified for an applicable
434 capability, all relevant modifiers are assumed. See above definitions
435 for details.
436
437 Secondary capabilities may optionally be requested by an application.
438 If requested, a provider must support the capability or fail the
439 fi_getinfo request (FI_ENODATA). A provider may optionally report non-
440 selected secondary capabilities if doing so would not compromise per‐
441 formance or security.
442
443 Primary capabilities: FI_MSG, FI_RMA, FI_TAGGED, FI_ATOMIC, FI_MULTI‐
444 CAST, FI_NAMED_RX_CTX, FI_DIRECTED_RECV, FI_VARIABLE_MSG, FI_HMEM,
445 FI_COLLECTIVE, FI_XPU
446
447 Primary modifiers: FI_READ, FI_WRITE, FI_RECV, FI_SEND, FI_REMOTE_READ,
448 FI_REMOTE_WRITE
449
450 Secondary capabilities: FI_MULTI_RECV, FI_SOURCE, FI_RMA_EVENT,
451 FI_SHARED_AV, FI_TRIGGER, FI_FENCE, FI_LOCAL_COMM, FI_REMOTE_COMM,
452 FI_SOURCE_ERR, FI_RMA_PMEM.
453
455 The operational mode bits are used to convey requirements that an ap‐
456 plication must adhere to when using the fabric interfaces. Modes spec‐
457 ify optimal ways of accessing the reported endpoint or domain. Appli‐
458 cations that are designed to support a specific mode of operation may
459 see improved performance when that mode is desired by the provider. It
460 is recommended that providers support applications that disable any
461 provider preferred modes.
462
463 On input to fi_getinfo, applications set the mode bits that they sup‐
464 port. On output, providers will clear mode bits that are not necessary
465 to achieve high-performance. Mode bits that remain set indicate appli‐
466 cation requirements for using the fabric interfaces created using the
467 returned fi_info. The set of modes are listed below. If a NULL hints
468 structure is provided, then the provider’s supported set of modes will
469 be returned in the info structure(s).
470
471 FI_ASYNC_IOV
472 Applications can reference multiple data buffers as part of a
473 single operation through the use of IO vectors (SGEs). Typical‐
474 ly, the contents of an IO vector are copied by the provider into
475 an internal buffer area, or directly to the underlying hardware.
476 However, when a large number of IOV entries are supported, IOV
477 buffering may have a negative impact on performance and memory
478 consumption. The FI_ASYNC_IOV mode indicates that the applica‐
479 tion must provide the buffering needed for the IO vectors. When
480 set, an application must not modify an IO vector of length > 1,
481 including any related memory descriptor array, until the associ‐
482 ated operation has completed.
483
484 FI_BUFFERED_RECV
485 The buffered receive mode bit indicates that the provider owns
486 the data buffer(s) that are accessed by the networking layer for
487 received messages. Typically, this implies that data must be
488 copied from the provider buffer into the application buffer.
489 Applications that can handle message processing from network al‐
490 located data buffers can set this mode bit to avoid copies. For
491 full details on application requirements to support this mode,
492 see the `Buffered Receives' section in fi_msg(3). This mode bit
493 applies to FI_MSG and FI_TAGGED receive operations.
494
495 FI_CONTEXT
496 Specifies that the provider requires that applications use
497 struct fi_context as their per operation context parameter for
498 operations that generated full completions. This structure
499 should be treated as opaque to the application. For performance
500 reasons, this structure must be allocated by the user, but may
501 be used by the fabric provider to track the operation. Typical‐
502 ly, users embed struct fi_context within their own context
503 structure. The struct fi_context must remain valid until the
504 corresponding operation completes or is successfully canceled.
505 As such, fi_context should NOT be allocated on the stack. Doing
506 so is likely to result in stack corruption that will be diffi‐
507 cult to debug. Users should not update or interpret the fields
508 in this structure, or reuse it until the original operation has
509 completed. If an operation does not generate a completion
510 (i.e. the endpoint was configured with FI_SELECTIVE_COMPLETION
511 and the operation was not initiated with the FI_COMPLETION flag)
512 then the context parameter is ignored by the fabric provider.
513 The structure is specified in rdma/fabric.h.
514
515 FI_CONTEXT2
516 This bit is similar to FI_CONTEXT, but doubles the provider’s
517 requirement on the size of the per context structure. When set,
518 this specifies that the provider requires that applications use
519 struct fi_context2 as their per operation context parameter.
520 Or, optionally, an application can provide an array of two
521 fi_context structures (e.g. struct fi_context[2]) instead. The
522 requirements for using struct fi_context2 are identical as de‐
523 fined for FI_CONTEXT above.
524
525 FI_LOCAL_MR
526 The provider is optimized around having applications register
527 memory for locally accessed data buffers. Data buffers used in
528 send and receive operations and as the source buffer for RMA and
529 atomic operations must be registered by the application for ac‐
530 cess domains opened with this capability. This flag is defined
531 for compatibility and is ignored if the application version is
532 1.5 or later and the domain mr_mode is set to anything other
533 than FI_MR_BASIC or FI_MR_SCALABLE. See the domain attribute
534 mr_mode fi_domain(3) and fi_mr(3).
535
536 FI_MSG_PREFIX
537 Message prefix mode indicates that an application will provide
538 buffer space in front of all message send and receive buffers
539 for use by the provider. Typically, the provider uses this
540 space to implement a protocol, with the protocol headers being
541 written into the prefix area. The contents of the prefix space
542 should be treated as opaque. The use of FI_MSG_PREFIX may im‐
543 prove application performance over certain providers by reducing
544 the number of IO vectors referenced by underlying hardware and
545 eliminating provider buffer allocation.
546
547 FI_MSG_PREFIX only applies to send and receive operations, including
548 tagged sends and receives. RMA and atomics do not require the applica‐
549 tion to provide prefix buffers. Prefix buffer space must be provided
550 with all sends and receives, regardless of the size of the transfer or
551 other transfer options. The ownership of prefix buffers is treated the
552 same as the corresponding message buffers, but the size of the prefix
553 buffer is not counted toward any message limits, including inject.
554
555 Applications that support prefix mode must supply buffer space before
556 their own message data. The size of space that must be provided is
557 specified by the msg_prefix_size endpoint attribute. Providers are re‐
558 quired to define a msg_prefix_size that is a multiple of 8 bytes. Ad‐
559 ditionally, applications may receive provider generated packets that do
560 not contain application data. Such received messages will indicate a
561 transfer size of that is equal to or smaller than msg_prefix_size.
562
563 The buffer pointer given to all send and receive operations must point
564 to the start of the prefix region of the buffer (as opposed to the pay‐
565 load). For scatter-gather send/recv operations, the prefix buffer must
566 be a contiguous region, though it may or may not be directly adjacent
567 to the payload portion of the buffer.
568
569 FI_NOTIFY_FLAGS_ONLY
570 This bit indicates that general completion flags may not be set
571 by the provider, and are not needed by the application. If
572 specified, completion flags which simply report the type of op‐
573 eration that completed (e.g. send or receive) may not be set.
574 However, completion flags that are used for remote notifications
575 will still be set when applicable. See fi_cq(3) for details on
576 which completion flags are valid when this mode bit is enabled.
577
578 FI_RESTRICTED_COMP
579 This bit indicates that the application will only share comple‐
580 tion queues and counters among endpoints, transmit contexts, and
581 receive contexts that have the same set of capability flags.
582
583 FI_RX_CQ_DATA
584 This mode bit only applies to data transfers that set FI_RE‐
585 MOTE_CQ_DATA. When set, a data transfer that carries remote CQ
586 data will consume a receive buffer at the target. This is true
587 even for operations that would normally not consume posted re‐
588 ceive buffers, such as RMA write operations.
589
591 Multiple fabric interfaces take as input either a source or destination
592 address parameter. This includes struct fi_info (src_addr and dest_ad‐
593 dr), CM calls (getname, getpeer, connect, join, and leave), and AV
594 calls (insert, lookup, and straddr). The fi_info addr_format field in‐
595 dicates the expected address format for these operations.
596
597 A provider may support one or more of the following addressing formats.
598 In some cases, a selected addressing format may need to be translated
599 or mapped into an address which is native to the fabric. See fi_av(3).
600
601 FI_ADDR_BGQ
602 Address is an IBM proprietary format that is used with their
603 Blue Gene Q systems.
604
605 FI_ADDR_EFA
606 Address is an Amazon Elastic Fabric Adapter (EFA) proprietary
607 format.
608
609 FI_ADDR_GNI
610 Address is a Cray proprietary format that is used with their GNI
611 protocol.
612
613 FI_ADDR_PSMX
614 Address is an Intel proprietary format used with their Perfor‐
615 mance Scaled Messaging protocol.
616
617 FI_ADDR_PSMX2
618 Address is an Intel proprietary format used with their Perfor‐
619 mance Scaled Messaging protocol version 2.
620
621 FI_ADDR_PSMX3
622 Address is an Intel proprietary format used with their Perfor‐
623 mance Scaled Messaging protocol version 3.
624
625 FI_ADDR_STR
626 Address is a formatted character string. The length and content
627 of the string is address and/or provider specific, but in gener‐
628 al follows a URI model:
629
630 address_format[://[node][:[service][/[field3]...][?[key=value][&k2=v2]...]]]
631
632 Examples: - fi_sockaddr://10.31.6.12:7471 - fi_sockad‐
633 dr_in6://[fe80::6:12]:7471 - fi_sockaddr://10.31.6.12:7471?qos=3
634
635 Since the string formatted address does not contain any provider infor‐
636 mation, the prov_name field of the fabric attribute structure should be
637 used to filter by provider if necessary.
638
639 FI_FORMAT_UNSPEC
640 FI_FORMAT_UNSPEC indicates that a provider specific address for‐
641 mat should be selected. Provider specific addresses may be pro‐
642 tocol specific or a vendor proprietary format. Applications
643 that select FI_FORMAT_UNSPEC should be prepared to treat re‐
644 turned addressing data as opaque. FI_FORMAT_UNSPEC targets apps
645 which make use of an out of band address exchange. Applications
646 which use FI_FORMAT_UNSPEC may use fi_getname() to obtain a
647 provider specific address assigned to an allocated endpoint.
648
649 FI_SOCKADDR
650 Address is of type sockaddr. The specific socket address format
651 will be determined at run time by interfaces examining the
652 sa_family field.
653
654 FI_SOCKADDR_IB
655 Address is of type sockaddr_ib (defined in Linux kernel source)
656
657 FI_SOCKADDR_IN
658 Address is of type sockaddr_in (IPv4).
659
660 FI_SOCKADDR_IN6
661 Address is of type sockaddr_in6 (IPv6).
662
663 FI_ADDR_PSMX
664 Address is an Intel proprietary format that is used with their
665 PSMX (extended performance scaled messaging) protocol.
666
668 The operation of the fi_getinfo call may be controlled through the use
669 of input flags. Valid flags include the following.
670
671 FI_NUMERICHOST
672 Indicates that the node parameter is a numeric string represen‐
673 tation of a fabric address, such as a dotted decimal IP address.
674 Use of this flag will suppress any lengthy name resolution pro‐
675 tocol.
676
677 FI_PROV_ATTR_ONLY
678 Indicates that the caller is only querying for what providers
679 are potentially available. All providers will return exactly
680 one fi_info struct, regardless of whether that provider is us‐
681 able on the current platform or not. The returned fi_info
682 struct will contain default values for all members, with the ex‐
683 ception of fabric_attr. The fabric_attr member will have the
684 prov_name and prov_version values filled in.
685
686 FI_SOURCE
687 Indicates that the node and service parameters specify the local
688 source address to associate with an endpoint. If specified, ei‐
689 ther the node and/or service parameter must be non-NULL. This
690 flag is often used with passive endpoints.
691
693 fi_getinfo() returns 0 on success. On error, fi_getinfo() returns a
694 negative value corresponding to fabric errno. Fabric errno values are
695 defined in rdma/fi_errno.h.
696
697 fi_allocinfo() returns a pointer to a new fi_info structure on success,
698 or NULL on error. fi_dupinfo() duplicates a single fi_info structure
699 and all the substructures within it, returning a pointer to the new
700 fi_info structure on success, or NULL on error. Both calls require
701 that the returned fi_info structure be freed via fi_freeinfo().
702
704 FI_EBADFLAGS
705 The specified endpoint or domain capability or operation flags
706 are invalid.
707
708 FI_ENODATA
709 Indicates that no providers could be found which support the re‐
710 quested fabric information.
711
712 FI_ENOMEM
713 Indicates that there was insufficient memory to complete the op‐
714 eration.
715
717 If hints are provided, the operation will be controlled by the values
718 that are supplied in the various fields (see section on fi_info). Ap‐
719 plications that require specific communication interfaces, domains, ca‐
720 pabilities or other requirements, can specify them using fields in
721 hints. Libfabric returns a linked list in info that points to a list
722 of matching interfaces. info is set to NULL if there are no communica‐
723 tion interfaces or none match the input hints.
724
725 If node is provided, fi_getinfo will attempt to resolve the fabric ad‐
726 dress to the given node. If node is not provided, fi_getinfo will at‐
727 tempt to resolve the fabric addressing information based on the provid‐
728 ed hints. The caller must call fi_freeinfo to release fi_info struc‐
729 tures returned by fi_getinfo.
730
731 If neither node, service or hints are provided, then fi_getinfo simply
732 returns the list all available communication interfaces.
733
734 Multiple threads may call fi_getinfo simultaneously, without any re‐
735 quirement for serialization.
736
738 fi_open(3), fi_endpoint(3), fi_domain(3), fi_nic(3) fi_trigger(3)
739
741 OpenFabrics.
742
743
744
745Libfabric Programmer’s Manual 2022-12-11 fi_getinfo(3)