rdma_rw_ctx_destroy_bvec(9)
π rdma_rw_ctx_destroy_bvec(9) β from the Kernel API Manual β¨
okay so bestie, this little function is the cleanup era of the RDMA lifecycle. Like, rdma_rw_ctx_init_bvec did all the hard work and got the main character energy, and now this one comes in quietly, cleans up the mess, and leaves. Respect. π«Ά
πΈ NAME πΈ
rdma_rw_ctx_destroy_bvec β the one that releases resources from rdma_rw_ctx_init_bvec π
β¨ SYNOPSIS β¨
void rdma_rw_ctx_destroy_bvec (struct rdma_rw_ctx *ctx , struct ib_qp
*qp , u32 port_num , const struct bio_vec *bvecs , u32 nr_bvec , enum
dma_data_direction dir );
like, yes, that's the whole signature. six params. she's thorough π
π¦ ARGUMENTS π¦
ctxβ the context you're releasing, bestie. the thing being set free. ποΈqpβ the queue pair we're operating on. the actual main character here.port_numβ the port num the connection is bound toβ¦ and it's unused, so ngl it's just there for the vibes β¨ (API symmetry, we'll get to that)bvecsβ thebio_vecarray that was used for the READ/WRITE. also unused. iconic of her to show up and do nothing πnr_bvecβ number of entries inbvecs. this one actually matters, lowkey.dirβ direction of the transfer:DMA_TO_DEVICEfor RDMA WRITE,DMA_FROM_DEVICEfor RDMA READ. pick the right one, fr fr π₯
π DESCRIPTION π
So here's the tea: this function releases all resources allocated by a successful rdma_rw_ctx_init_bvec call. every single one. she's not leaving anything behind, periodt. π§Ήβ¨
β οΈ BIG WARNING, bestie, do not skip this: you must not call this if rdma_rw_ctx_init_bvec returned an error. like, nope. that's not the vibe. clean up is only for the successful ones ππ
And about the two freeloaders β the port_num and bvecs parameters are unused, but they're present for API symmetry with rdma_rw_ctx_destroy. so they're not bugs, they're aesthetic. balance. symmetry. it's giving choreography π©°π
π SEE ALSO π
- Kernel file
./drivers/infiniband/core/rw.c rdma_rw_ctx_init(9)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_signature(9)rdma_rw_mr_factor(9)rdma_rw_max_send_wr(9)
go read the whole squad, iykyk π
okay that's the whole page, you ate that π
β¨ this masterpiece lives in ./drivers/infiniband/core and it's dated October 2026 β mark your calendars bestie, mwah πππ¦
π¦ 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