ibv_query_gid_table(3) — Linux manual page

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

IBV_QUE...ID_TABLE(3) Libibverbs Programmer’s ManualIBV_QUE...ID_TABLE(3)

NAME         top

       ibv_query_gid_table - query an InfiniBand device’s GID table

SYNOPSIS         top

              #include <infiniband/verbs.h>

              ssize_t ibv_query_gid_table(struct ibv_context *context,
                                          struct ibv_gid_entry *entries,
                                          size_t max_entries,
                                          uint32_t flags);

DESCRIPTION         top

       ibv_query_gid_table() returns the valid GID table entries of the
       RDMA device context context at the pointer entries.

       A caller must allocate entries array for the GID table entries it
       desires to query.  This API returns only valid GID table entries.

       A caller must pass non zero number of entries at max_entries that
       corresponds to the size of entries array.

       entries array must be allocated such that it can contain all the
       valid GID table entries of the device.  If there are more valid
       GID entries than the provided value of max_entries and entries
       array, the call will fail.  For example, if an RDMA device context
       has a total of 10 valid GID entries, entries should be allocated
       for at least 10 entries, and max_entries should be set
       appropriately.

ARGUMENTS         top

       context
              The context of the device to query.

       entries
              Array of ibv_gid_entry structs where the GID entries are
              returned.  Please see ibv_query_gid_ex(3) man page for
              ibv_gid_entry.

       max_entries
              Maximum number of entries that can be returned.

       flags  Extra fields to query post entries->ndev_ifindex, for now
              must be 0.

RETURN VALUE         top

       ibv_query_gid_table() returns the number of entries that were read
       on success or negative errno value on error.  Number of entries
       returned is <= max_entries.

SEE ALSO         top

       ibv_open_device(3), ibv_query_device(3), ibv_query_port(3),
       ibv_query_gid_ex(3)

AUTHOR         top

       Parav Pandit ⟨[email protected]

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
       [email protected].  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
       [email protected]

libibverbs                      2020-04-24          IBV_QUE...ID_TABLE(3)

Pages that refer to this page: ibv_query_gid_ex(3)