Lines Matching refs:props

135 				struct ib_device_attr *props)  in mlx4_ib_query_device()  argument
156 memset(props, 0, sizeof *props); in mlx4_ib_query_device()
160 props->fw_ver = dev->dev->caps.fw_ver; in mlx4_ib_query_device()
161 props->device_cap_flags = IB_DEVICE_CHANGE_PHY_PORT | in mlx4_ib_query_device()
167 props->device_cap_flags |= IB_DEVICE_BAD_PKEY_CNTR; in mlx4_ib_query_device()
169 props->device_cap_flags |= IB_DEVICE_BAD_QKEY_CNTR; in mlx4_ib_query_device()
171 props->device_cap_flags |= IB_DEVICE_AUTO_PATH_MIG; in mlx4_ib_query_device()
173 props->device_cap_flags |= IB_DEVICE_UD_AV_PORT_ENFORCE; in mlx4_ib_query_device()
175 props->device_cap_flags |= IB_DEVICE_UD_IP_CSUM; in mlx4_ib_query_device()
179 props->device_cap_flags |= IB_DEVICE_UD_TSO; in mlx4_ib_query_device()
181 props->device_cap_flags |= IB_DEVICE_LOCAL_DMA_LKEY; in mlx4_ib_query_device()
185 props->device_cap_flags |= IB_DEVICE_MEM_MGT_EXTENSIONS; in mlx4_ib_query_device()
187 props->device_cap_flags |= IB_DEVICE_XRC; in mlx4_ib_query_device()
189 props->device_cap_flags |= IB_DEVICE_MEM_WINDOW; in mlx4_ib_query_device()
192 props->device_cap_flags |= IB_DEVICE_MEM_WINDOW_TYPE_2B; in mlx4_ib_query_device()
194 props->device_cap_flags |= IB_DEVICE_MEM_WINDOW_TYPE_2A; in mlx4_ib_query_device()
196 props->device_cap_flags |= IB_DEVICE_MANAGED_FLOW_STEERING; in mlx4_ib_query_device()
199 props->vendor_id = be32_to_cpup((__be32 *) (out_mad->data + 36)) & in mlx4_ib_query_device()
201 props->vendor_part_id = dev->dev->persist->pdev->device; in mlx4_ib_query_device()
202 props->hw_ver = be32_to_cpup((__be32 *) (out_mad->data + 32)); in mlx4_ib_query_device()
203 memcpy(&props->sys_image_guid, out_mad->data + 4, 8); in mlx4_ib_query_device()
205 props->max_mr_size = ~0ull; in mlx4_ib_query_device()
206 props->page_size_cap = dev->dev->caps.page_size_cap; in mlx4_ib_query_device()
207 props->max_qp = dev->dev->quotas.qp; in mlx4_ib_query_device()
208 props->max_qp_wr = dev->dev->caps.max_wqes - MLX4_IB_SQ_MAX_SPARE; in mlx4_ib_query_device()
209 props->max_sge = min(dev->dev->caps.max_sq_sg, in mlx4_ib_query_device()
211 props->max_cq = dev->dev->quotas.cq; in mlx4_ib_query_device()
212 props->max_cqe = dev->dev->caps.max_cqes; in mlx4_ib_query_device()
213 props->max_mr = dev->dev->quotas.mpt; in mlx4_ib_query_device()
214 props->max_pd = dev->dev->caps.num_pds - dev->dev->caps.reserved_pds; in mlx4_ib_query_device()
215 props->max_qp_rd_atom = dev->dev->caps.max_qp_dest_rdma; in mlx4_ib_query_device()
216 props->max_qp_init_rd_atom = dev->dev->caps.max_qp_init_rdma; in mlx4_ib_query_device()
217 props->max_res_rd_atom = props->max_qp_rd_atom * props->max_qp; in mlx4_ib_query_device()
218 props->max_srq = dev->dev->quotas.srq; in mlx4_ib_query_device()
219 props->max_srq_wr = dev->dev->caps.max_srq_wqes - 1; in mlx4_ib_query_device()
220 props->max_srq_sge = dev->dev->caps.max_srq_sge; in mlx4_ib_query_device()
221 props->max_fast_reg_page_list_len = MLX4_MAX_FAST_REG_PAGES; in mlx4_ib_query_device()
222 props->local_ca_ack_delay = dev->dev->caps.local_ca_ack_delay; in mlx4_ib_query_device()
223 props->atomic_cap = dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_ATOMIC ? in mlx4_ib_query_device()
225 props->masked_atomic_cap = props->atomic_cap; in mlx4_ib_query_device()
226 props->max_pkeys = dev->dev->caps.pkey_table_len[1]; in mlx4_ib_query_device()
227 props->max_mcast_grp = dev->dev->caps.num_mgms + dev->dev->caps.num_amgms; in mlx4_ib_query_device()
228 props->max_mcast_qp_attach = dev->dev->caps.num_qp_per_mgm; in mlx4_ib_query_device()
229 props->max_total_mcast_qp_attach = props->max_mcast_qp_attach * in mlx4_ib_query_device()
230 props->max_mcast_grp; in mlx4_ib_query_device()
231 props->max_map_per_fmr = dev->dev->caps.max_fmr_maps; in mlx4_ib_query_device()
250 struct ib_port_attr *props, int netw_view) in ib_link_query_port() argument
276 props->lid = be16_to_cpup((__be16 *) (out_mad->data + 16)); in ib_link_query_port()
277 props->lmc = out_mad->data[34] & 0x7; in ib_link_query_port()
278 props->sm_lid = be16_to_cpup((__be16 *) (out_mad->data + 18)); in ib_link_query_port()
279 props->sm_sl = out_mad->data[36] & 0xf; in ib_link_query_port()
280 props->state = out_mad->data[32] & 0xf; in ib_link_query_port()
281 props->phys_state = out_mad->data[33] >> 4; in ib_link_query_port()
282 props->port_cap_flags = be32_to_cpup((__be32 *) (out_mad->data + 20)); in ib_link_query_port()
284 props->gid_tbl_len = out_mad->data[50]; in ib_link_query_port()
286 props->gid_tbl_len = to_mdev(ibdev)->dev->caps.gid_table_len[port]; in ib_link_query_port()
287 props->max_msg_sz = to_mdev(ibdev)->dev->caps.max_msg_sz; in ib_link_query_port()
288 props->pkey_tbl_len = to_mdev(ibdev)->dev->caps.pkey_table_len[port]; in ib_link_query_port()
289 props->bad_pkey_cntr = be16_to_cpup((__be16 *) (out_mad->data + 46)); in ib_link_query_port()
290 props->qkey_viol_cntr = be16_to_cpup((__be16 *) (out_mad->data + 48)); in ib_link_query_port()
291 props->active_width = out_mad->data[31] & 0xf; in ib_link_query_port()
292 props->active_speed = out_mad->data[35] >> 4; in ib_link_query_port()
293 props->max_mtu = out_mad->data[41] & 0xf; in ib_link_query_port()
294 props->active_mtu = out_mad->data[36] >> 4; in ib_link_query_port()
295 props->subnet_timeout = out_mad->data[51] & 0x1f; in ib_link_query_port()
296 props->max_vl_num = out_mad->data[37] >> 4; in ib_link_query_port()
297 props->init_type_reply = out_mad->data[41] >> 4; in ib_link_query_port()
300 if (props->port_cap_flags & IB_PORT_EXTENDED_SPEEDS_SUP) { in ib_link_query_port()
305 props->active_speed = IB_SPEED_FDR; in ib_link_query_port()
308 props->active_speed = IB_SPEED_EDR; in ib_link_query_port()
314 if (props->active_speed == IB_SPEED_QDR) { in ib_link_query_port()
326 props->active_speed = IB_SPEED_FDR10; in ib_link_query_port()
330 if (props->state == IB_PORT_DOWN) in ib_link_query_port()
331 props->active_speed = IB_SPEED_SDR; in ib_link_query_port()
345 struct ib_port_attr *props, int netw_view) in eth_link_query_port() argument
366 props->active_width = (((u8 *)mailbox->buf)[5] == 0x40) ? in eth_link_query_port()
368 props->active_speed = IB_SPEED_QDR; in eth_link_query_port()
369 props->port_cap_flags = IB_PORT_CM_SUP | IB_PORT_IP_BASED_GIDS; in eth_link_query_port()
370 props->gid_tbl_len = mdev->dev->caps.gid_table_len[port]; in eth_link_query_port()
371 props->max_msg_sz = mdev->dev->caps.max_msg_sz; in eth_link_query_port()
372 props->pkey_tbl_len = 1; in eth_link_query_port()
373 props->max_mtu = IB_MTU_4096; in eth_link_query_port()
374 props->max_vl_num = 2; in eth_link_query_port()
375 props->state = IB_PORT_DOWN; in eth_link_query_port()
376 props->phys_state = state_to_phys_state(props->state); in eth_link_query_port()
377 props->active_mtu = IB_MTU_256; in eth_link_query_port()
388 props->active_mtu = tmp ? min(props->max_mtu, tmp) : IB_MTU_256; in eth_link_query_port()
390 props->state = (netif_running(ndev) && netif_carrier_ok(ndev)) ? in eth_link_query_port()
392 props->phys_state = state_to_phys_state(props->state); in eth_link_query_port()
403 struct ib_port_attr *props, int netw_view) in __mlx4_ib_query_port() argument
407 memset(props, 0, sizeof *props); in __mlx4_ib_query_port()
410 ib_link_query_port(ibdev, port, props, netw_view) : in __mlx4_ib_query_port()
411 eth_link_query_port(ibdev, port, props, netw_view); in __mlx4_ib_query_port()
417 struct ib_port_attr *props) in mlx4_ib_query_port() argument
420 return __mlx4_ib_query_port(ibdev, port, props, 0); in mlx4_ib_query_port()
537 struct ib_device_modify *props) in mlx4_ib_modify_device() argument
552 memcpy(ibdev->node_desc, props->node_desc, 64); in mlx4_ib_modify_device()
563 memcpy(mailbox->buf, props->node_desc, 64); in mlx4_ib_modify_device()
599 struct ib_port_modify *props) in mlx4_ib_modify_port() argument
620 cap_mask = (attr.port_cap_flags | props->set_port_cap_mask) & in mlx4_ib_modify_port()
621 ~props->clr_port_cap_mask; in mlx4_ib_modify_port()