ib_drain_qp(9)
π 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:
__ib_alloc_pd(9)ib_dealloc_pd_user(9)rdma_copy_ah_attr(9)rdma_replace_ah_attr(9)rdma_move_ah_attr(9)rdma_create_ah(9)rdma_create_user_ah(9)rdma_move_grh_sgid_attr(9)rdma_destroy_ah_attr(9)ib_create_srq_user(9)ib_create_qp_user(9)ib_resolve_eth_dmac(9)ib_modify_qp_with_udata(9)ib_alloc_mr(9)ib_alloc_mr_integrity(9)ib_alloc_xrcd_user(9)ib_dealloc_xrcd_user(9)ib_create_wq(9)ib_destroy_wq_user(9)ib_map_mr_sg_pi(9)ib_map_mr_sg(9)ib_sg_to_pages(9)ib_drain_sq(9)ib_drain_rq(9)rdma_alloc_hw_stats_struct(9)rdma_free_hw_stats_struct(9)
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
- 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