IBV_MODIFY_QP_RATE_LIMIT(3)
β¨ IBV_MODIFY_QP_RATE_LIMIT(3) β¨
okay bestie, welcome to the Libibverbs Programmer's Manual π this one's all about ibv_modify_qp_rate_limit, and ngl it's kind of a slay once you get it.
πΈ NAME πΈ
ibv_modify_qp_rate_limit β modify the send rate limits attributes of a queue pair (QP) π
π¦ SYNOPSIS π¦
#include <infiniband/verbs.h>
int ibv_modify_qp_rate_limit(struct ibv_qp *qp, struct ibv_qp_rate_limit_attr *attr);
β¨ DESCRIPTION β¨
So like, ibv_modify_qp_rate_limit() does exactly what it says on the tin: it modifies the send rate limiting packet pacing attributes of the QP qp using the attributes you pass in attr. The attr argument is an ibv_qp_rate_limit_attr struct, as defined in <infiniband/verbs.h>. periodt.
The rate_limit is literally the MAX send rate this QP will send, as long as the link is not blocked and there are work requests sitting in the send queue. no cap.
You want finer control for shaping the rate limit of a QP? iconic, that's what max_burst_sz (single burst max bytes size) and typical_pkt_sz (typical packet bytes size) are for. π These let the device adjust the inter-burst gap delay that's needed to correctly shape the scheduling of sends to the wire, so you can actually reach the requested application requirements. it's giving precision.
Setting a value of 0 for max_burst_sz or typical_pkt_sz will use the device's defaults. and just so you know, typical_pkt_sz will default to the port's MTU value. π«Ά
struct ibv_qp_rate_limit_attr {
uint32_t rate_limit; /* kbps */
uint32_t max_burst_sz; /* bytes */
uint16_t typical_pkt_sz; /* bytes */
};
β RETURN VALUE β
ibv_modify_qp_rate_limit() returns 0 on success π, or the value of errno on failure (which indicates the failure reason). π
π ERRORS π
EINVAL
Invalid arguments. π
EOPNOTSUPP
Function is not implemented for this device. (Heads up: ENOSYS may sometimes be returned by old versions of libibverbs.) π
π SEE ALSO π
ibv_create_qp(3), ibv_destroy_qp(3), ibv_modify_qp(3), ibv_query_qp(3)
π§ AUTHORS π§
Alex Rosenbaum <alexr@mellanox.com>
Bodong Wang <bodong@mellanox.com>
and that's the whole vibe, bestie π«Ά this page came to you from libibverbs, dated 2018-01-09 β go forth and rate-limit responsibly, mwah π πΈ
π¦ 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