__ib_alloc_cq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME

__ib_alloc_cq β€” bestie, this one allocates a completion queue ✨

This page lives in the Kernel API Manual, and it's literally all about making a CQ happen for in-kernel users 🫢


✨ SYNOPSIS

struct ib_cq * __ib_alloc_cq (struct ib_device *dev , void *private ,
       int nr_cqe , int comp_vector , enum ib_poll_context poll_ctx ,
       const char *caller );

πŸŽ€ ARGUMENTS

okay so here's the whole cast of characters, no skips, no cuts πŸ’–

  • dev β€” the device you're allocating the CQ for, like obviously πŸ¦‹
  • private β€” driver private data, and it's accessible from cq->cq_context (iykyk)
  • nr_cqe β€” the number of CQEs to allocate πŸ”₯
  • comp_vector β€” HCA completion vectors for this CQ, slay
  • poll_ctx β€” the context to poll the CQ from πŸ’…
  • caller β€” module owner name, periodt

πŸ¦‹ DESCRIPTION

So this is the proper interface to allocate a CQ for in-kernel users β€” like, the correct one, the main character one πŸ‘‘

A CQ allocated with this interface will automatically be polled from the specified context, no cap ✨

And huge heads up: the ULP must use wr->wr_cqe instead of wr->wr_id to use this CQ abstraction. Literally do not mix those up, bestie 😭


🌸 SEE ALSO


🧚 go read the kernel file if you want the lore, it's giving source material

kisses from the ./drivers/infiniband/core girlies β€” October 2026 πŸ’œπŸŽ€πŸ’–

πŸ“¦ where this page comes from