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()
186 props->max_sge_rd = hr_dev->caps.max_sq_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()
526 if (to_hr_dev(ib_dev)->caps.flags & HNS_ROCE_CAP_FLAG_ROCE_V1_V2) in hns_roce_port_immutable()
538 u64 fw_ver = to_hr_dev(device)->caps.fw_ver; in hns_roce_get_fw_ver()
582 if (port_num > hr_dev->caps.num_ports) { in hns_roce_alloc_hw_port_stats()
603 if (port > hr_dev->caps.num_ports) in hns_roce_get_hw_stats()
729 ib_dev->phys_port_cnt = hr_dev->caps.num_ports; in hns_roce_register_device()
730 ib_dev->local_dma_lkey = hr_dev->caps.reserved_lkey; in hns_roce_register_device()
731 ib_dev->num_comp_vectors = hr_dev->caps.num_comp_vectors; in hns_roce_register_device()
733 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_REREG_MR) in hns_roce_register_device()
736 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_MW) in hns_roce_register_device()
739 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_FRMR) in hns_roce_register_device()
742 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) { in hns_roce_register_device()
747 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_XRC) in hns_roce_register_device()
757 for (i = 0; i < hr_dev->caps.num_ports; i++) { in hns_roce_register_device()
801 HEM_TYPE_MTPT, hr_dev->caps.mtpt_entry_sz, in hns_roce_init_hem()
802 hr_dev->caps.num_mtpts); in hns_roce_init_hem()
809 HEM_TYPE_QPC, hr_dev->caps.qpc_sz, in hns_roce_init_hem()
810 hr_dev->caps.num_qps); in hns_roce_init_hem()
818 hr_dev->caps.irrl_entry_sz * in hns_roce_init_hem()
819 hr_dev->caps.max_qp_init_rdma, in hns_roce_init_hem()
820 hr_dev->caps.num_qps); in hns_roce_init_hem()
826 if (hr_dev->caps.trrl_entry_sz) { in hns_roce_init_hem()
830 hr_dev->caps.trrl_entry_sz * in hns_roce_init_hem()
831 hr_dev->caps.max_qp_dest_rdma, in hns_roce_init_hem()
832 hr_dev->caps.num_qps); in hns_roce_init_hem()
841 HEM_TYPE_CQC, hr_dev->caps.cqc_entry_sz, in hns_roce_init_hem()
842 hr_dev->caps.num_cqs); in hns_roce_init_hem()
848 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) { in hns_roce_init_hem()
851 hr_dev->caps.srqc_entry_sz, in hns_roce_init_hem()
852 hr_dev->caps.num_srqs); in hns_roce_init_hem()
860 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_FLOW_CTRL) { in hns_roce_init_hem()
864 hr_dev->caps.sccc_sz, in hns_roce_init_hem()
865 hr_dev->caps.num_qps); in hns_roce_init_hem()
873 if (hr_dev->caps.qpc_timer_entry_sz) { in hns_roce_init_hem()
876 hr_dev->caps.qpc_timer_entry_sz, in hns_roce_init_hem()
877 hr_dev->caps.qpc_timer_bt_num); in hns_roce_init_hem()
885 if (hr_dev->caps.cqc_timer_entry_sz) { in hns_roce_init_hem()
888 hr_dev->caps.cqc_timer_entry_sz, in hns_roce_init_hem()
889 hr_dev->caps.cqc_timer_bt_num); in hns_roce_init_hem()
897 if (hr_dev->caps.gmv_entry_sz) { in hns_roce_init_hem()
900 hr_dev->caps.gmv_entry_sz, in hns_roce_init_hem()
901 hr_dev->caps.gmv_entry_num); in hns_roce_init_hem()
913 if (hr_dev->caps.cqc_timer_entry_sz) in hns_roce_init_hem()
917 if (hr_dev->caps.qpc_timer_entry_sz) in hns_roce_init_hem()
921 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_FLOW_CTRL) in hns_roce_init_hem()
925 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) in hns_roce_init_hem()
932 if (hr_dev->caps.trrl_entry_sz) in hns_roce_init_hem()
952 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_CQ_RECORD_DB || in hns_roce_teardown_hca()
953 hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_RECORD_DB) in hns_roce_teardown_hca()
969 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_CQ_RECORD_DB || in hns_roce_setup_hca()
970 hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_RECORD_DB) { in hns_roce_setup_hca()
991 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_XRC) in hns_roce_setup_hca()
998 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) in hns_roce_setup_hca()
1005 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_CQ_RECORD_DB || in hns_roce_setup_hca()
1006 hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_QP_RECORD_DB) in hns_roce_setup_hca()