ibv_query_gid_ex(3) — Linux manual page

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

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

NAME         top

       ibv_query_gid_ex - Query an InfiniBand port’s GID table entry

SYNOPSIS         top

              #include <infiniband/verbs.h>

              int ibv_query_gid_ex(struct ibv_context *context,
                                   uint32_t port_num,
                                   uint32_t gid_index,
                                   struct ibv_gid_entry *entry,
                                   uint32_t flags);

DESCRIPTION         top

       ibv_query_gid_ex() returns the GID entry at entry for gid_index of
       port port_num for device context context.

ARGUMENTS         top

       context
              The context of the device to query.

       port_num
              The number of port to query its GID table.

       gid_index
              The index of the GID table entry to query.

       ## entry Argument
              An ibv_gid_entry struct, as defined in
              <infiniband/verbs.h>.

                     struct ibv_gid_entry {
                         union ibv_gid gid;
                         uint32_t gid_index;
                         uint32_t port_num;
                         uint32_t gid_type;
                         uint32_t ndev_ifindex;
                     };

              gid

                  The GID entry.

              gid_index

                  The GID table index of this entry.

              port_num

                  The port number that this GID belongs to.

              gid_type

                  enum ibv_gid_type, can be one of IBV_GID_TYPE_IB, IBV_GID_TYPE_ROCE_V1 or IBV_GID_TYPE_ROCE_V2.

              ndev_ifindex

                  The interface index of the net device associated with this GID.
                  It is 0 if there is no net device associated with it.

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

RETURN VALUE         top

       ibv_query_gid_ex() returns 0 on success or errno value on error.

ERRORS         top

       ENODATA
              gid_index is within the GID table size of port port_num but
              there is no data in this index.

SEE ALSO         top

       ibv_open_device(3), ibv_query_device(3), ibv_query_pkey(3),
       ibv_query_port(3), ibv_query_gid_table(3)

AUTHOR         top

       Parav Pandit ⟨parav@nvidia.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                      2020-04-24            IBV_QUERY_GID_EX(3)

Pages that refer to this page: ibv_query_gid_table(3)