rdma_rw_ctx_init(9)
β¨ rdma_rw_ctx_init(9) β¨
okay so bestie, this is a page from the Kernel API Manual and it's genuinely about setting up an RDMA READ/WRITE context β like, the whole "get your ducks in a row before you yeet work at the queue" moment π¦
πΈ NAME πΈ
rdma_rw_ctx_init β initialize a RDMA READ/WRITE context π
π SYNOPSIS π
int rdma_rw_ctx_init (struct rdma_rw_ctx *ctx , struct ib_qp *qp , u32
port_num , struct scatterlist *sg , u32 sg_cnt , u32 sg_offset , u64
remote_addr , u32 rkey , enum dma_data_direction dir );
π«Ά ARGUMENTS π«Ά
like, one by one, no skipping, periodt:
ctxβ the context you're initializing. this is the glow-up victim, bestie β¨qpβ the queue pair we're operating on πport_numβ the port num that this connection is bound to πsgβ the scatterlist we're gonna READ from / WRITE to πΈsg_cntβ how many entries live insg, like headcount for the party πsg_offsetβ the current byte offset intosg. yes, bytes, not vibes π₯remote_addrβ the remote address to read/write, and it's relative torkey(iykyk) πrkeyβ the remote key we're operating on πdirβDMA_TO_DEVICEfor RDMA WRITE,DMA_FROM_DEVICEfor RDMA READ. literally pick the right one or it's giving chaos π
π DESCRIPTION π
okay so here's the tea: it returns the number of WQEs that will be needed on the workqueue if it succeeds π«Ά β or a negative error code if it doesn't. that's it, that's the whole vibe check π
π SEE ALSO π
kernel file ./drivers/infiniband/core/rw.c β and the whole friend group:
rdma_rw_ctx_init_bvec(9)rdma_rw_ctx_signature_init(9)rdma_rw_ctx_wrs(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)
mwah π that's the whole page, go be iconic with your queue pairs β shipped out of ./drivers/infiniband/core in October 2026, no cap πβ¨
π¦ 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