Lines Matching full:caps

71 	if (port >= hr_dev->caps.num_ports)  in hns_roce_add_gid()
85 if (port >= hr_dev->caps.num_ports) in hns_roce_del_gid()
138 for (port = 0; port < hr_dev->caps.num_ports; port++) { in hns_roce_netdev_event()
155 for (i = 0; i < hr_dev->caps.num_ports; i++) { in hns_roce_setup_mtu_mac()
173 props->fw_ver = hr_dev->caps.fw_ver; in hns_roce_query_device()
176 props->page_size_cap = hr_dev->caps.page_size_cap; in hns_roce_query_device()
180 props->max_qp = hr_dev->caps.num_qps; in hns_roce_query_device()
181 props->max_qp_wr = hr_dev->caps.max_wqes; in hns_roce_query_device()
184 props->max_send_sge = hr_dev->caps.max_sq_sg; in hns_roce_query_device()
185 props->max_recv_sge = hr_dev->caps.max_rq_sg; in hns_roce_query_device()
187 props->max_cq = hr_dev->caps.num_cqs; in hns_roce_query_device()
188 props->max_cqe = hr_dev->caps.max_cqes; in hns_roce_query_device()
189 props->max_mr = hr_dev->caps.num_mtpts; in hns_roce_query_device()
190 props->max_pd = hr_dev->caps.num_pds; in hns_roce_query_device()
191 props->max_qp_rd_atom = hr_dev->caps.max_qp_dest_rdma; in hns_roce_query_device()
192 props->max_qp_init_rd_atom = hr_dev->caps.max_qp_init_rdma; in hns_roce_query_device()
193 props->atomic_cap = hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_ATOMIC ? in hns_roce_query_device()
196 props->local_ca_ack_delay = hr_dev->caps.local_ca_ack_delay; in hns_roce_query_device()
203 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) { in hns_roce_query_device()
204 props->max_srq = hr_dev->caps.num_srqs; in hns_roce_query_device()
205 props->max_srq_wr = hr_dev->caps.max_srq_wrs; in hns_roce_query_device()
206 props->max_srq_sge = hr_dev->caps.max_srq_sges; in hns_roce_query_device()
209 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_FRMR && in hns_roce_query_device()
215 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_XRC) in hns_roce_query_device()
236 props->max_mtu = hr_dev->caps.max_mtu; in hns_roce_query_port()
237 props->gid_tbl_len = hr_dev->caps.gid_table_len[port]; in hns_roce_query_port()
377 resp.qp_tab_size = hr_dev->caps.num_qps; in hns_roce_alloc_ucontext()
378 resp.srq_tab_size = hr_dev->caps.num_srqs; in hns_roce_alloc_ucontext()
390 resp.max_inline_data = hr_dev->caps.max_sq_inline; in hns_roce_alloc_ucontext()
393 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_RQ_INLINE) { in hns_roce_alloc_ucontext()
399 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_CQE_INLINE) { in hns_roce_alloc_ucontext()
406 resp.congest_type = hr_dev->caps.cong_cap; in hns_roce_alloc_ucontext()
416 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_CQ_RECORD_DB || in hns_roce_alloc_ucontext()
417 hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_RECORD_DB) { in hns_roce_alloc_ucontext()
422 resp.cqe_size = hr_dev->caps.cqe_sz; in hns_roce_alloc_ucontext()
432 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_CQ_RECORD_DB || in hns_roce_alloc_ucontext()
433 hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_RECORD_DB) in hns_roce_alloc_ucontext()
451 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_CQ_RECORD_DB || in hns_roce_dealloc_ucontext()
452 hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_RECORD_DB) in hns_roce_dealloc_ucontext()
521 if (to_hr_dev(ib_dev)->caps.flags & HNS_ROCE_CAP_FLAG_ROCE_V1_V2) in hns_roce_port_immutable()
533 u64 fw_ver = to_hr_dev(device)->caps.fw_ver; in hns_roce_get_fw_ver()
577 if (port_num > hr_dev->caps.num_ports) { in hns_roce_alloc_hw_port_stats()
598 if (port > hr_dev->caps.num_ports) in hns_roce_get_hw_stats()
724 ib_dev->phys_port_cnt = hr_dev->caps.num_ports; in hns_roce_register_device()
725 ib_dev->local_dma_lkey = hr_dev->caps.reserved_lkey; in hns_roce_register_device()
726 ib_dev->num_comp_vectors = hr_dev->caps.num_comp_vectors; in hns_roce_register_device()
728 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_REREG_MR) in hns_roce_register_device()
731 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_MW) in hns_roce_register_device()
734 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_FRMR) in hns_roce_register_device()
737 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) { in hns_roce_register_device()
742 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_XRC) in hns_roce_register_device()
752 for (i = 0; i < hr_dev->caps.num_ports; i++) { in hns_roce_register_device()
796 HEM_TYPE_MTPT, hr_dev->caps.mtpt_entry_sz, in hns_roce_init_hem()
797 hr_dev->caps.num_mtpts); in hns_roce_init_hem()
804 HEM_TYPE_QPC, hr_dev->caps.qpc_sz, in hns_roce_init_hem()
805 hr_dev->caps.num_qps); in hns_roce_init_hem()
813 hr_dev->caps.irrl_entry_sz * in hns_roce_init_hem()
814 hr_dev->caps.max_qp_init_rdma, in hns_roce_init_hem()
815 hr_dev->caps.num_qps); in hns_roce_init_hem()
821 if (hr_dev->caps.trrl_entry_sz) { in hns_roce_init_hem()
825 hr_dev->caps.trrl_entry_sz * in hns_roce_init_hem()
826 hr_dev->caps.max_qp_dest_rdma, in hns_roce_init_hem()
827 hr_dev->caps.num_qps); in hns_roce_init_hem()
836 HEM_TYPE_CQC, hr_dev->caps.cqc_entry_sz, in hns_roce_init_hem()
837 hr_dev->caps.num_cqs); in hns_roce_init_hem()
843 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) { in hns_roce_init_hem()
846 hr_dev->caps.srqc_entry_sz, in hns_roce_init_hem()
847 hr_dev->caps.num_srqs); in hns_roce_init_hem()
855 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_FLOW_CTRL) { in hns_roce_init_hem()
859 hr_dev->caps.sccc_sz, in hns_roce_init_hem()
860 hr_dev->caps.num_qps); in hns_roce_init_hem()
868 if (hr_dev->caps.qpc_timer_entry_sz) { in hns_roce_init_hem()
871 hr_dev->caps.qpc_timer_entry_sz, in hns_roce_init_hem()
872 hr_dev->caps.qpc_timer_bt_num); in hns_roce_init_hem()
880 if (hr_dev->caps.cqc_timer_entry_sz) { in hns_roce_init_hem()
883 hr_dev->caps.cqc_timer_entry_sz, in hns_roce_init_hem()
884 hr_dev->caps.cqc_timer_bt_num); in hns_roce_init_hem()
892 if (hr_dev->caps.gmv_entry_sz) { in hns_roce_init_hem()
895 hr_dev->caps.gmv_entry_sz, in hns_roce_init_hem()
896 hr_dev->caps.gmv_entry_num); in hns_roce_init_hem()
908 if (hr_dev->caps.cqc_timer_entry_sz) in hns_roce_init_hem()
912 if (hr_dev->caps.qpc_timer_entry_sz) in hns_roce_init_hem()
916 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_FLOW_CTRL) in hns_roce_init_hem()
920 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) in hns_roce_init_hem()
927 if (hr_dev->caps.trrl_entry_sz) in hns_roce_init_hem()
947 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_CQ_RECORD_DB || in hns_roce_teardown_hca()
948 hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_RECORD_DB) in hns_roce_teardown_hca()
964 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_CQ_RECORD_DB || in hns_roce_setup_hca()
965 hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_RECORD_DB) { in hns_roce_setup_hca()
986 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_XRC) in hns_roce_setup_hca()
993 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) in hns_roce_setup_hca()
1000 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_CQ_RECORD_DB || in hns_roce_setup_hca()
1001 hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_RECORD_DB) in hns_roce_setup_hca()