1IBV_QUERY_DEVICE(3)     Libibverbs Programmer's Manual     IBV_QUERY_DEVICE(3)
2
3
4

NAME

6       ibv_query_device - query an RDMA device's attributes
7

SYNOPSIS

9       #include <infiniband/verbs.h>
10
11       int ibv_query_device(struct ibv_context *context,
12                            struct ibv_device_attr *device_attr);
13

DESCRIPTION

15       ibv_query_device()  returns  the  attributes of the device with context
16       context.  The argument device_attr is a pointer to  an  ibv_device_attr
17       struct, as defined in <infiniband/verbs.h>.
18
19       struct ibv_device_attr {
20               char                    fw_ver[64];             /* FW version */
21               uint64_t                node_guid;              /* Node GUID (in network byte order) */
22               uint64_t                sys_image_guid;         /* System image GUID (in network byte order) */
23               uint64_t                max_mr_size;            /* Largest contiguous block that can be registered */
24               uint64_t                page_size_cap;          /* Supported memory shift sizes */
25               uint32_t                vendor_id;              /* Vendor ID, per IEEE */
26               uint32_t                vendor_part_id;         /* Vendor supplied part ID */
27               uint32_t                hw_ver;                 /* Hardware version */
28               int                     max_qp;                 /* Maximum number of supported QPs */
29               int                     max_qp_wr;              /* Maximum number of outstanding WR on any work queue */
30               unsigned int            device_cap_flags;       /* HCA capabilities mask */
31               int                     max_sge;                /* Maximum number of s/g per WR for SQ & RQ of QP for non RDMA Read operations */
32               int                     max_sge_rd;             /* Maximum number of s/g per WR for RDMA Read operations */
33               int                     max_cq;                 /* Maximum number of supported CQs */
34               int                     max_cqe;                /* Maximum number of CQE capacity per CQ */
35               int                     max_mr;                 /* Maximum number of supported MRs */
36               int                     max_pd;                 /* Maximum number of supported PDs */
37               int                     max_qp_rd_atom;         /* Maximum number of RDMA Read & Atomic operations that can be outstanding per QP */
38               int                     max_ee_rd_atom;         /* Maximum number of RDMA Read & Atomic operations that can be outstanding per EEC */
39               int                     max_res_rd_atom;        /* Maximum number of resources used for RDMA Read & Atomic operations by this HCA as the Target */
40               int                     max_qp_init_rd_atom;    /* Maximum depth per QP for initiation of RDMA Read & Atomic operations */
41               int                     max_ee_init_rd_atom;    /* Maximum depth per EEC for initiation of RDMA Read & Atomic operations */
42               enum ibv_atomic_cap     atomic_cap;             /* Atomic operations support level */
43               int                     max_ee;                 /* Maximum number of supported EE contexts */
44               int                     max_rdd;                /* Maximum number of supported RD domains */
45               int                     max_mw;                 /* Maximum number of supported MWs */
46               int                     max_raw_ipv6_qp;        /* Maximum number of supported raw IPv6 datagram QPs */
47               int                     max_raw_ethy_qp;        /* Maximum number of supported Ethertype datagram QPs */
48               int                     max_mcast_grp;          /* Maximum number of supported multicast groups */
49               int                     max_mcast_qp_attach;    /* Maximum number of QPs per multicast group which can be attached */
50               int                     max_total_mcast_qp_attach;/* Maximum number of QPs which can be attached to multicast groups */
51               int                     max_ah;                 /* Maximum number of supported address handles */
52               int                     max_fmr;                /* Maximum number of supported FMRs */
53               int                     max_map_per_fmr;        /* Maximum number of (re)maps per FMR before an unmap operation in required */
54               int                     max_srq;                /* Maximum number of supported SRQs */
55               int                     max_srq_wr;             /* Maximum number of WRs per SRQ */
56               int                     max_srq_sge;            /* Maximum number of s/g per SRQ */
57               uint16_t                max_pkeys;              /* Maximum number of partitions */
58               uint8_t                 local_ca_ack_delay;     /* Local CA ack delay */
59               uint8_t                 phys_port_cnt;          /* Number of physical ports */
60       };
61

RETURN VALUE

63       ibv_query_device() returns 0 on success, or the value of errno on fail‐
64       ure (which indicates the failure reason).
65

NOTES

67       The maximum values returned by this function are the  upper  limits  of
68       supported  resources by the device.  However, it may not be possible to
69       use these maximum values, since the actual number of any resource  that
70       can  be created may be limited by the machine configuration, the amount
71       of host memory, user permissions, and the amount of  resources  already
72       in use by other users/processes.
73

SEE ALSO

75       ibv_open_device(3),        ibv_query_port(3),        ibv_query_pkey(3),
76       ibv_query_gid(3)
77

AUTHORS

79       Dotan Barak <dotanba@gmail.com>
80
81
82
83libibverbs                        2006-10-31               IBV_QUERY_DEVICE(3)
Impressum