ibv_query_device

Queries the attributes of an RDMA device.

Syntax

#include <rdma/verbs.h>
int ibv_query_device(struct ibv_context *context, struct ibv_device_attr *device_attr)

Description

The ibv_query_device() function returns the attributes of the device with context context. The parameter device_attr is a pointer to an ibv_device_attr struct as defined in the <rdma/verbs.h> file.

Note: The maximum values that are returned by the ibv_query_device() function are the upper limits of the supported resources by the device. It is not possible to use these maximum values because the actual number of any resource that can be created is limited by the system configuration, the amount of host memory, user permissions, and the amount of resources in use.

Input Parameter

Item Description
context Specifies the struct ibv_context from the ibv_open_device function.

Output Parameter

Item Description
device_attr Specifies the struct ibv_device_attr that contains the device attributes.

Return Values

Item Description
0 On success.
errno On failure.