ibv_query_pkey(3) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | SEE ALSO | AUTHOR | COLOPHON

IBV_QUERY_PKEY(3)     Libibverbs Programmer’s Manual    IBV_QUERY_PKEY(3)

NAME         top

       ibv_query_pkey - query an InfiniBand port’s P_Key table

SYNOPSIS         top

              #include <infiniband/verbs.h>

              int ibv_query_pkey(struct ibv_context *context,
                                 uint8_t port_num,
                                 int index,
                                 uint16_t *pkey);

DESCRIPTION         top

       ibv_query_pkey() returns the P_Key value (in network byte order)
       in entry index of port port_num for device context context through
       the pointer pkey.

RETURN VALUE         top

       ibv_query_pkey() returns 0 on success, and -1 on error.

SEE ALSO         top

       ibv_open_device(3), ibv_query_device(3), ibv_query_gid(3),
       ibv_query_port(3)

AUTHOR         top

       Dotan Barak ⟨dotanba@gmail.com⟩

COLOPHON         top

       This page is part of the rdma-core (RDMA Core Userspace Libraries
       and Daemons) project.  Information about the project can be found
       at ⟨https://github.com/linux-rdma/rdma-core⟩.  If you have a bug
       report for this manual page, send it to
       linux-rdma@vger.kernel.org.  This page was obtained from the
       project's upstream Git repository
       ⟨https://github.com/linux-rdma/rdma-core.git⟩ on 2025-08-11.  (At
       that time, the date of the most recent commit that was found in
       the repository was 2025-08-04.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there is
       a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

libibverbs                      2006-10-31              IBV_QUERY_PKEY(3)

Pages that refer to this page: ibv_get_pkey_index(3)ibv_open_device(3)ibv_query_device(3)ibv_query_device_ex(3)ibv_query_gid(3)ibv_query_gid_ex(3)ibv_query_rt_values_ex(3)