rdma_rw_ctx_destroy_bvec(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” the bio_vec array that was used for the READ/WRITE. also unused. iconic of her to show up and do nothing πŸ’€
  • nr_bvec β€” number of entries in bvecs. this one actually matters, lowkey.
  • dir β€” direction of the transfer: DMA_TO_DEVICE for RDMA WRITE, DMA_FROM_DEVICE for 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 🌈

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