rvt_query_pkey(9)
β¨ rvt_query_pkey(9) β¨
okay so bestie, welcome to the Kernel API Manual π this little cutie lives in the rvt corner of the kernel and she's here to hand you a pkey straight out of the table. let's get into it π
πΈ NAME πΈ
rvt_query_pkey β return a pkey from the table at a given index π
that's it, that's the whole job, and she does it flawlessly.
π¦ SYNOPSIS π¦
int rvt_query_pkey (struct ib_device *ibdev , u32 port_num , u16 index ,
u16 *pkey );
like, look at that signature. iconic. π₯
π ARGUMENTS π
ibdevβ the Verbs IB dev, aka the main character of this whole operation πport_numβ the port number, and it's 1 based from ib core β yes bestie, ONE based, don't come at her with your zero-index nonsense πindexβ the index into the pkey table π―pkeyβ the returned pkey from the port pkey table, she gets written out through this pointer, slay π«
π RETURN π
0 on failure, otherwise the pkey. no cap, that's the actual contract β zero means it went wrong, everything else is your pkey π so don't be out here doing if (ret) and thinking it worked, ok? π
π§ SEE ALSO π§
the kernel file ./drivers/infiniband/sw/rdmavt/vt.c is where she lives, and here's the whole friend group π«Ά:
rvt_alloc_device(9)rvt_dealloc_device(9)rvt_query_port(9)rvt_modify_port(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)
π that's the whole page, bestie π this one came from ./drivers/infiniband/sw/rdmavt and it's dated October 2026 β go forth and query those pkeys, rvt_query_pkey(9) forever π
β¨π
π¦ 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