IBV_POST_SRQ_OPS(3)
π IBV_POST_SRQ_OPS π
okay bestie, so this is a page from the Libibverbs Programmer's Manual β IBV_POST_SRQ_OPS(3) β and it's genuinely so much cooler than the name makes it sound, i promise. grab a snack, we're doing tag matching SRQ config today. π
β¨ NAME β¨
ibv_post_srq_ops β do a lil series of configuration manipulations on a special shared receive queue (SRQ). yes, special. main character SRQ. π
πΈ SYNOPSIS πΈ
#include <infiniband/verbs.h>
int ibv_post_srq_ops(struct ibv_srq *srq, struct ibv_ops_wr *wr,
struct ibv_ops_wr **bad_wr);
π¦ DESCRIPTION π¦
so ibv_post_srq_ops() performs a whole series of offload configuration manipulations on special types of SRQ, and that SRQ is srq. right now it's used to configure a tag matching SRQ. the series of configuration operations is defined by a linked list of struct ibv_ops_wr elements, starting from wr. it's giving... linked list energy. π
struct ibv_ops_wr {
uint64_t wr_id; /* User defined WR ID */
/* Pointer to next WR in list, NULL if last WR */
struct ibv_ops_wr *next;
enum ibv_ops_wr_opcode opcode; /* From enum ibv_ops_wr_opcode */
int flags; /* From enum ibv_ops_flags */
struct {
/* Number of unexpected messages
* handled by SW */
uint32_t unexpected_cnt;
/* Input parameter for the DEL opcode
* and output parameter for the ADD opcode */
uint32_t handle;
struct {
uint64_t recv_wr_id; /* User defined WR ID for TM_RECV */
struct ibv_sge *sg_list; /* Pointer to the s/g array */
int num_sge; /* Size of the s/g array */
uint64_t tag;
uint64_t mask; /* Incoming message considered matching if
TMH.tag & entry.mask == entry.tag */
} add;
} tm;
};
the first part of struct ibv_ops_wr keeps that classic ibv_send_wr notion, okay? opcode defines the operation to perform. currently supported values are IBV_WR_TAG_ADD, IBV_WR_TAG_DEL and IBV_WR_TAG_SYNC. detailed description is right below, don't worry bestie. π
to allow reliable data delivery, the TM SRQ maintains a special low level synchronization primitive β phase synchronization. receive side message handling is literally two concurrent activities: posting tagged buffers by SW, and receiving incoming messages by HW. this process is considered coherent only if all unexpected messages received by HW are completely processed in SW. to pass the number of processed unexpected messages to hardware, use the unexpected_cnt field and set the IBV_OPS_TM_SYNC flag. π«Ά
to request a WC for tag list operations, pass the IBV_OPS_SIGNALED flags. in that case a WC will be generated on the TM SRQ's CQ, and the provided wr_id will identify that WC. β¨
opcode IBV_WR_TAG_ADD is used to add a tag entry to the tag matching list. a tag entry consists of:
- the SGE list
tag&mask(the matching parameters)- a user specified opaque
wr_id(passed via therecv_wr_idfield) - and it's uniquely identified by
handle(returned by the driver)
the size of the tag matching list is limited by max_num_tags, and the SGE list size is limited by max_sge. no cap. π
opcode IBV_WR_TAG_DEL removes a previously added tag entry. the handle field should be set to the value returned by a previously performed IBV_WR_TAG_ADD operation. heads up though: the operation may fail due to concurrent tag consumption β in that case IBV_WC_TM_ERR status will be returned in the WC. π
opcode IBV_WR_TAG_SYNC may be used if no changes to the matching list are required, just to update the unexpected messages counter. lowkey the chill one. π
the IBV_WC_TM_SYNC_REQ flag returned in a list operation WC shows that counter synchronization is required. this flag may also be returned by an unexpected receive WC, asking for an IBV_WR_TAG_SYNC operation to keep TM coherence consistency. π₯
β RETURN VALUE β
ibv_post_srq_ops() returns 0 on success, or the value of errno on failure (which indicates the failure reason). so if it's not zero, that's the universe telling you why. π
π SEE ALSO π
π AUTHORS π
- Artemy Kovalyov
<artemyko@mellanox.com>
and that's the whole page bestie, you ate that fr fr π
β¨ this was libibverbs, dated 2017-03-26 β iconic behavior honestly, go forth and post those SRQ ops π¦πΈ
π¦ 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