| 1 | --- |
| 2 | date: 2020-04-24 |
| 3 | footer: libibverbs |
| 4 | header: "Libibverbs Programmer's Manual" |
| 5 | layout: page |
| 6 | license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' |
| 7 | section: 3 |
| 8 | title: IBV_QUERY_GID_EX |
| 9 | --- |
| 10 | |
| 11 | # NAME |
| 12 | |
| 13 | ibv_query_gid_ex - Query an InfiniBand port's GID table entry |
| 14 | |
| 15 | # SYNOPSIS |
| 16 | |
| 17 | ```c |
| 18 | #include <infiniband/verbs.h> |
| 19 | |
| 20 | int ibv_query_gid_ex(struct ibv_context *context, |
| 21 | uint32_t port_num, |
| 22 | uint32_t gid_index, |
| 23 | struct ibv_gid_entry *entry, |
| 24 | uint32_t flags); |
| 25 | ``` |
| 26 | |
| 27 | # DESCRIPTION |
| 28 | |
| 29 | **ibv_query_gid_ex()** returns the GID entry at *entry* for |
| 30 | *gid_index* of port *port_num* for device context *context*. |
| 31 | |
| 32 | # ARGUMENTS |
| 33 | |
| 34 | *context* |
| 35 | : The context of the device to query. |
| 36 | |
| 37 | *port_num* |
| 38 | : The number of port to query its GID table. |
| 39 | |
| 40 | *gid_index* |
| 41 | : The index of the GID table entry to query. |
| 42 | |
| 43 | ## *entry* Argument |
| 44 | : An ibv_gid_entry struct, as defined in <infiniband/verbs.h>. |
| 45 | ```c |
| 46 | struct ibv_gid_entry { |
| 47 | union ibv_gid gid; |
| 48 | uint32_t gid_index; |
| 49 | uint32_t port_num; |
| 50 | uint32_t gid_type; |
| 51 | uint32_t ndev_ifindex; |
| 52 | }; |
| 53 | ``` |
| 54 | |
| 55 | *gid* |
| 56 | : The GID entry. |
| 57 | |
| 58 | *gid_index* |
| 59 | : The GID table index of this entry. |
| 60 | |
| 61 | *port_num* |
| 62 | : The port number that this GID belongs to. |
| 63 | |
| 64 | *gid_type* |
| 65 | : enum ibv_gid_type, can be one of IBV_GID_TYPE_IB, IBV_GID_TYPE_ROCE_V1 or IBV_GID_TYPE_ROCE_V2. |
| 66 | |
| 67 | *ndev_ifindex* |
| 68 | : The interface index of the net device associated with this GID. |
| 69 | It is 0 if there is no net device associated with it. |
| 70 | |
| 71 | *flags* |
| 72 | : Extra fields to query post *ndev_ifindex*, for now must be 0. |
| 73 | |
| 74 | # RETURN VALUE |
| 75 | |
| 76 | **ibv_query_gid_ex()** returns 0 on success or errno value on error. |
| 77 | |
| 78 | # ERRORS |
| 79 | |
| 80 | ENODATA |
| 81 | : *gid_index* is within the GID table size of port *port_num* but there is no data in this index. |
| 82 | |
| 83 | # SEE ALSO |
| 84 | |
| 85 | **ibv_open_device**(3), |
| 86 | **ibv_query_device**(3), |
| 87 | **ibv_query_pkey**(3), |
| 88 | **ibv_query_port**(3), |
| 89 | **ibv_query_gid_table**(3) |
| 90 | |
| 91 | # AUTHOR |
| 92 | |
| 93 | Parav Pandit <[email protected]> |