Lines Matching refs:caps
70 if (port >= hr_dev->caps.num_ports) in hns_roce_add_gid()
84 if (port >= hr_dev->caps.num_ports) in hns_roce_del_gid()
137 for (port = 0; port < hr_dev->caps.num_ports; port++) { in hns_roce_netdev_event()
154 for (i = 0; i < hr_dev->caps.num_ports; i++) { in hns_roce_setup_mtu_mac()
172 props->fw_ver = hr_dev->caps.fw_ver; in hns_roce_query_device()
175 props->page_size_cap = hr_dev->caps.page_size_cap; in hns_roce_query_device()
179 props->max_qp = hr_dev->caps.num_qps; in hns_roce_query_device()
180 props->max_qp_wr = hr_dev->caps.max_wqes; in hns_roce_query_device()
183 props->max_send_sge = hr_dev->caps.max_sq_sg; in hns_roce_query_device()
184 props->max_recv_sge = hr_dev->caps.max_rq_sg; in hns_roce_query_device()
186 props->max_cq = hr_dev->caps.num_cqs; in hns_roce_query_device()
187 props->max_cqe = hr_dev->caps.max_cqes; in hns_roce_query_device()
188 props->max_mr = hr_dev->caps.num_mtpts; in hns_roce_query_device()
189 props->max_pd = hr_dev->caps.num_pds; in hns_roce_query_device()
190 props->max_qp_rd_atom = hr_dev->caps.max_qp_dest_rdma; in hns_roce_query_device()
191 props->max_qp_init_rd_atom = hr_dev->caps.max_qp_init_rdma; in hns_roce_query_device()
192 props->atomic_cap = hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_ATOMIC ? in hns_roce_query_device()
195 props->local_ca_ack_delay = hr_dev->caps.local_ca_ack_delay; in hns_roce_query_device()
196 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) { in hns_roce_query_device()
197 props->max_srq = hr_dev->caps.num_srqs; in hns_roce_query_device()
198 props->max_srq_wr = hr_dev->caps.max_srq_wrs; in hns_roce_query_device()
199 props->max_srq_sge = hr_dev->caps.max_srq_sges; in hns_roce_query_device()
202 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_FRMR && in hns_roce_query_device()
208 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_XRC) in hns_roce_query_device()
229 props->max_mtu = hr_dev->caps.max_mtu; in hns_roce_query_port()
230 props->gid_tbl_len = hr_dev->caps.gid_table_len[port]; in hns_roce_query_port()
370 resp.qp_tab_size = hr_dev->caps.num_qps; in hns_roce_alloc_ucontext()
371 resp.srq_tab_size = hr_dev->caps.num_srqs; in hns_roce_alloc_ucontext()
383 resp.max_inline_data = hr_dev->caps.max_sq_inline; in hns_roce_alloc_ucontext()
386 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_RQ_INLINE) { in hns_roce_alloc_ucontext()
392 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_CQE_INLINE) { in hns_roce_alloc_ucontext()
406 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_CQ_RECORD_DB || in hns_roce_alloc_ucontext()
407 hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_RECORD_DB) { in hns_roce_alloc_ucontext()
412 resp.cqe_size = hr_dev->caps.cqe_sz; in hns_roce_alloc_ucontext()
496 if (to_hr_dev(ib_dev)->caps.flags & HNS_ROCE_CAP_FLAG_ROCE_V1_V2) in hns_roce_port_immutable()
508 u64 fw_ver = to_hr_dev(device)->caps.fw_ver; in hns_roce_get_fw_ver()
552 if (port_num > hr_dev->caps.num_ports) { in hns_roce_alloc_hw_port_stats()
573 if (port > hr_dev->caps.num_ports) in hns_roce_get_hw_stats()
697 ib_dev->phys_port_cnt = hr_dev->caps.num_ports; in hns_roce_register_device()
698 ib_dev->local_dma_lkey = hr_dev->caps.reserved_lkey; in hns_roce_register_device()
699 ib_dev->num_comp_vectors = hr_dev->caps.num_comp_vectors; in hns_roce_register_device()
701 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_REREG_MR) in hns_roce_register_device()
704 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_MW) in hns_roce_register_device()
707 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_FRMR) in hns_roce_register_device()
710 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) { in hns_roce_register_device()
715 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_XRC) in hns_roce_register_device()
725 for (i = 0; i < hr_dev->caps.num_ports; i++) { in hns_roce_register_device()
769 HEM_TYPE_MTPT, hr_dev->caps.mtpt_entry_sz, in hns_roce_init_hem()
770 hr_dev->caps.num_mtpts); in hns_roce_init_hem()
777 HEM_TYPE_QPC, hr_dev->caps.qpc_sz, in hns_roce_init_hem()
778 hr_dev->caps.num_qps); in hns_roce_init_hem()
786 hr_dev->caps.irrl_entry_sz * in hns_roce_init_hem()
787 hr_dev->caps.max_qp_init_rdma, in hns_roce_init_hem()
788 hr_dev->caps.num_qps); in hns_roce_init_hem()
794 if (hr_dev->caps.trrl_entry_sz) { in hns_roce_init_hem()
798 hr_dev->caps.trrl_entry_sz * in hns_roce_init_hem()
799 hr_dev->caps.max_qp_dest_rdma, in hns_roce_init_hem()
800 hr_dev->caps.num_qps); in hns_roce_init_hem()
809 HEM_TYPE_CQC, hr_dev->caps.cqc_entry_sz, in hns_roce_init_hem()
810 hr_dev->caps.num_cqs); in hns_roce_init_hem()
816 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) { in hns_roce_init_hem()
819 hr_dev->caps.srqc_entry_sz, in hns_roce_init_hem()
820 hr_dev->caps.num_srqs); in hns_roce_init_hem()
828 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_FLOW_CTRL) { in hns_roce_init_hem()
832 hr_dev->caps.sccc_sz, in hns_roce_init_hem()
833 hr_dev->caps.num_qps); in hns_roce_init_hem()
841 if (hr_dev->caps.qpc_timer_entry_sz) { in hns_roce_init_hem()
844 hr_dev->caps.qpc_timer_entry_sz, in hns_roce_init_hem()
845 hr_dev->caps.qpc_timer_bt_num); in hns_roce_init_hem()
853 if (hr_dev->caps.cqc_timer_entry_sz) { in hns_roce_init_hem()
856 hr_dev->caps.cqc_timer_entry_sz, in hns_roce_init_hem()
857 hr_dev->caps.cqc_timer_bt_num); in hns_roce_init_hem()
865 if (hr_dev->caps.gmv_entry_sz) { in hns_roce_init_hem()
868 hr_dev->caps.gmv_entry_sz, in hns_roce_init_hem()
869 hr_dev->caps.gmv_entry_num); in hns_roce_init_hem()
881 if (hr_dev->caps.cqc_timer_entry_sz) in hns_roce_init_hem()
885 if (hr_dev->caps.qpc_timer_entry_sz) in hns_roce_init_hem()
889 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_FLOW_CTRL) in hns_roce_init_hem()
893 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) in hns_roce_init_hem()
900 if (hr_dev->caps.trrl_entry_sz) in hns_roce_init_hem()
928 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_CQ_RECORD_DB || in hns_roce_setup_hca()
929 hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_RECORD_DB) { in hns_roce_setup_hca()
950 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_XRC) in hns_roce_setup_hca()
957 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) in hns_roce_setup_hca()