RDMA_CREATE_EP(3)
π RDMA_CREATE_EP π
okay bestie, sit down, hydrate, and let me tell you about rdma_create_ep from the librdmacm programmer's manual, section 3. it's giving "build me an identifier" and honestly? it ate. π«Ά
β¨ NAME β¨
rdma_create_ep β allocate a communication identifier and, like, optionally a QP too. two-for-one, no cap.
β¨ SYNOPSIS β¨
#include <rdma/rdma_cma.h>
int rdma_create_ep (struct rdma_cm_id **id, struct rdma_addrinfo *res,
struct ibv_pd *pd, struct ibv_qp_init_attr *qp_init_attr);
β¨ ARGUMENTS β¨
idβ a reference where the allocated communication identifier gets returned. it's a pointer-to-a-pointer situation, main character energy, you hand it a spot and it fills the spot πresβ address information associated with therdma_cm_id, and you got it fromrdma_getaddrinfo. yep, that one.pdβ optional protection domain, but only if a QP is associated with therdma_cm_id. optional means optional, bestie.qp_init_attrβ optional initial QP attributes. also optional. we love a chill parameter. πΈ
β¨ DESCRIPTION β¨
creates an identifier that's used to track communication information. that's the whole vibe. β¨
β¨ RETURN VALUE β¨
returns 0 on success, or -1 on error. and if an error happens, errno gets set to tell you the failure reason, so like, read it, don't ignore it π
β¨ NOTES β¨
after you resolve address info with rdma_getaddrinfo, you can use this call to allocate an rdma_cm_id based on the results. cute, right?
if the rdma_cm_id is gonna be used on the active side of a connection β meaning res->ai_flag does not have RAI_PASSIVE set β then rdma_create_ep will automatically create a QP on the rdma_cm_id if qp_init_attr is not NULL. the QP gets associated with the protection domain you specified, if you provided one, or with a default protection domain if you didn't. for the details on how pd and qp_init_attr actually work, go peek at rdma_create_qp, okay? after calling rdma_create_ep, the returned rdma_cm_id may be connected by calling rdma_connect. and here's the slay: on the active side, the calls rdma_resolve_addr and rdma_resolve_route are not necessary. we skipped a whole step. iconic. π
if the rdma_cm_id is gonna be used on the passive side of a connection β indicated by res->ai_flag having RAI_PASSIVE set β then this call will save the pd and qp_init_attr parameters you gave it. then, when a new connection request is retrieved by calling rdma_get_request, the rdma_cm_id associated with that new connection will automatically be associated with a QP using those pd and qp_init_attr parameters. after calling rdma_create_ep, the returned rdma_cm_id may be placed into a listening state by immediately calling rdma_listen. and on the passive side, the call rdma_bind_addr is not necessary. connection requests may then be retrieved by calling rdma_get_request. look at the pipeline go π¦
the newly created rdma_cm_id will be set to use synchronous operation. if you want asynchronous operation, you have to migrate the rdma_cm_id to a user created event channel using rdma_migrate_id. no shortcuts, bestie.
π¨ IMPORTANT: users must release the createdrdma_cm_idby callingrdma_destroy_ep. don't just leave it there, that's not the vibe, that's a leak π
β¨ SEE ALSO β¨
rdma_cm(7)rdma_getaddrinfo(3)rdma_create_event_channel(3)rdma_connect(3)rdma_listen(3)rdma_destroy_ep(3)rdma_migrate_id(3)
librdmacm wrote this one down on 2010-07-19, and that's the whole page, page RDMA_CREATE_EP(3) β periodt. go build something, you've got this πβ¨π
π¦ 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