| 1 |
.\" -*- nroff -*- |
| 2 |
.\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md |
| 3 |
.\" |
| 4 |
.TH IBV_QUERY_DEVICE 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual" |
| 5 |
.SH "NAME" |
| 6 |
ibv_query_device \- query an RDMA device's attributes |
| 7 |
.SH "SYNOPSIS" |
| 8 |
.nf |
| 9 |
.B #include <infiniband/verbs.h> |
| 10 |
.sp |
| 11 |
.BI "int ibv_query_device(struct ibv_context " "*context", |
| 12 |
.BI " struct ibv_device_attr " "*device_attr" ); |
| 13 |
.fi |
| 14 |
.SH "DESCRIPTION" |
| 15 |
.B ibv_query_device() |
| 16 |
returns the attributes of the device with context |
| 17 |
.I context\fR. |
| 18 |
The argument |
| 19 |
.I device_attr |
| 20 |
is a pointer to an ibv_device_attr struct, as defined in <infiniband/verbs.h>. |
| 21 |
.PP |
| 22 |
.nf |
| 23 |
struct ibv_device_attr { |
| 24 |
.in +8 |
| 25 |
char fw_ver[64]; /* FW version */ |
| 26 |
uint64_t node_guid; /* Node GUID (in network byte order) */ |
| 27 |
uint64_t sys_image_guid; /* System image GUID (in network byte order) */ |
| 28 |
uint64_t max_mr_size; /* Largest contiguous block that can be registered */ |
| 29 |
uint64_t page_size_cap; /* Supported memory shift sizes */ |
| 30 |
uint32_t vendor_id; /* Vendor ID, per IEEE */ |
| 31 |
uint32_t vendor_part_id; /* Vendor supplied part ID */ |
| 32 |
uint32_t hw_ver; /* Hardware version */ |
| 33 |
int max_qp; /* Maximum number of supported QPs */ |
| 34 |
int max_qp_wr; /* Maximum number of outstanding WR on any work queue */ |
| 35 |
unsigned int device_cap_flags; /* HCA capabilities mask */ |
| 36 |
int max_sge; /* Maximum number of s/g per WR for SQ & RQ of QP for non RDMA Read operations */ |
| 37 |
int max_sge_rd; /* Maximum number of s/g per WR for RDMA Read operations */ |
| 38 |
int max_cq; /* Maximum number of supported CQs */ |
| 39 |
int max_cqe; /* Maximum number of CQE capacity per CQ */ |
| 40 |
int max_mr; /* Maximum number of supported MRs */ |
| 41 |
int max_pd; /* Maximum number of supported PDs */ |
| 42 |
int max_qp_rd_atom; /* Maximum number of RDMA Read & Atomic operations that can be outstanding per QP */ |
| 43 |
int max_ee_rd_atom; /* Maximum number of RDMA Read & Atomic operations that can be outstanding per EEC */ |
| 44 |
int max_res_rd_atom; /* Maximum number of resources used for RDMA Read & Atomic operations by this HCA as the Target */ |
| 45 |
int max_qp_init_rd_atom; /* Maximum depth per QP for initiation of RDMA Read & Atomic operations */ |
| 46 |
int max_ee_init_rd_atom; /* Maximum depth per EEC for initiation of RDMA Read & Atomic operations */ |
| 47 |
enum ibv_atomic_cap atomic_cap; /* Atomic operations support level */ |
| 48 |
int max_ee; /* Maximum number of supported EE contexts */ |
| 49 |
int max_rdd; /* Maximum number of supported RD domains */ |
| 50 |
int max_mw; /* Maximum number of supported MWs */ |
| 51 |
int max_raw_ipv6_qp; /* Maximum number of supported raw IPv6 datagram QPs */ |
| 52 |
int max_raw_ethy_qp; /* Maximum number of supported Ethertype datagram QPs */ |
| 53 |
int max_mcast_grp; /* Maximum number of supported multicast groups */ |
| 54 |
int max_mcast_qp_attach; /* Maximum number of QPs per multicast group which can be attached */ |
| 55 |
int max_total_mcast_qp_attach;/* Maximum number of QPs which can be attached to multicast groups */ |
| 56 |
int max_ah; /* Maximum number of supported address handles */ |
| 57 |
int max_fmr; /* Maximum number of supported FMRs */ |
| 58 |
int max_map_per_fmr; /* Maximum number of (re)maps per FMR before an unmap operation in required */ |
| 59 |
int max_srq; /* Maximum number of supported SRQs */ |
| 60 |
int max_srq_wr; /* Maximum number of WRs per SRQ */ |
| 61 |
int max_srq_sge; /* Maximum number of s/g per SRQ */ |
| 62 |
uint16_t max_pkeys; /* Maximum number of partitions */ |
| 63 |
uint8_t local_ca_ack_delay; /* Local CA ack delay */ |
| 64 |
uint8_t phys_port_cnt; /* Number of physical ports */ |
| 65 |
.in -8 |
| 66 |
}; |
| 67 |
.fi |
| 68 |
.SH "RETURN VALUE" |
| 69 |
.B ibv_query_device() |
| 70 |
returns 0 on success, or the value of errno on failure (which indicates the failure reason). |
| 71 |
.SH "NOTES" |
| 72 |
The maximum values returned by this function are the upper limits of |
| 73 |
supported resources by the device. However, it may not be possible to |
| 74 |
use these maximum values, since the actual number of any resource that |
| 75 |
can be created may be limited by the machine configuration, the amount |
| 76 |
of host memory, user permissions, and the amount of resources already |
| 77 |
in use by other users/processes. |
| 78 |
.SH "SEE ALSO" |
| 79 |
.BR ibv_open_device (3), |
| 80 |
.BR ibv_query_port (3), |
| 81 |
.BR ibv_query_pkey (3), |
| 82 |
.BR ibv_query_gid (3) |
| 83 |
.SH "AUTHORS" |
| 84 |
.TP |
| 85 |
Dotan Barak <[email protected]> |