rdma_rw_ctx_wrs(9)
π rdma_rw_ctx_wrs(9) β from the Kernel API Manual, bestie π
okay so sit down because this one is genuinely so good. we're talking rdma_rw_ctx_wrs β yes, that's the function, and this page lives in the Kernel API Manual, which is giving "docs that ate" ngl. it's a little C function that hands you back a whole chain of WRs for an RDMA READ or WRITE operation, and honestly? iconic behaviour. β¨
πΈ NAME πΈ
rdma_rw_ctx_wrs β return chain of WRs for a RDMA READ or WRITE operation π«Ά
β¨ SYNOPSIS β¨
struct ib_send_wr * rdma_rw_ctx_wrs (struct rdma_rw_ctx *ctx , struct
ib_qp *qp , u32 port_num , struct ib_cqe *cqe , struct ib_send_wr
*chain_wr );
π ARGUMENTS π
ctxβ the context to operate on π this is, like, the whole vibe you're working with.qpβ the queue pair to operate on. yes bestie, the QP. π¦port_numβ the port num to which the connection is bound πcqeβ the completion queue entry for the last WR β remember that, it matters later.chain_wrβ the WR to append to the posted chain π₯
π DESCRIPTION π
So. Here's the tea. π
rdma_rw_ctx_wrs returns the WR chain for the set of RDMA READ/WRITE operations described by ctx, plus any memory registration operations that are needed. like, it's not just giving you the WRs of the operations themselves β it's also handling the memory-registration errands that go with them. no cap. π
important bestie moment π: if chain_wr is non-NULL, the WR it points to will be appended to the chain of WRs posted.
And if chain_wr is not set, then cqe must be set β otherwise the caller never gets a completion notification, and that's just not the timeline we want. π So: chain_wr non-NULL β it gets appended to the posted chain. chain_wr not set β cqe must be set so the caller gets their completion notification. Both facts, both slay. π§
π SEE ALSO π
Kernel file ./drivers/infiniband/core/rw.c β go read it, it's giving main character energy π
rdma_rw_ctx_init(9)rdma_rw_ctx_init_bvec(9)rdma_rw_ctx_signature_init(9)rdma_rw_ctx_post(9)rdma_rw_ctx_destroy(9)rdma_rw_ctx_destroy_bvec(9)rdma_rw_ctx_destroy_signature(9)rdma_rw_mr_factor(9)rdma_rw_max_send_wr(9)
aaaand that's the whole thing, bestie π«Ά this page came to us from ./drivers/infiniband/core, dated October 2026, and it's literally titled rdma_rw_ctx_wrs(9). periodt. ππΈβ¨
π¦ 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