.\" Automatically generated by Pandoc 3.1.11.1
.\"
.TH "IBV_QUERY_GID_EX" "3" "2020\-04\-24" "libibverbs" "Libibverbs Programmer\[cq]s Manual"
.SH NAME
ibv_query_gid_ex \- Query an InfiniBand port\[cq]s GID table entry
.SH SYNOPSIS
.IP
.EX
#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);
.EE
.SH DESCRIPTION
\f[B]ibv_query_gid_ex()\f[R] returns the GID entry at \f[I]entry\f[R]
for \f[I]gid_index\f[R] of port \f[I]port_num\f[R] for device context
\f[I]context\f[R].
.SH ARGUMENTS
.TP
\f[I]context\f[R]
The context of the device to query.
.TP
\f[I]port_num\f[R]
The number of port to query its GID table.
.TP
\f[I]gid_index\f[R]
The index of the GID table entry to query.
.TP
## \f[I]entry\f[R] Argument
An ibv_gid_entry struct, as defined in <infiniband/verbs.h>.
.RS
.IP
.EX
struct ibv_gid_entry {
    union ibv_gid gid;
    uint32_t gid_index;
    uint32_t port_num;
    uint32_t gid_type;
    uint32_t ndev_ifindex;
};
.EE
.PP
\f[I]gid\f[R]
.RE
.IP
.EX
    The GID entry.
.EE
.RS
.PP
\f[I]gid_index\f[R]
.RE
.IP
.EX
    The GID table index of this entry.
.EE
.RS
.PP
\f[I]port_num\f[R]
.RE
.IP
.EX
    The port number that this GID belongs to.
.EE
.RS
.PP
\f[I]gid_type\f[R]
.RE
.IP
.EX
    enum ibv_gid_type, can be one of IBV_GID_TYPE_IB, IBV_GID_TYPE_ROCE_V1 or IBV_GID_TYPE_ROCE_V2.
.EE
.RS
.PP
\f[I]ndev_ifindex\f[R]
.RE
.IP
.EX
    The interface index of the net device associated with this GID.
    It is 0 if there is no net device associated with it.
.EE
.TP
\f[I]flags\f[R]
Extra fields to query post \f[I]ndev_ifindex\f[R], for now must be 0.
.SH RETURN VALUE
\f[B]ibv_query_gid_ex()\f[R] returns 0 on success or errno value on
error.
.SH ERRORS
.TP
ENODATA
\f[I]gid_index\f[R] is within the GID table size of port
\f[I]port_num\f[R] but there is no data in this index.
.SH SEE ALSO
\f[B]ibv_open_device\f[R](3), \f[B]ibv_query_device\f[R](3),
\f[B]ibv_query_pkey\f[R](3), \f[B]ibv_query_port\f[R](3),
\f[B]ibv_query_gid_table\f[R](3)
.SH AUTHOR
Parav Pandit \c
.MT parav@nvidia.com
.ME \c
