ib_cq_pool_get(9)
π ib_cq_pool_get β like, the Kernel API Manual page, bestie
okay so bestie, welcome to ib_cq_pool_get(9) from the Kernel API Manual β¨ this is the one where the kernel goes shopping for a completion queue for you and honestly? she ate. no cap.
πΈ NAME πΈ
ib_cq_pool_get β finds the least used completion queue that matches a given cpu hint (or, for wild card affinity, just the least used one) and also fits nr_cqe. literally the matchmaker of CQs π«Ά
β¨ SYNOPSIS β¨
struct ib_cq * ib_cq_pool_get (struct ib_device *dev , unsigned int
nr_cqe , int comp_vector_hint , enum ib_poll_context poll_ctx );
like, that's the whole vibe. four args, one cq pointer back. periodt. π
π ARGUMENTS π
devβ the rdma device, aka the main character of this whole situation πnr_cqeβ number of needed cqe entries. like how many seats you're reserving ποΈcomp_vector_hintβ completion vector hint (-1) for the driver to assign a comp vector based on internal counter. yes,-1is the "idk you pick for me" option πpoll_ctxβ cq polling context. the vibe of the polling, if you will π
π¦ DESCRIPTION π¦
so here's the tea β β she finds a cq that satisfies the comp_vector_hint and nr_cqe requirements, and then claims entries in it for us. iconic behavior, honestly.
and if there's no available cq? no worries, she just allocates a brand new cq with those requirements and adds it to the device pool. she's resourceful like that π
β οΈ warning bestie:IB_POLL_DIRECTcannot be used for shared cqs, so it is not a valid value forpoll_ctx. do not try it. i'm begging you. π
π SEE ALSO π
- Kernel file
./drivers/infiniband/core/cq.c ib_process_cq_direct(9)__ib_alloc_cq(9)__ib_alloc_cq_any(9)ib_free_cq(9)ib_cq_pool_put(9)
go read those too, they're all part of the same friend group fr fr π§
and that's the page!! π this little gem lives in ./drivers/infiniband/core, dated October 2026, and its whole name is ib_cq_pool_get(9). mwah π go get yourself a completion queue, you deserve it. βπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms