ib_cq_pool_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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, -1 is 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_DIRECT cannot be used for shared cqs, so it is not a valid value for poll_ctx. do not try it. i'm begging you. 😭

🌟 SEE ALSO 🌟

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