Lines Matching refs:attr
135 struct ibv_device_attr_ex *attr, size_t attr_size, in ibv_cmd_query_device_ex() argument
150 sizeof(attr->comp_mask)) in ibv_cmd_query_device_ex()
163 memset(attr->orig_attr.fw_ver, 0, sizeof(attr->orig_attr.fw_ver)); in ibv_cmd_query_device_ex()
164 memset(&attr->comp_mask, 0, attr_size - sizeof(attr->orig_attr)); in ibv_cmd_query_device_ex()
170 copy_query_dev_fields(&attr->orig_attr, &resp->base, raw_fw_ver); in ibv_cmd_query_device_ex()
173 attr->comp_mask = resp->comp_mask & 0; in ibv_cmd_query_device_ex()
175 sizeof(attr->odp_caps)) { in ibv_cmd_query_device_ex()
179 attr->odp_caps.general_caps = resp->odp_caps.general_caps; in ibv_cmd_query_device_ex()
180 attr->odp_caps.per_transport_caps.rc_odp_caps = in ibv_cmd_query_device_ex()
182 attr->odp_caps.per_transport_caps.uc_odp_caps = in ibv_cmd_query_device_ex()
184 attr->odp_caps.per_transport_caps.ud_odp_caps = in ibv_cmd_query_device_ex()
191 sizeof(attr->completion_timestamp_mask)) { in ibv_cmd_query_device_ex()
195 attr->completion_timestamp_mask = resp->timestamp_mask; in ibv_cmd_query_device_ex()
199 sizeof(attr->hca_core_clock)) { in ibv_cmd_query_device_ex()
203 attr->hca_core_clock = resp->hca_core_clock; in ibv_cmd_query_device_ex()
207 sizeof(attr->device_cap_flags_ex)) { in ibv_cmd_query_device_ex()
211 attr->device_cap_flags_ex = resp->device_cap_flags_ex; in ibv_cmd_query_device_ex()
215 sizeof(attr->rss_caps)) { in ibv_cmd_query_device_ex()
219 attr->rss_caps.supported_qpts = resp->rss_caps.supported_qpts; in ibv_cmd_query_device_ex()
220 attr->rss_caps.max_rwq_indirection_tables = resp->rss_caps.max_rwq_indirection_tables; in ibv_cmd_query_device_ex()
221 attr->rss_caps.max_rwq_indirection_table_size = resp->rss_caps.max_rwq_indirection_table_size; in ibv_cmd_query_device_ex()
226 sizeof(attr->max_wq_type_rq)) { in ibv_cmd_query_device_ex()
230 attr->max_wq_type_rq = resp->max_wq_type_rq; in ibv_cmd_query_device_ex()
234 sizeof(attr->raw_packet_caps)) { in ibv_cmd_query_device_ex()
238 attr->raw_packet_caps = resp->raw_packet_caps; in ibv_cmd_query_device_ex()
315 struct ibv_xrcd_init_attr *attr, in ibv_cmd_open_xrcd() argument
321 if (attr->comp_mask >= IBV_XRCD_INIT_ATTR_RESERVED) in ibv_cmd_open_xrcd()
324 if (!(attr->comp_mask & IBV_XRCD_INIT_ATTR_FD) || in ibv_cmd_open_xrcd()
325 !(attr->comp_mask & IBV_XRCD_INIT_ATTR_OFLAGS)) in ibv_cmd_open_xrcd()
328 cmd->fd = attr->fd; in ibv_cmd_open_xrcd()
329 cmd->oflags = attr->oflags; in ibv_cmd_open_xrcd()
641 struct ibv_srq *srq, struct ibv_srq_init_attr *attr, in ibv_cmd_create_srq() argument
648 cmd->max_wr = attr->attr.max_wr; in ibv_cmd_create_srq()
649 cmd->max_sge = attr->attr.max_sge; in ibv_cmd_create_srq()
650 cmd->srq_limit = attr->attr.srq_limit; in ibv_cmd_create_srq()
661 attr->attr.max_wr = resp->max_wr; in ibv_cmd_create_srq()
662 attr->attr.max_sge = resp->max_sge; in ibv_cmd_create_srq()
694 cmd->max_wr = attr_ex->attr.max_wr; in ibv_cmd_create_srq_ex()
695 cmd->max_sge = attr_ex->attr.max_sge; in ibv_cmd_create_srq_ex()
696 cmd->srq_limit = attr_ex->attr.srq_limit; in ibv_cmd_create_srq_ex()
751 attr_ex->attr.max_wr = resp->max_wr; in ibv_cmd_create_srq_ex()
752 attr_ex->attr.max_sge = resp->max_sge; in ibv_cmd_create_srq_ex()
1101 struct ibv_qp *qp, struct ibv_qp_init_attr *attr, in ibv_cmd_create_qp() argument
1109 cmd->send_cq_handle = attr->send_cq->handle; in ibv_cmd_create_qp()
1110 cmd->recv_cq_handle = attr->recv_cq->handle; in ibv_cmd_create_qp()
1111 cmd->srq_handle = attr->srq ? attr->srq->handle : 0; in ibv_cmd_create_qp()
1112 cmd->max_send_wr = attr->cap.max_send_wr; in ibv_cmd_create_qp()
1113 cmd->max_recv_wr = attr->cap.max_recv_wr; in ibv_cmd_create_qp()
1114 cmd->max_send_sge = attr->cap.max_send_sge; in ibv_cmd_create_qp()
1115 cmd->max_recv_sge = attr->cap.max_recv_sge; in ibv_cmd_create_qp()
1116 cmd->max_inline_data = attr->cap.max_inline_data; in ibv_cmd_create_qp()
1117 cmd->sq_sig_all = attr->sq_sig_all; in ibv_cmd_create_qp()
1118 cmd->qp_type = attr->qp_type; in ibv_cmd_create_qp()
1119 cmd->is_srq = !!attr->srq; in ibv_cmd_create_qp()
1132 attr->cap.max_recv_sge = resp->max_recv_sge; in ibv_cmd_create_qp()
1133 attr->cap.max_send_sge = resp->max_send_sge; in ibv_cmd_create_qp()
1134 attr->cap.max_recv_wr = resp->max_recv_wr; in ibv_cmd_create_qp()
1135 attr->cap.max_send_wr = resp->max_send_wr; in ibv_cmd_create_qp()
1136 attr->cap.max_inline_data = resp->max_inline_data; in ibv_cmd_create_qp()
1160 struct ibv_qp_open_attr *attr, in ibv_cmd_open_qp() argument
1168 if (attr->comp_mask >= IBV_QP_OPEN_ATTR_RESERVED) in ibv_cmd_open_qp()
1171 if (!(attr->comp_mask & IBV_QP_OPEN_ATTR_XRCD) || in ibv_cmd_open_qp()
1172 !(attr->comp_mask & IBV_QP_OPEN_ATTR_NUM) || in ibv_cmd_open_qp()
1173 !(attr->comp_mask & IBV_QP_OPEN_ATTR_TYPE)) in ibv_cmd_open_qp()
1176 xrcd = container_of(attr->xrcd, struct verbs_xrcd, xrcd); in ibv_cmd_open_qp()
1179 cmd->qpn = attr->qp_num; in ibv_cmd_open_qp()
1180 cmd->qp_type = attr->qp_type; in ibv_cmd_open_qp()
1199 qp->qp.qp_context = attr->qp_context; in ibv_cmd_open_qp()
1204 qp->qp.qp_num = attr->qp_num; in ibv_cmd_open_qp()
1205 qp->qp.qp_type = attr->qp_type; in ibv_cmd_open_qp()
1224 int ibv_cmd_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, in ibv_cmd_query_qp() argument
1247 attr->qkey = resp.qkey; in ibv_cmd_query_qp()
1248 attr->rq_psn = resp.rq_psn; in ibv_cmd_query_qp()
1249 attr->sq_psn = resp.sq_psn; in ibv_cmd_query_qp()
1250 attr->dest_qp_num = resp.dest_qp_num; in ibv_cmd_query_qp()
1251 attr->qp_access_flags = resp.qp_access_flags; in ibv_cmd_query_qp()
1252 attr->pkey_index = resp.pkey_index; in ibv_cmd_query_qp()
1253 attr->alt_pkey_index = resp.alt_pkey_index; in ibv_cmd_query_qp()
1254 attr->qp_state = resp.qp_state; in ibv_cmd_query_qp()
1255 attr->cur_qp_state = resp.cur_qp_state; in ibv_cmd_query_qp()
1256 attr->path_mtu = resp.path_mtu; in ibv_cmd_query_qp()
1257 attr->path_mig_state = resp.path_mig_state; in ibv_cmd_query_qp()
1258 attr->sq_draining = resp.sq_draining; in ibv_cmd_query_qp()
1259 attr->max_rd_atomic = resp.max_rd_atomic; in ibv_cmd_query_qp()
1260 attr->max_dest_rd_atomic = resp.max_dest_rd_atomic; in ibv_cmd_query_qp()
1261 attr->min_rnr_timer = resp.min_rnr_timer; in ibv_cmd_query_qp()
1262 attr->port_num = resp.port_num; in ibv_cmd_query_qp()
1263 attr->timeout = resp.timeout; in ibv_cmd_query_qp()
1264 attr->retry_cnt = resp.retry_cnt; in ibv_cmd_query_qp()
1265 attr->rnr_retry = resp.rnr_retry; in ibv_cmd_query_qp()
1266 attr->alt_port_num = resp.alt_port_num; in ibv_cmd_query_qp()
1267 attr->alt_timeout = resp.alt_timeout; in ibv_cmd_query_qp()
1268 attr->cap.max_send_wr = resp.max_send_wr; in ibv_cmd_query_qp()
1269 attr->cap.max_recv_wr = resp.max_recv_wr; in ibv_cmd_query_qp()
1270 attr->cap.max_send_sge = resp.max_send_sge; in ibv_cmd_query_qp()
1271 attr->cap.max_recv_sge = resp.max_recv_sge; in ibv_cmd_query_qp()
1272 attr->cap.max_inline_data = resp.max_inline_data; in ibv_cmd_query_qp()
1274 memcpy(attr->ah_attr.grh.dgid.raw, resp.dest.dgid, 16); in ibv_cmd_query_qp()
1275 attr->ah_attr.grh.flow_label = resp.dest.flow_label; in ibv_cmd_query_qp()
1276 attr->ah_attr.dlid = resp.dest.dlid; in ibv_cmd_query_qp()
1277 attr->ah_attr.grh.sgid_index = resp.dest.sgid_index; in ibv_cmd_query_qp()
1278 attr->ah_attr.grh.hop_limit = resp.dest.hop_limit; in ibv_cmd_query_qp()
1279 attr->ah_attr.grh.traffic_class = resp.dest.traffic_class; in ibv_cmd_query_qp()
1280 attr->ah_attr.sl = resp.dest.sl; in ibv_cmd_query_qp()
1281 attr->ah_attr.src_path_bits = resp.dest.src_path_bits; in ibv_cmd_query_qp()
1282 attr->ah_attr.static_rate = resp.dest.static_rate; in ibv_cmd_query_qp()
1283 attr->ah_attr.is_global = resp.dest.is_global; in ibv_cmd_query_qp()
1284 attr->ah_attr.port_num = resp.dest.port_num; in ibv_cmd_query_qp()
1286 memcpy(attr->alt_ah_attr.grh.dgid.raw, resp.alt_dest.dgid, 16); in ibv_cmd_query_qp()
1287 attr->alt_ah_attr.grh.flow_label = resp.alt_dest.flow_label; in ibv_cmd_query_qp()
1288 attr->alt_ah_attr.dlid = resp.alt_dest.dlid; in ibv_cmd_query_qp()
1289 attr->alt_ah_attr.grh.sgid_index = resp.alt_dest.sgid_index; in ibv_cmd_query_qp()
1290 attr->alt_ah_attr.grh.hop_limit = resp.alt_dest.hop_limit; in ibv_cmd_query_qp()
1291 attr->alt_ah_attr.grh.traffic_class = resp.alt_dest.traffic_class; in ibv_cmd_query_qp()
1292 attr->alt_ah_attr.sl = resp.alt_dest.sl; in ibv_cmd_query_qp()
1293 attr->alt_ah_attr.src_path_bits = resp.alt_dest.src_path_bits; in ibv_cmd_query_qp()
1294 attr->alt_ah_attr.static_rate = resp.alt_dest.static_rate; in ibv_cmd_query_qp()
1295 attr->alt_ah_attr.is_global = resp.alt_dest.is_global; in ibv_cmd_query_qp()
1296 attr->alt_ah_attr.port_num = resp.alt_dest.port_num; in ibv_cmd_query_qp()
1313 static void copy_modify_qp_fields(struct ibv_qp *qp, struct ibv_qp_attr *attr, in copy_modify_qp_fields() argument
1321 cmd->qp_state = attr->qp_state; in copy_modify_qp_fields()
1323 cmd->cur_qp_state = attr->cur_qp_state; in copy_modify_qp_fields()
1325 cmd->en_sqd_async_notify = attr->en_sqd_async_notify; in copy_modify_qp_fields()
1327 cmd->qp_access_flags = attr->qp_access_flags; in copy_modify_qp_fields()
1329 cmd->pkey_index = attr->pkey_index; in copy_modify_qp_fields()
1331 cmd->port_num = attr->port_num; in copy_modify_qp_fields()
1333 cmd->qkey = attr->qkey; in copy_modify_qp_fields()
1336 memcpy(cmd->dest.dgid, attr->ah_attr.grh.dgid.raw, 16); in copy_modify_qp_fields()
1337 cmd->dest.flow_label = attr->ah_attr.grh.flow_label; in copy_modify_qp_fields()
1338 cmd->dest.dlid = attr->ah_attr.dlid; in copy_modify_qp_fields()
1340 cmd->dest.sgid_index = attr->ah_attr.grh.sgid_index; in copy_modify_qp_fields()
1341 cmd->dest.hop_limit = attr->ah_attr.grh.hop_limit; in copy_modify_qp_fields()
1342 cmd->dest.traffic_class = attr->ah_attr.grh.traffic_class; in copy_modify_qp_fields()
1343 cmd->dest.sl = attr->ah_attr.sl; in copy_modify_qp_fields()
1344 cmd->dest.src_path_bits = attr->ah_attr.src_path_bits; in copy_modify_qp_fields()
1345 cmd->dest.static_rate = attr->ah_attr.static_rate; in copy_modify_qp_fields()
1346 cmd->dest.is_global = attr->ah_attr.is_global; in copy_modify_qp_fields()
1347 cmd->dest.port_num = attr->ah_attr.port_num; in copy_modify_qp_fields()
1351 cmd->path_mtu = attr->path_mtu; in copy_modify_qp_fields()
1353 cmd->timeout = attr->timeout; in copy_modify_qp_fields()
1355 cmd->retry_cnt = attr->retry_cnt; in copy_modify_qp_fields()
1357 cmd->rnr_retry = attr->rnr_retry; in copy_modify_qp_fields()
1359 cmd->rq_psn = attr->rq_psn; in copy_modify_qp_fields()
1361 cmd->max_rd_atomic = attr->max_rd_atomic; in copy_modify_qp_fields()
1364 cmd->alt_pkey_index = attr->alt_pkey_index; in copy_modify_qp_fields()
1365 cmd->alt_port_num = attr->alt_port_num; in copy_modify_qp_fields()
1366 cmd->alt_timeout = attr->alt_timeout; in copy_modify_qp_fields()
1368 memcpy(cmd->alt_dest.dgid, attr->alt_ah_attr.grh.dgid.raw, 16); in copy_modify_qp_fields()
1369 cmd->alt_dest.flow_label = attr->alt_ah_attr.grh.flow_label; in copy_modify_qp_fields()
1370 cmd->alt_dest.dlid = attr->alt_ah_attr.dlid; in copy_modify_qp_fields()
1372 cmd->alt_dest.sgid_index = attr->alt_ah_attr.grh.sgid_index; in copy_modify_qp_fields()
1373 cmd->alt_dest.hop_limit = attr->alt_ah_attr.grh.hop_limit; in copy_modify_qp_fields()
1375 attr->alt_ah_attr.grh.traffic_class; in copy_modify_qp_fields()
1376 cmd->alt_dest.sl = attr->alt_ah_attr.sl; in copy_modify_qp_fields()
1377 cmd->alt_dest.src_path_bits = attr->alt_ah_attr.src_path_bits; in copy_modify_qp_fields()
1378 cmd->alt_dest.static_rate = attr->alt_ah_attr.static_rate; in copy_modify_qp_fields()
1379 cmd->alt_dest.is_global = attr->alt_ah_attr.is_global; in copy_modify_qp_fields()
1380 cmd->alt_dest.port_num = attr->alt_ah_attr.port_num; in copy_modify_qp_fields()
1384 cmd->min_rnr_timer = attr->min_rnr_timer; in copy_modify_qp_fields()
1386 cmd->sq_psn = attr->sq_psn; in copy_modify_qp_fields()
1388 cmd->max_dest_rd_atomic = attr->max_dest_rd_atomic; in copy_modify_qp_fields()
1390 cmd->path_mig_state = attr->path_mig_state; in copy_modify_qp_fields()
1392 cmd->dest_qp_num = attr->dest_qp_num; in copy_modify_qp_fields()
1397 int ibv_cmd_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, in ibv_cmd_modify_qp() argument
1410 copy_modify_qp_fields(qp, attr, attr_mask, &cmd->base); in ibv_cmd_modify_qp()
1418 int ibv_cmd_modify_qp_ex(struct ibv_qp *qp, struct ibv_qp_attr *attr, in ibv_cmd_modify_qp_ex() argument
1431 copy_modify_qp_fields(qp, attr, attr_mask, &cmd->base); in ibv_cmd_modify_qp_ex()
1436 cmd->rate_limit = attr->rate_limit; in ibv_cmd_modify_qp_ex()
1662 struct ibv_ah_attr *attr, in ibv_cmd_create_ah() argument
1671 cmd.attr.dlid = attr->dlid; in ibv_cmd_create_ah()
1672 cmd.attr.sl = attr->sl; in ibv_cmd_create_ah()
1673 cmd.attr.src_path_bits = attr->src_path_bits; in ibv_cmd_create_ah()
1674 cmd.attr.static_rate = attr->static_rate; in ibv_cmd_create_ah()
1675 cmd.attr.is_global = attr->is_global; in ibv_cmd_create_ah()
1676 cmd.attr.port_num = attr->port_num; in ibv_cmd_create_ah()
1677 cmd.attr.grh.flow_label = attr->grh.flow_label; in ibv_cmd_create_ah()
1678 cmd.attr.grh.sgid_index = attr->grh.sgid_index; in ibv_cmd_create_ah()
1679 cmd.attr.grh.hop_limit = attr->grh.hop_limit; in ibv_cmd_create_ah()
1680 cmd.attr.grh.traffic_class = attr->grh.traffic_class; in ibv_cmd_create_ah()
1681 memcpy(cmd.attr.grh.dgid, attr->grh.dgid.raw, 16); in ibv_cmd_create_ah()
2047 int ibv_cmd_modify_wq(struct ibv_wq *wq, struct ibv_wq_attr *attr, in ibv_cmd_modify_wq() argument
2051 if (attr->attr_mask >= IBV_WQ_ATTR_RESERVED) in ibv_cmd_modify_wq()
2057 cmd->curr_wq_state = attr->curr_wq_state; in ibv_cmd_modify_wq()
2058 cmd->wq_state = attr->wq_state; in ibv_cmd_modify_wq()
2061 if (attr->attr_mask & IBV_WQ_ATTR_FLAGS) { in ibv_cmd_modify_wq()
2062 if (attr->flags_mask & ~(IBV_WQ_FLAGS_RESERVED - 1)) in ibv_cmd_modify_wq()
2064 cmd->flags = attr->flags; in ibv_cmd_modify_wq()
2065 cmd->flags_mask = attr->flags_mask; in ibv_cmd_modify_wq()
2069 cmd->attr_mask = attr->attr_mask; in ibv_cmd_modify_wq()
2074 if (attr->attr_mask & IBV_WQ_ATTR_STATE) in ibv_cmd_modify_wq()
2075 wq->state = attr->wq_state; in ibv_cmd_modify_wq()