RDMA_CREATE_SRQ(3)
π RDMA_CREATE_SRQ π
okay bestie, welcome to the rdma_create_srq page, straight out of the Librdmacm Programmer's Manual (that's the RDMA_CREATE_SRQ(3) one, section 3, iykyk). grab a strawberry π and let's allocate a whole shared receive queue together, it's giving infrastructure era.
β¨ NAME β¨
rdma_create_srq β allocate a shared receive queue. that's it, that's the whole job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
#include <rdma/rdma_verbs.h>
int rdma_create_srq (struct rdma_cm_id *id, struct ibv_pd *pd, struct
ibv_srq_init_attr *attr);
look at her. three arguments. immaculate. π
π¦ ARGUMENTS π¦
idβ the RDMA identifier. your main character β¨pdβ optional protection domain for the SRQ. optional!! she can show up or she can ghost π«Άattrβ the initial SRQ attributes. the starting vibe, if you will.
π DESCRIPTION π
Allocate a SRQ (that's a shared receive queue, bestie, keep up π) associated with the specified rdma_cm_id.
literally that's the whole thing. she allocates, she associates, she slays.
π₯ RETURN VALUE π₯
Returns 0 on success, or -1 on error. and if an error occurs, errno will be set to indicate the failure reason. so if things go sideways, errno is the friend who tells you what actually happened, no cap π
π NOTES π
bestie, read this part, it's important, I'm not being dramatic (I'm being a little dramatic).
The rdma_cm_id must be bound to a local RDMA device before calling this function, and the protection domain, if provided, must be for that same device. like, they have to match, they have to be a matched set, it's giving soulmates only. π
After being allocated, the SRQ will be ready to handle posting of receives. so she's immediately employed, immediately booked and busy β¨
π the pd-is-NULL situation
If a protection domain is not given β pd parameter is NULL β then the rdma_cm_id will be created using a default protection domain. One default protection domain is allocated per RDMA device. so like, the universe provides one for each device, no need to bring your own π§
π the attr situation
The initial SRQ attributes are specified by the attr parameter. The ext.xrc.cq fields in the ibv_srq_init_attr is optional.
If a completion queue is not specified for an XRC SRQ, then a CQ will be allocated by the rdma_cm for the SRQ, along with corresponding completion channels. Completion channels and CQ data created by the rdma_cm are exposed to the user through the rdma_cm_id structure. so she handles the CQ admin herself and then shows you the receipts through rdma_cm_id π¬
β the attr-comes-back situation
The actual capabilities and properties of the created SRQ will be returned to the user through the attr parameter. so attr is a two-way street, she goes in with your wishes and comes back with the truth.
π¨ and this one, bestie: an rdma_cm_id may only be associated with a single SRQ. one. uno. monogamy only, no situationships π
π SEE ALSO π
rdma_bind_addr(3)rdma_resolve_addr(3)rdma_create_ep(3)rdma_destroy_srq(3)ibv_create_srq(3)ibv_create_xsrq(3)
go read those too, they're all part of the same friend group π«Ά
librdmacm, dated 2011-06-15 β yeah she's an elder but she ATE and she's still iconic, periodt. π β¨π
π¦ 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