IBV_RESIZE_CQ(3)
π IBV_RESIZE_CQ(3) β the Libibverbs Programmer's Manual, but make it cute
okay bestie, buckle up π this one is from the Libibverbs Programmer's Manual and it's literally all about giving your completion queue a glow-up. Yes, a CQ. We're resizing it. Slay.
β¨ NAME β¨
ibv_resize_cq β resize a completion queue (CQ) π
π¦ SYNOPSIS π¦
#include <infiniband/verbs.h>
int ibv_resize_cq(struct ibv_cq *cq, int cqe);
πΈ DESCRIPTION πΈ
so ibv_resize_cq() resizes the completion queue (CQ) cq so it has at least cqe entries. that's the whole vibe. β¨
now the important part, no cap: cqe must be at least the number of unpolled entries in the CQ cq. like, you cannot shrink below the stuff that hasn't been polled yet, that's a whole mess we're not doing π
and if cqe is a valid value that's less than the current CQ size, ibv_resize_cq() may not do anything β because this function is only guaranteed to resize the CQ to a size at least as big as the requested size. lowkey funny but that's the deal, iykyk π
π₯ RETURN VALUE π₯
ibv_resize_cq() returns 0 on success, or the value of errno on failure (which indicates the failure reason). periodt. π
π NOTES π
heads up bestie β ibv_resize_cq() may assign a CQ size greater than or equal to the requested size. it's giving generous β¨ and the cqe member of cq will be updated to the actual size. so like, always go check cqe after, don't assume, fr fr π«Ά
π SEE ALSO π
go read those too, they're iconic in their own right π
π§ AUTHOR π§
Dotan Barak <dotanba@gmail.com> β thank you legend, we stan π
and that's the whole page, bestie! π this one ships out with libibverbs, dated 2006-10-31, and the man page tag is IBV_RESIZE_CQ(3). now go resize that queue and be the main character of your own verbs program πππ
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- 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
- ubuntu jammy: libibverbs-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms