rvt_query_pkey(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 🫢:


πŸ’– 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