ibv_query_gid_ex(3)

ibv_query_gid_ex3

Query an infiniband port’s gid table entry

Usage

#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);

Overview

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

Arguments

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

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

Errors

ENODATA

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

Releases

4 releases since Debian 11 (Bullseye); the text changed 3 times.

  1. 11
  2. 12
  3. 13
  4. Arch

Author

Parav Pandit ⟨[email protected]⟩\c

From rdma-core 65.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.