rdma_rw_ctx_wrs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ‘‘


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