ib_drain_qp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

ib_drain_qp(9) β€” block until all CQEs have been consumed by the application on both the RQ and SQ. It’s giving β€œwait for your bestie to finish,” but make it kernel API. From the Kernel API Manual, no cap. ✨

✨ SYNOPSIS ✨

void ib_drain_qp (struct ib_qp *qp );

πŸŽ€ ARGUMENTS πŸŽ€

  • qp β€” queue pair to drain. She’s the main character here, periodt.

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so before you even think about calling this, the caller must:

  • ensure there is room in the CQ(s), SQ, and RQ for drain work requests and completions.
  • allocate the CQs using ib_alloc_cq.
  • ensure that there are no other contexts that are posting WRs concurrently. Otherwise the drain is not guaranteed.
Bestie, that last one is not a vibe suggestion. If other contexts are posting WRs at the same time, the drain is not guaranteed. So like, don’t. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/infiniband/core/verbs.c β€” and the whole icon friend group:


xoxo bestie πŸ’… source/version is ./drivers/infiniband/core, date is October 2026, page is ib_drain_qp(9) β€” slay and drain responsibly ✨🫢

πŸ“¦ where this page comes from