IBV_QUERY_GID_TABLE(3)
๐ NAME ๐
okay so this page is from the Libibverbs Programmerโs Manual, and the main character is ibv_query_gid_table โ query an InfiniBand deviceโs GID table. โจ
๐ SYNOPSIS ๐
#include <infiniband/verbs.h>
ssize_t ibv_query_gid_table(struct ibv_context *context,
struct ibv_gid_entry *entries,
size_t max_entries,
uint32_t flags);
๐ง DESCRIPTION ๐ง
ibv_query_gid_table() grabs the valid GID table entries for the RDMA device context context and puts them at the pointer entries. ๐
bestie, you have to allocate the entries array yourself for the GID table entries you want to query. This API returns only valid GID table entries โ no fake ones, no extras. โจ
You also have to pass a non zero number of entries at max_entries, and that number has to correspond to the size of the entries array. ๐ซถ
Your entries array needs to be allocated so it can contain all the valid GID table entries of the device. If there are more valid GID entries than the provided value of max_entries and the entries array can hold, the call will fail. ๐ญ
For example, if an RDMA device context has a total of 10 valid GID entries, entries should be allocated for at least 10 entries, and max_entries should be set appropriately. ๐ฅ
bestie, this is the vibe check: size your array for all the valid entries, or the call is gonna fail on you. ๐
๐ ARGUMENTS ๐
contextโ the context of the device to query. ๐entriesโ array ofibv_gid_entrystructs where the GID entries are returned. Please see theibv_query_gid_ex(3)man page foribv_gid_entry. ๐ฆmax_entriesโ maximum number of entries that can be returned. ๐ธflagsโ extra fields to query postentries->ndev_ifindex; for now must be0. ๐จ
๐ช RETURN VALUE ๐ช
ibv_query_gid_table() returns the number of entries that were read on success, or a negative errno value on error. The number of entries returned is <= max_entries. ๐
๐ SEE ALSO ๐
๐ AUTHOR ๐
Parav Pandit <parav@nvidia.com> ๐ซถ
mwah ๐ this page is from libibverbs, dated 2020-04-24 โ thatโs the whole thing, periodt. ๐
๐ฆ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 ยท GPL-2.0-only OR BSD-2-Clause
- centos-stream 10: rdma-core-devel 62.0-3.el10 ยท GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 ยท GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 ยท GPLv2 or BSD
- ubuntu jammy: libibverbs-dev 39.0-1 ยท BSD-MIT OR GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms