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() routine
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 <rdma/verbs.h>.
Note: The maximum
values returned by the ibv_query_device() function are the
upper limits of supported resources by the device. It might not be
possible to use these maximum values, since the actual number of any
resource that can be created is limited by the machine configuration,
the amount of host memory, user permissions, and the amount of resources
already in use.
Input Parameter
context |
struct ibv_context from ibv_open_device. |
Output Parameter
device_attr |
struct ibv_device_attr containing device attributes. |
Return Values
0 |
On success. |
errno |
On failure. |
EINVAL |
If context parameter or device_attr is
NULL |