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

NAME

6       ibv_query_device_ex - query an RDMA device's attributes
7

SYNOPSIS

9       #include <infiniband/verbs.h>
10
11       int ibv_query_device_ex(struct ibv_context *context,
12                               struct ibv_device_attr_ex *attr);
13

DESCRIPTION

15       ibv_query_device_ex() returns the attributes of the device with context
16       context.  The argument attr  is  a  pointer  to  an  ibv_device_attr_ex
17       struct, as defined in <infiniband/verbs.h>.
18
19       struct ibv_device_attr_ex {
20               struct ibv_device_attr orig_attr;
21               uint32_t               comp_mask;                  /* Compatibility mask that defines which of the following variables are valid */
22               struct ibv_odp_caps    odp_caps;                   /* On-Demand Paging capabilities */
23               uint64_t               completion_timestamp_mask;  /* Completion timestamp mask (0 = unsupported) */
24               uint64_t               hca_core_clock;             /* The frequency (in kHZ) of the HCA (0 = unsupported) */
25               uint64_t               device_cap_flags_ex;        /* Extended device capability flags */
26               struct ibv_tso_caps    tso_caps;                   /* TCP segmentation offload capabilities */
27               struct ibv_rss_caps    rss_caps;                   /* RSS capabilities */
28               uint32_t               max_wq_type_rq;             /* Max Work Queue from type RQ */
29               struct ibv_packet_pacing_caps packet_pacing_caps; /* Packet pacing capabilities */
30               uint32_t               raw_packet_caps;            /* Raw packet capabilities, use enum ibv_raw_packet_caps */
31               struct ibv_tm_caps     tm_caps;                    /* Tag matching capabilities */
32               struct ibv_cq_moderation_caps  cq_mod_caps;        /* CQ moderation max capabilities */
33               uint64_t              max_dm_size;         /* Max Device Memory size (in bytes) available for allocation */
34       };
35
36       struct ibv_odp_caps {
37               uint64_t general_odp_caps;    /* Mask with enum ibv_odp_general_cap_bits */
38               struct {
39                       uint32_t rc_odp_caps; /* Mask with enum ibv_odp_tranport_cap_bits to know which operations are supported. */
40                       uint32_t uc_odp_caps; /* Mask with enum ibv_odp_tranport_cap_bits to know which operations are supported. */
41                       uint32_t ud_odp_caps; /* Mask with enum ibv_odp_tranport_cap_bits to know which operations are supported. */
42               } per_transport_caps;
43       };
44
45       enum ibv_odp_general_cap_bits {
46               IBV_ODP_SUPPORT = 1 << 0, /* On demand paging is supported */
47       };
48
49       enum ibv_odp_transport_cap_bits {
50               IBV_ODP_SUPPORT_SEND     = 1 << 0, /* Send operations support on-demand paging */
51               IBV_ODP_SUPPORT_RECV     = 1 << 1, /* Receive operations support on-demand paging */
52               IBV_ODP_SUPPORT_WRITE    = 1 << 2, /* RDMA-Write operations support on-demand paging */
53               IBV_ODP_SUPPORT_READ     = 1 << 3, /* RDMA-Read operations support on-demand paging */
54               IBV_ODP_SUPPORT_ATOMIC   = 1 << 4, /* RDMA-Atomic operations support on-demand paging */
55       };
56
57       struct ibv_tso_caps {
58               uint32_t max_tso;        /* Maximum payload size in bytes supported for segmentation by TSO engine.*/
59               uint32_t supported_qpts; /* Bitmap showing which QP types are supported by TSO operation. */
60       };
61
62       struct ibv_rss_caps {
63               uint32_t supported_qpts;                   /* Bitmap showing which QP types are supported RSS */
64               uint32_t max_rwq_indirection_tables;       /* Max receive work queue indirection tables */
65               uint32_t max_rwq_indirection_table_size;   /* Max receive work queue indirection table size */
66               uint64_t rx_hash_fields_mask;              /* Mask with enum ibv_rx_hash_fields to know which incoming packet's field can participates in the RX hash */
67               uint8_t  rx_hash_function;                 /* Mask with enum ibv_rx_hash_function_flags to know which hash functions are supported */
68       };
69
70       struct ibv_packet_pacing_caps {
71              uint32_t qp_rate_limit_min; /* Minimum rate limit in kbps */
72              uint32_t qp_rate_limit_max; /* Maximum rate limit in kbps */
73              uint32_t supported_qpts;    /* Bitmap showing which QP types are supported. */
74       };
75
76       enum ibv_raw_packet_caps {
77               IBV_RAW_PACKET_CAP_CVLAN_STRIPPING = 1 << 0, /* CVLAN stripping is supported */
78               IBV_RAW_PACKET_CAP_SCATTER_FCS          = 1 << 1, /* FCS scattering is supported */
79               IBV_RAW_PACKET_CAP_IP_CSUM         = 1 << 2, /* IP CSUM offload is supported */
80       };
81
82       enum ibv_tm_cap_flags {
83               IBV_TM_CAP_RC   = 1 << 0,            /* Support tag matching on RC transport */
84       };
85
86       struct ibv_tm_caps {
87               uint32_t        max_rndv_hdr_size;   /* Max size of rendezvous request header */
88               uint32_t        max_num_tags;        /* Max number of tagged buffers in a TM-SRQ matching list */
89               uint32_t        flags;             /* From enum ibv_tm_cap_flags */
90               uint32_t        max_ops;             /* Max number of outstanding list operations */
91               uint32_t        max_sge;             /* Max number of SGEs in a tagged buffer */
92       };
93
94       struct ibv_cq_moderation_caps {
95            uint16_t max_cq_count;
96            uint16_t max_cq_period;
97       };
98
99       Extended device capability flags (device_cap_flags_ex):
100
101       IBV_DEVICE_PCI_WRITE_END_PADDING
102
103              Indicates  the  device  has  support for padding PCI writes to a
104              full cache line.
105
106              Padding packets to full cache lines reduces the amount of  traf‐
107              fic required at the memory controller at the expense of creating
108              more traffic on the PCI-E port.
109
110              Workloads that have a high CPU memory load and  low  PCI-E  uti‐
111              lization  will  benefit  from this feature, while workloads that
112              have a high PCI-E utilization and small packets will be harmed.
113
114              For instance, with a 128 byte cache line size, the  transfer  of
115              any packets less than 128 bytes will require a full 128 transfer
116              on PCI, potentially doubling the required PCI-E bandwidth.
117
118              This feature can be  enabled  on  a  QP  or  WQ  basis  via  the
119              IBV_QP_CREATE_PCI_WRITE_END_PADDING                           or
120              IBV_WQ_FLAGS_PCI_WRITE_END_PADDING flags.
121
122

RETURN VALUE

124       ibv_query_device_ex() returns 0 on success, or the value  of  errno  on
125       failure (which indicates the failure reason).
126

NOTES

128       The  maximum  values  returned by this function are the upper limits of
129       supported resources by the device.  However, it may not be possible  to
130       use  these maximum values, since the actual number of any resource that
131       can be created may be limited by the machine configuration, the  amount
132       of  host  memory, user permissions, and the amount of resources already
133       in use by other users/processes.
134

SEE ALSO

136       ibv_query_device(3),       ibv_open_device(3),       ibv_query_port(3),
137       ibv_query_pkey(3), ibv_query_gid(3)
138

AUTHORS

140       Majd Dibbiny <majd@mellanox.com>
141
142
143
144libibverbs                        2014-12-17            IBV_QUERY_DEVICE_EX(3)
Impressum