RDMA_CREATE_QP(3)
π RDMA_CREATE_QP(3) β the librdmacm programmer's manual, but make it cute β¨
okay bestie, sit down, hydrate, because we're allocating a Queue Pair and it's actually not that deep once you get the vibe π¦
β¨ NAME β¨
rdma_create_qp β Allocate a QP. that's it. that's the whole job. iconic behavior honestly π
πΈ SYNOPSIS πΈ
#include <rdma/rdma_cma.h>
int rdma_create_qp (struct rdma_cm_id *id, struct ibv_pd *pd, struct
ibv_qp_init_attr *qp_init_attr);
look at her. three args. she's lowkey slaying π
π ARGUMENTS π
idβ the RDMA identifier. your main character. π«pdβ optional protection domain for the QP. optional!! she can be NULL, we'll get to that π«Άqp_init_attrβ the initial QP attributes. the lewk, if you will β¨
π DESCRIPTION π
So what we're doing here is allocating a QP that's associated with the specified rdma_cm_id, and then transitioning it so it's ready for sending and receiving. that's the whole plot. no cap π
β RETURN VALUE β
Returns 0 on success, or -1 on error. and if an error happens, errno gets set to tell you why, which is genuinely so thoughtful of her π
π§ NOTES π§
- The
rdma_cm_idmust be bound to a local RDMA device before you call this function. and the protection domain has to be for that same device. periodt. π - QPs allocated to an
rdma_cm_idget automatically transitioned by the librdmacm through their states β you don't have to babysit them, she's self-sufficient π - After being allocated, the QP will be ready to handle posting of receives. and if the QP is unconnected, it'll be ready to post sends too. go off π₯
- If a protection domain is not given β like, the
pdparameter isNULLβ then therdma_cm_idwill be created using a default protection domain. and here's the tea: one default protection domain is allocated per RDMA device. one. per device. π - The initial QP attributes are specified by the
qp_init_attrparameter. thesend_cqandrecv_cqfields in theibv_qp_init_attrare optional β if you don't specify a send or receive completion queue, then a CQ will be allocated by the rdma_cm for the QP, along with corresponding completion channels. and those completion channels and CQ data created by the rdma_cm? they get exposed to the user through therdma_cm_idstructure. it's giving generous. it's giving sharing. π - The actual capabilities and properties of the created QP will be returned to you through the
qp_init_attrparameter. so check it after, bestie, she updates it in place β¨ - An
rdma_cm_idmay only be associated with a single QP. one. monogamy. no sharing, no side quests. π
π SEE ALSO π
the whole friend group. go read them too π«Ά
that's the page, babe. now go bind your id and allocate responsibly. mwah π
this has been librdmacm, dated 2007-05-15 β yes she's vintage, yes she still eats. RDMA_CREATE_QP(3) out. π
β¨
π¦ 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