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