rvt_alloc_device(9)
π¦ rvt_alloc_device(9) β the Kernel API Manual moment we've all been waiting for π¦
okay bestie, welcome to the rvt_alloc_device(9) page, from the Kernel API Manual, and honestly? she's short, she's sweet, and she's about to make your whole day π
β¨ NAME β¨
rvt_alloc_device β allocate rdi π
β¨ SYNOPSIS β¨
struct rvt_dev_info * rvt_alloc_device (size_t size , int nports );
that's it. that's the whole vibe. two args, one returned pointer, zero drama π«Ά
β¨ ARGUMENTS β¨
sizeβ how big of a structure you want to allocate. like, the actual size, bestie, not a guess πnportsβ the number of ports you want array slots for. count them. fr fr π’
π DESCRIPTION π
so here's the tea β β you use the IB core device alloc to allocate space for the rdi, and the rdi is assumed to be inside of the ib_device. that's the whole premise. that's canon. no cap.
any extra space that you, the driver author, require? that's on you to fold into size. like, we're not psychic, we can't magically know how much room your little extra bits need β you include it in size yourself, okay? π
we also allocate a port array based on the number of ports. yes, based on nports. the one you passed in. that one. iconic behaviour honestly π
π RETURN π
on success you get a pointer to the allocated rdi β¨ that's the whole return value. a pointer. to the rdi. slay.
π₯ SEE ALSO π₯
kernel file ./drivers/infiniband/sw/rdmavt/vt.c β and like, all of her friends:
rvt_dealloc_device(9)rvt_query_port(9)rvt_modify_port(9)rvt_query_pkey(9)rvt_query_gid(9)rvt_alloc_ucontext(9)rvt_dealloc_ucontext(9)rvt_register_device(9)rvt_unregister_device(9)rvt_init_port(9)
it's giving family reunion and we love that for them π§π
okay and finally, the cute lil sign-off: this whole page lives under ./drivers/infiniband/sw/rdmavt and the date on her birth certificate says October 2026 π go forth, allocate responsibly, and remember β you allocate it, you dealloc it. balance. πΈπ
π¦ 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