fi_tcp(7)
π fi_tcp(7) β the TCP/IP girlies of libfabric
okay so real quick before we dive in: this is a page from the Libfabric programmer's manual, and it's all about the tcp provider. buckle up bestie π
β¨ NAME β¨
fi_tcp β the provider that literally just runs over TCP/IP. no cap.
π¦ OVERVIEW π¦
so the tcp provider is usable on all operation systems supported by libfabric. all of them. it runs over TCP (SOCK_STREAM) sockets, and it's got that range too β it can leverage operation specific features, like support for zero-copy and io_uring. it implements a custom protocol over TCP/IP, which is the whole thing it needs to support the libfabric communication APIs. main character energy fr π
π SUPPORTED FEATURES π
here's what it eats, in list form:
β Endpoint types
FI_EP_MSGFI_EP_RDM
β Endpoint capabilities
FI_MSGFI_RMAFI_TAGGEDFI_RMA_PMEMFI_RMA_EVENTFI_MULTI_RECVFI_DIRECTED_RECV
β Shared Rx Context
the tcp provider supports shared receive context. slay π
πΈ RUNTIME PARAMETERS πΈ
okay so the tcp provider can be configured with several environment variables. what's below is just a subset of the supported variables β for the full list, use the fi_info utility application. like, for example, fi_info -g tcp will show you all the environment variables defined for the tcp provider. iykyk π₯
FI_TCP_IFACEβ you can request a specific network interface with this one.FI_TCP_PORT_LOW_RANGE/FI_TCP_PORT_HIGH_RANGEβ these two set the range of ports thetcpprovider uses when it creates its passive endpoint. super useful when a firewall only allows a range of ports for tcp connections, ngl.FI_TCP_TX_SIZEβ the transmit context size. this is the number of transmit requests an application may post to the provider before it gets-FI_EAGAINback. default:256for msg endpoints,64kfor rdm.FI_TCP_RX_SIZEβ the receive context size, aka the number of receive buffers the application may post to the provider. default:256for msg endpoints,64kfor rdm.FI_TCP_MAX_INJECTβ the maximum size of inject messages, plus the maximum size of an unexpected message that may be buffered at the receiver. default128bytes.FI_TCP_STAGING_SBUF_SIZEβ the size of the buffer used to coalesce iovec's or send requests before posting to the kernel. the staging buffer gets used when the socket is busy and can't accept new data β in that case the data can be queued in the staging buffer until the socket resumes sending. this optimizes transferring a series of back-to-back small messages to the same target. default:9000bytes. set it to0to disable.FI_TCP_PREFETCH_RBUF_SIZEβ the size of the buffer used to prefetch received data from the kernel. when it starts receiving a new message, the provider will ask the kernel to fill the prefetch buffer and then process received data from there. this reduces the number of kernel calls needed to receive a series of small messages. default:9000bytes. set it to0to disable.FI_TCP_ZEROCOPY_SIZEβ the lower threshold where zero copy transfers will be used, if supported by the platform. set to-1to disable. default: disabled.FI_TCP_TRACE_MSGβ if enabled, it will log transport message information on all sent and received messages. must be paired withFI_LOG_LEVEL=traceto actually print the message details, bestie. πFI_TCP_IO_URINGβ usesio_uringfor socket operations if it's available, rather than going through the standard socket APIs (i.e.connect,accept,send,recv). default: disabled.
π§ CONTROL OPERATIONS π§
the tcp provider supports the following control operations (see fi_control(3)):
FI_GET_FDβ retrieves the underlying socket file descriptor associated with an active endpoint. the argument must point to an integer where the descriptor will be stored. this is how applications tune socket options that aren't exposed through the libfabric API (SO_SNDBUF,SO_RCVBUF,SO_BUSY_POLL, etc). obsessed, honestly.
π NOTES π
the tcp provider supports both msg and rdm endpoints directly. rdm endpoint support is available starting at libfabric version v1.18.0, and it comes from the merge back of the net provider found in libfabric versions v1.16 and v1.17. for compatibility with older libfabric versions, the tcp provider may be paired with the ofi_rxm provider as an alternative solution for rdm endpoint support. it is recommended that applications that do not need wire compatibility with older versions of libfabric use the rdm endpoint support directly from the tcp provider β that gives you the best performance. periodt. π₯
π SEE ALSO π
fabric(7), fi_provider(7), fi_getinfo(3)
π AUTHORS π
OpenFabrics. π
okay that's the whole thing, go forth and connect, bestie π«Ά
and that's a wrap! brought to you by the Libfabric Programmer's Manual, dated 2025-05-02, living in the Libfabric v2.5.1 era β¨ππ β see you in the group chat π
π¦ 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