Lines Matching defs:props

438 				struct ib_device_attr *props,
481 memset(props, 0, sizeof *props);
485 props->fw_ver = dev->dev->caps.fw_ver;
486 props->device_cap_flags = IB_DEVICE_CHANGE_PHY_PORT |
492 props->device_cap_flags |= IB_DEVICE_BAD_PKEY_CNTR;
494 props->device_cap_flags |= IB_DEVICE_BAD_QKEY_CNTR;
496 props->device_cap_flags |= IB_DEVICE_AUTO_PATH_MIG;
498 props->device_cap_flags |= IB_DEVICE_UD_AV_PORT_ENFORCE;
500 props->device_cap_flags |= IB_DEVICE_UD_IP_CSUM;
504 props->device_cap_flags |= IB_DEVICE_UD_TSO;
506 props->device_cap_flags |= IB_DEVICE_LOCAL_DMA_LKEY;
510 props->device_cap_flags |= IB_DEVICE_MEM_MGT_EXTENSIONS;
512 props->device_cap_flags |= IB_DEVICE_XRC;
514 props->device_cap_flags |= IB_DEVICE_MEM_WINDOW;
517 props->device_cap_flags |= IB_DEVICE_MEM_WINDOW_TYPE_2B;
519 props->device_cap_flags |= IB_DEVICE_MEM_WINDOW_TYPE_2A;
522 props->device_cap_flags |= IB_DEVICE_MANAGED_FLOW_STEERING;
524 props->device_cap_flags |= IB_DEVICE_RAW_IP_CSUM;
526 props->vendor_id = be32_to_cpup((__be32 *) (out_mad->data + 36)) &
528 props->vendor_part_id = dev->dev->persist->pdev->device;
529 props->hw_ver = be32_to_cpup((__be32 *) (out_mad->data + 32));
530 memcpy(&props->sys_image_guid, out_mad->data + 4, 8);
532 props->max_mr_size = ~0ull;
533 props->page_size_cap = dev->dev->caps.page_size_cap;
534 props->max_qp = dev->dev->quotas.qp;
535 props->max_qp_wr = dev->dev->caps.max_wqes - MLX4_IB_SQ_MAX_SPARE;
536 props->max_send_sge =
538 props->max_recv_sge =
540 props->max_sge_rd = MLX4_MAX_SGE_RD;
541 props->max_cq = dev->dev->quotas.cq;
542 props->max_cqe = dev->dev->caps.max_cqes;
543 props->max_mr = dev->dev->quotas.mpt;
544 props->max_pd = dev->dev->caps.num_pds - dev->dev->caps.reserved_pds;
545 props->max_qp_rd_atom = dev->dev->caps.max_qp_dest_rdma;
546 props->max_qp_init_rd_atom = dev->dev->caps.max_qp_init_rdma;
547 props->max_res_rd_atom = props->max_qp_rd_atom * props->max_qp;
548 props->max_srq = dev->dev->quotas.srq;
549 props->max_srq_wr = dev->dev->caps.max_srq_wqes - 1;
550 props->max_srq_sge = dev->dev->caps.max_srq_sge;
551 props->max_fast_reg_page_list_len = MLX4_MAX_FAST_REG_PAGES;
552 props->local_ca_ack_delay = dev->dev->caps.local_ca_ack_delay;
553 props->atomic_cap = dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_ATOMIC ?
555 props->masked_atomic_cap = props->atomic_cap;
556 props->max_pkeys = dev->dev->caps.pkey_table_len[1];
557 props->max_mcast_grp = dev->dev->caps.num_mgms + dev->dev->caps.num_amgms;
558 props->max_mcast_qp_attach = dev->dev->caps.num_qp_per_mgm;
559 props->max_total_mcast_qp_attach = props->max_mcast_qp_attach *
560 props->max_mcast_grp;
561 props->hca_core_clock = dev->dev->caps.hca_core_clock * 1000UL;
562 props->timestamp_mask = 0xFFFFFFFFFFFFULL;
563 props->max_ah = INT_MAX;
568 props->rss_caps.max_rwq_indirection_tables =
569 props->max_qp;
570 props->rss_caps.max_rwq_indirection_table_size =
572 props->rss_caps.supported_qpts = 1 << IB_QPT_RAW_PACKET;
573 props->max_wq_type_rq = props->max_qp;
577 props->raw_packet_caps |= IB_RAW_PACKET_CAP_SCATTER_FCS;
580 props->cq_caps.max_cq_moderation_count = MLX4_MAX_CQ_COUNT;
581 props->cq_caps.max_cq_moderation_period = MLX4_MAX_CQ_PERIOD;
599 if (props->rss_caps.supported_qpts) {
658 struct ib_port_attr *props, int netw_view)
684 props->lid = be16_to_cpup((__be16 *) (out_mad->data + 16));
685 props->lmc = out_mad->data[34] & 0x7;
686 props->sm_lid = be16_to_cpup((__be16 *) (out_mad->data + 18));
687 props->sm_sl = out_mad->data[36] & 0xf;
688 props->state = out_mad->data[32] & 0xf;
689 props->phys_state = out_mad->data[33] >> 4;
690 props->port_cap_flags = be32_to_cpup((__be32 *) (out_mad->data + 20));
692 props->gid_tbl_len = out_mad->data[50];
694 props->gid_tbl_len = to_mdev(ibdev)->dev->caps.gid_table_len[port];
695 props->max_msg_sz = to_mdev(ibdev)->dev->caps.max_msg_sz;
696 props->pkey_tbl_len = to_mdev(ibdev)->dev->caps.pkey_table_len[port];
697 props->bad_pkey_cntr = be16_to_cpup((__be16 *) (out_mad->data + 46));
698 props->qkey_viol_cntr = be16_to_cpup((__be16 *) (out_mad->data + 48));
699 props->active_width = out_mad->data[31] & 0xf;
700 props->active_speed = out_mad->data[35] >> 4;
701 props->max_mtu = out_mad->data[41] & 0xf;
702 props->active_mtu = out_mad->data[36] >> 4;
703 props->subnet_timeout = out_mad->data[51] & 0x1f;
704 props->max_vl_num = out_mad->data[37] >> 4;
705 props->init_type_reply = out_mad->data[41] >> 4;
708 if (props->port_cap_flags & IB_PORT_EXTENDED_SPEEDS_SUP) {
713 props->active_speed = IB_SPEED_FDR;
716 props->active_speed = IB_SPEED_EDR;
722 if (props->active_speed == IB_SPEED_QDR) {
734 props->active_speed = IB_SPEED_FDR10;
738 if (props->state == IB_PORT_DOWN)
739 props->active_speed = IB_SPEED_SDR;
754 struct ib_port_attr *props)
775 props->active_width = (((u8 *)mailbox->buf)[5] == 0x40) ||
778 props->active_speed = (((u8 *)mailbox->buf)[5] == 0x20 /*56Gb*/) ?
780 props->port_cap_flags = IB_PORT_CM_SUP;
781 props->ip_gids = true;
782 props->gid_tbl_len = mdev->dev->caps.gid_table_len[port];
783 props->max_msg_sz = mdev->dev->caps.max_msg_sz;
785 props->pkey_tbl_len = 1;
786 props->max_mtu = IB_MTU_4096;
787 props->max_vl_num = 2;
788 props->state = IB_PORT_DOWN;
789 props->phys_state = state_to_phys_state(props->state);
790 props->active_mtu = IB_MTU_256;
802 props->active_mtu = tmp ? min(props->max_mtu, tmp) : IB_MTU_256;
804 props->state = (netif_running(ndev) && netif_carrier_ok(ndev)) ?
806 props->phys_state = state_to_phys_state(props->state);
815 struct ib_port_attr *props, int netw_view)
819 /* props being zeroed by the caller, avoid zeroing it here */
822 ib_link_query_port(ibdev, port, props, netw_view) :
823 eth_link_query_port(ibdev, port, props);
829 struct ib_port_attr *props)
832 return __mlx4_ib_query_port(ibdev, port, props, 0);
998 struct ib_device_modify *props)
1013 memcpy(ibdev->node_desc, props->node_desc, IB_DEVICE_NODE_DESC_MAX);
1024 memcpy(mailbox->buf, props->node_desc, IB_DEVICE_NODE_DESC_MAX);
1060 struct ib_port_modify *props)
1081 cap_mask = (attr.port_cap_flags | props->set_port_cap_mask) &
1082 ~props->clr_port_cap_mask;