IBV_CREATE_SRQ_EX(3)
π IBV_CREATE_SRQ_EX(3) π
okay bestie, welcome to the Libibverbs Programmer's Manual β today's main character is ibv_create_srq_ex (and its little sibling ibv_destroy_srq) π
β¨ NAME β¨
ibv_create_srq_ex, ibv_destroy_srq β create or destroy a shared receive queue (SRQ) π¦
πΈ SYNOPSIS πΈ
#include <infiniband/verbs.h>
struct ibv_srq *ibv_create_srq_ex(struct ibv_context *context, struct
ibv_srq_init_attr_ex *srq_init_attr_ex);
int ibv_destroy_srq(struct ibv_srq *srq);
π DESCRIPTION π
So like, ibv_create_srq_ex() creates a shared receive queue (SRQ) that supports both basic and xrc modes. no cap. π«Ά The argument srq_init_attr_ex is an ibv_srq_init_attr_ex struct, as defined in <infiniband/verbs.h>.
struct ibv_srq_init_attr_ex {
void *srq_context; /* Associated context of the SRQ */
struct ibv_srq_attr attr; /* SRQ attributes */
uint32_t comp_mask; /* Identifies valid fields */
enum ibv_srq_type srq_type; /* Basic / XRC / tag matching */
struct ibv_pd *pd; /* PD associated with the SRQ */
struct ibv_xrcd *xrcd; /* XRC domain to associate with the SRQ */
struct ibv_cq *cq; /* CQ to associate with the SRQ for XRC mode */
struct ibv_tm_cap tm_cap; /* Tag matching attributes */
};
and the nested attr struct, she's giving structure β¨
struct ibv_srq_attr {
uint32_t max_wr; /* Requested max number of outstanding work requests (WRs) in the SRQ */
uint32_t max_sge; /* Requested max number of scatter elements per WR */
uint32_t srq_limit; /* The limit value of the SRQ */
};
plus the tag matching capabilities, iconic π
struct ibv_tm_cap {
uint32_t max_num_tags; /* Tag matching list size */
uint32_t max_ops; /* Number of outstanding tag list operations */
};
The function ibv_create_srq_ex() will update the srq_init_attr_ex struct with the original values of the SRQ that was created β and bestie, listen: the values of max_wr and max_sge will be greater than or equal to the values you requested. she might give you more than you asked for, we love a generous queen π
ibv_destroy_srq() destroys the SRQ srq. bye bye srq, you served π
π₯ RETURN VALUE π₯
ibv_create_srq_ex()returns a pointer to the created SRQ, orNULLif the request fails. πibv_destroy_srq()returns0on success, or the value oferrnoon failure (which indicates the failure reason).
β οΈ NOTES β οΈ
ibv_destroy_srq() fails if any queue pair is still associated with this SRQ. so likeβ¦ detach your QPs first, bestie, she will NOT let you leave with unfinished business π«
π SEE ALSO π
go read those too, iykyk π
π AUTHORS π
Yishai Hadas <yishaih@mellanox.com> β thank you for your service king π«‘π
and that's the whole vibe, bestie β¨ this page came from the libibverbs era, dated 2013-06-26, and it's been slaying ever since. go create some SRQs, you 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: libibverbs-dev 44.0-2 Β· BSD-MIT OR GPL-2.0-only
- debian trixie: libibverbs-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
- 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: libibverbs-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: libibverbs-dev 50.0-2build2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: libibverbs-dev 50.0-2ubuntu0.2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu questing: libibverbs-dev 56.1-1ubuntu1
- ubuntu resolute: libibverbs-dev 61.0-2ubuntu3 Β· BSD-MIT OR GPL-2.0-only
- ubuntu stonking: libibverbs-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