fi_fabric(3)
π fi_fabric β Fabric Network Operations π
okay bestie, so this is fi_fabric(3) from Libfabric v2.5.1, and it's literally the page about opening and closing fabric networks plus turning all ur fancy attributes into strings. stay with me, it's giving very much "foundational" energy π¦
β¨ NAME β¨
fi_fabric β Fabric network operations
fi_fabric / fi_close β open / close a fabric network π
fi_tostr / fi_tostr_r β convert fabric attributes, flags, and capabilities to a printable string πΈ
β¨ SYNOPSIS β¨
#include <rdma/fabric.h>
int fi_fabric(struct fi_fabric_attr *attr,
struct fid_fabric **fabric, void *context);
int fi_close(struct fid *fabric);
char * fi_tostr(const void *data, enum fi_type datatype);
char * fi_tostr_r(char *buf, size_t len, const void *data,
enum fi_type datatype);
β¨ ARGUMENTS β¨
attrβ the attributes of the fabric u wanna open, bestie.fabricβ the fabric network itself πcontextβ a user-specified context that gets associated with the opened object. it comes back to u as part of any associated asynchronous event, so like, it's not lost forever, she returns π«Άbufβ the output buffer where the string gets written.lenβ size in bytes of the memory thatbufpoints at.dataβ the input data to convert into a string. the format ofdatais decided by thedatatypeparameter, iykyk.datatypeβ tells u what data to convert to a printable string.
β¨ DESCRIPTION β¨
A fabric identifier is used to reference opened fabric resources and library related objects. icon behavior, honestly π
So the fabric network represents a collection of hardware and software resources that access a single physical or virtual network. All network ports on a system that can communicate with each other through their attached networks belong to the same fabric. a fabric network shares network addresses and can span multiple providers β yes, multiple, she's flexible β¨ And here's the important part: an application must open a fabric network prior to allocating other network resources, such as communication endpoints. no skipping steps, bestie π
π fi_fabric
Opens a fabric network provider. The attributes of the fabric provider are specified through the open call, and may be obtained by calling fi_getinfo.
π fi_close
The fi_close call is used to release all resources associated with a fabric object. And like, all items associated with the opened fabric must be released prior to calling fi_close β that's the rule, no cap. clean up ur room before u leave the house π§Ή
π fi_tostr / fi_tostr_r
Converts fabric interface attributes, capabilities, flags, and enum values into a printable string. The data parameter accepts a pointer to the attribute or value(s) to display, with the datatype parameter indicating the type of data referenced by the data parameter. Valid values for datatype are listed below, along with the corresponding datatype or field value. scroll responsibly, there's a lot π
FI_TYPE_INFOβstruct fi_info, including all substructures and fieldsFI_TYPE_EP_TYPEβstruct fi_info::typefieldFI_TYPE_CAPSβstruct fi_info::capsfieldFI_TYPE_OP_FLAGSβstruct fi_info::op_flagsfield, or generaluint64_tflagsFI_TYPE_ADDR_FORMATβstruct fi_info::addr_formatfieldFI_TYPE_TX_ATTRβstruct fi_tx_attrFI_TYPE_RX_ATTRβstruct fi_rx_attrFI_TYPE_EP_ATTRβstruct fi_ep_attrFI_TYPE_DOMAIN_ATTRβstruct fi_domain_attrFI_TYPE_FABRIC_ATTRβstruct fi_fabric_attrFI_TYPE_THREADINGβenum fi_threadingFI_TYPE_PROGRESSβenum fi_progressFI_TYPE_PROTOCOLβstruct fi_ep_attr::protocolfieldFI_TYPE_MSG_ORDERβstruct fi_ep_attr::msg_orderfieldFI_TYPE_MODEβstruct fi_info::modefieldFI_TYPE_AV_TYPEβenum fi_av_typeFI_TYPE_ATOMIC_TYPEβenum fi_datatypeFI_TYPE_ATOMIC_OPβenum fi_opFI_TYPE_VERSIONβ returns the library version of libfabric in string form. thedataparameter is ignored π«₯FI_TYPE_EQ_EVENTβuint32_tevent parameter returned fromfi_eq_read(). seefi_eq(3)for a list of known values.FI_TYPE_CQ_EVENT_FLAGSβuint64_tflags field infi_cq_xxx_entrystructures. seefi_cq(3)for valid flags.FI_TYPE_MR_MODEβstruct fi_domain_attr::mr_modeflagsFI_TYPE_OP_TYPEβenum fi_op_typeFI_TYPE_FIDβstruct fid *FI_TYPE_HMEM_IFACEβenum fi_hmem_iface *FI_TYPE_CQ_FORMATβenum fi_cq_formatFI_TYPE_LOG_LEVELβenum fi_log_levelFI_TYPE_LOG_SUBSYSβenum fi_log_subsysFI_TYPE_AV_ATTRβstruct fi_av_attrFI_TYPE_CQ_ATTRβstruct fi_cq_attrFI_TYPE_MR_ATTRβstruct fi_mr_attrFI_TYPE_CNTR_ATTRβstruct fi_cntr_attrFI_TYPE_COLLECTIVE_OPβenum fi_collective_opFI_TYPE_CQ_ERR_ENTRYβstruct fi_cq_err_entryFI_TYPE_WAIT_OBJβenum fi_wait_objFI_TYPE_CQ_WAIT_CONDβenum fi_cq_wait_cond
β οΈ okay so listen:fi_tostr()will return a pointer to an internal libfabric buffer that should not be modified, and it gets overwritten the next timefi_tostr()is invoked. alsofi_tostr()is not thread safe. so don't go touching her, and don't share her between threads, fr fr π
The fi_tostr_r() function is a re-entrant and thread safe version of fi_tostr(). It writes the string into a buffer provided by the caller. fi_tostr_r() returns the start of the caller's buffer. she's the responsible sister π
β¨ NOTES β¨
The following resources are associated with fabric domains: access domains, passive endpoints, and CM event queues. that's the whole list, bestie, no more no less π
β¨ FABRIC ATTRIBUTES β¨
The fi_fabric_attr structure defines the set of attributes associated with a fabric and a fabric provider. look at her:
struct fi_fabric_attr {
struct fid_fabric *fabric;
char *name;
char *prov_name;
uint32_t prov_version;
uint32_t api_version;
};
π¦ fabric
On input to fi_getinfo, a user may set this to an opened fabric instance to restrict output to the given fabric. On output from fi_getinfo, if no fabric was specified, but the user has an opened instance of the named fabric, this will reference the first opened instance. If no instance has been opened, this field will be NULL.
β οΈ The fabric instance returned byfi_getinfoshould only be considered valid if the application does not close any fabric instances from another thread whilefi_getinfois being processed. like, don't pull the rug out from under her mid-call π
π¦ name
A fabric identifier. short and sweet, she said what she said β¨
π¦ prov_name β Provider Name
The name of the underlying fabric provider.
To request an utility provider layered over a specific core provider, both the provider names have to be specified using ";" as delimiter.
e.g. "ofi_rxm;verbs" or "verbs;ofi_rxm"
For debugging and administrative purposes, environment variables can be used to control which fabric providers will be registered with libfabric. Specifying "FI_PROVIDER=foo,bar" will allow any providers with the names "foo" or "bar" to be registered. Similarly, specifying "FI_PROVIDER=^foo,bar" will prevent any providers with the names "foo" or "bar" from being registered. Providers which are not registered will not appear in fi_getinfo results.
β οΈ Applications which need a specific set of providers should implement their own filtering of fi_getinfo's results rather than relying on these environment variables in a production setting. bestie, the env vars are for debugging and admin vibes, not for production, iykyk π
π¦ prov_version β Provider Version
Version information for the fabric provider, in a major.minor format. The use of the FI_MAJOR() and FI_MINOR() version macros may be used to extract the major and minor version data. See fi_version(3).
In case of an utility provider layered over a core provider, the version would always refer to that of the utility provider. she said what she is and she's not changing π
π¦ api_version
The interface version requested by the application. This value corresponds to the version parameter passed into fi_getinfo(3).
β¨ RETURN VALUE β¨
Returns FI_SUCCESS on success. On error, a negative value corresponding to fabric errno is returned. Fabric errno values are defined in rdma/fi_errno.h. negative numbers are never the vibe but here we are π
β¨ ERRORS β¨
(nothing listed here, bestie β this section is literally empty in the original, so it stays empty here too π«Ά)
β¨ SEE ALSO β¨
fabric(7), fi_getinfo(3), fi_domain(3), fi_eq(3), fi_endpoint(3)
β¨ AUTHORS β¨
OpenFabrics.
okay that's the whole page and u ate that up honestly π this was the Libfabric Programmer's Manual, dated 2025-12-26, from Libfabric v2.5.1 β mwah, go open a fabric network responsibly bestie πππ¦
π¦ where this page comes from
- centos-stream 10: libfabric-devel 2.5.1-1.el10 Β· BSD-2-Clause OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms