IBV_QUERY_PKEY(3)
π ibv_query_pkey β like, the InfiniBand port P_Key table lookup bestie
okay so this is a page from the Libibverbs Programmer's Manual, and it's literally about peeking at one single entry in an InfiniBand port's P_Key table. tiny function, big main character energy. π
β¨ NAME β¨
ibv_query_pkey β query an InfiniBand port's P_Key table π¦
like⦠you want one P_Key? this is the girl who gets you that P_Key.
πΈ SYNOPSIS πΈ
#include <infiniband/verbs.h>
int ibv_query_pkey(struct ibv_context *context,
uint8_t port_num,
int index,
uint16_t *pkey);
no cap, that's the whole vibe. four args, one int coming back at you. β¨
π DESCRIPTION π
ibv_query_pkey() hands you back the P_Key value for the device context context, on port port_num, at the entry called index β and it writes it out through the pointer pkey. π«Ά
and bestie, important detail: the P_Key value comes back in network byte order. not host byte order. network. byte. order. write that on your mirror fr fr π
so like, context = which device, port_num = which port, index = which entry in that port's P_Key table, pkey = where the answer lands. one entry, one answer, iconic behaviour only. π
β RETURN VALUE β
0β slay, it worked β¨ success bestie-1β nope, error π that's the whole deal
π¦ SEE ALSO π¦
the friend group, all of them holding hands:
π AUTHOR π
Dotan Barak <dotanba@gmail.com> β respectfully, legend behaviour π
π§ little reminder before you go:indexpicks the entry,pkeytakes the value, and that value is in network byte order. do not come for me later if you forget. π
and that's the whole page, gorgeous. brought to you by libibverbs, dated 2006-10-31 β yeah she's vintage but she still ate π π
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- ubuntu jammy: libibverbs-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms