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