RDMA_ACCEPT(3)
β¨ rdma_accept β the "yes bestie, come in" of the CM world β¨
okay so this is a page from the Librdmacm Programmer's Manual β it's RDMA_ACCEPT(3), and it's literally the function that says "omg hi, you're accepted" to a connection request π
πΈ NAME πΈ
rdma_accept β called to accept a connection request.
(that's it. that's the whole job. iconic behavior fr fr π)
π¦ SYNOPSIS π¦
#include <rdma/rdma_cma.h>
int rdma_accept (struct rdma_cm_id *id, struct rdma_conn_param
*conn_param);
π ARGUMENTS π
idβ the connection identifier associated with the request. it's giving "who's knocking at my door" energy πͺconn_paramβ the info you need to establish the connection. scroll down to CONNECTION PROPERTIES for the deets, bestie π
π DESCRIPTION π
You call this from the listening side to accept a connection, or a datagram service lookup request. that's the vibe. that's the whole thing π«Ά
β RETURN VALUE β
- Returns
0on success β¨ - Returns
-1on error π and if that happens,errnogets set to tell you why it went wrong.
π NOTES π
okay this is the part where it is NOT like the socket accept routine, and you need to hear me on this one:
rdma_acceptis not called on a listeningrdma_cm_id. nope. not the move.- Instead: after you call
rdma_listen, you wait for anRDMA_CM_EVENT_CONNECT_REQUESTevent to show up. - Those connection request events hand you a newly created
rdma_cm_idβ kinda like how a new socket shows up β except thisrdma_cm_idis bound to a specific RDMA device π§ - Then, and only then,
rdma_acceptgets called on the newrdma_cm_id.
so: listen β wait for event β accept on the new id. periodt π
π CONNECTION PROPERTIES π
These are the properties that configure the communication, and you pass them through the conn_param parameter when you're accepting a connection or datagram communication request.
bestie listen β you should use therdma_conn_paramvalues reported in the connection request event to figure out what values make sense here when accepting. you can either reference therdma_conn_paramstructure in the connection event directly, or bring your own structure. BUT: if you reference therdma_conn_paramstructure from an event, that event must not be acked until after this call returns. no cap, that's a real rule π
And if conn_param is NULL? Then the values reported in the connection request event get used, adjusted down based on local hardware restrictions. easy.
private_dataβ references a user-controlled data buffer. the contents get copied and transparently passed to the remote side as part of the communication request. may beNULLifprivate_dataisn't required πprivate_data_lenβ the size of that user-controlled data buffer. note that the actual amount of data transferred to the remote side is transport dependent and may be larger than what you requested πresponder_resourcesβ the max number of outstanding RDMA read and atomic operations that the local side will accept from the remote side. applies only toRDMA_PS_TCP. this value must be less than or equal to the local RDMA device attributemax_qp_rd_atom, but preferably greater than or equal to theresponder_resourcesvalue reported in the connect request event.initiator_depthβ the max number of outstanding RDMA read and atomic operations that the local side will have to the remote side. applies only toRDMA_PS_TCP. this value must be less than or equal to the local RDMA device attributemax_qp_init_rd_atomand theinitiator_depthvalue reported in the connect request event.flow_controlβ specifies if hardware flow control is available. this value is exchanged with the remote peer and is not used to configure the QP. applies only toRDMA_PS_TCP.retry_countβ this value is ignored. yeah. nothing. move along πrnr_retry_countβ the max number of times that a send operation from the remote peer should be retried on a connection after receiving a receiver not ready (RNR) error. RNR errors are generated when a send request arrives before a buffer has been posted to receive the incoming data. applies only toRDMA_PS_TCP.srqβ specifies if the QP associated with the connection is using a shared receive queue. this field is ignored by the library if a QP has been created on therdma_cm_id. applies only toRDMA_PS_TCP.qp_numβ specifies the QP number associated with the connection. this field is ignored by the library if a QP has been created on therdma_cm_id.
π₯ INFINIBAND SPECIFIC π₯
on top of all the connection properties above, InfiniBand QPs also get configured with a minimum RNR NAK timer and local ACK timeout value. here's the tea:
- The minimum RNR NAK timer value is set to
0, for a delay of655 ms. - The local ACK timeout is calculated based on the packet lifetime and local HCA ACK delay.
- The packet lifetime is determined by the InfiniBand Subnet Administrator and is part of the route (path record) information obtained by the active side of the connection.
- The HCA ACK delay is a property of the locally used HCA.
Also, the RNR retry count is a 3-bit value. tiny but mighty β¨
And the length of the private data provided by the user is limited to 196 bytes for RDMA_PS_TCP, or 136 bytes for RDMA_PS_UDP. don't overdo it bestie, there's a limit π«Ά
π SEE ALSO π
and that's the whole page, bestie!! this one's from librdmacm, dated 2014-05-27 β go forth and accept those connections, you absolute main character πβ¨π¦
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- arch rolling: rdma-core 65.0-1 Β· GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-MIT AND GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-FreeBSD AND GPL-2.0-or-later OR LicenseRef-Intel-BSD-3-Clause AND GPL-2.0-or-later OR LicenseRef-PathScale-BSD-Patent-License AND CC0-1.0 AND MIT AND BSD-2-Clause AND CPL-1.0 OR BSD-2-Clause OR GPL-2.0-or-later
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- debian bookworm: librdmacm-dev 44.0-2 Β· BSD-MIT OR GPL-2.0-only
- debian trixie: librdmacm-dev 56.1-1 Β· BSD-MIT OR GPL-2.0-only
- fedora 43: rdma-core-devel 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 43: rdma-core-devel 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixos 26.05: rdma-core 62.0
- nixpkgs unstable: rdma-core 65.0
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- ubuntu jammy: librdmacm-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: librdmacm-dev 50.0-2build2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: librdmacm-dev 50.0-2ubuntu0.2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu questing: librdmacm-dev 56.1-1ubuntu1
- ubuntu resolute: librdmacm-dev 61.0-2ubuntu3 Β· BSD-MIT OR GPL-2.0-only
- ubuntu stonking: librdmacm-dev 64.0-1ubuntu1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms