Lines Matching refs:hmc_info
404 pble_obj_cnt = info->pd->dev->hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].cnt; in irdma_sc_qp_init()
457 qp->qp_uk.qp_id >= cqp->dev->hmc_info->hmc_obj[IRDMA_HMC_IW_QP].max_cnt) in irdma_sc_qp_create()
1150 pble_obj_cnt = dev->hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].cnt; in irdma_sc_mr_reg_non_shared()
2483 pble_obj_cnt = info->dev->hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].cnt; in irdma_sc_cq_init()
2526 if (cq->cq_uk.cq_id >= cqp->dev->hmc_info->hmc_obj[IRDMA_HMC_IW_CQ].max_cnt) in irdma_sc_cq_create()
2664 pble_obj_cnt = cq->dev->hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].cnt; in irdma_sc_cq_modify()
2926 struct irdma_hmc_info *hmc_info, in irdma_sc_parse_fpm_query_buf() argument
2934 obj_info = hmc_info->hmc_obj; in irdma_sc_parse_fpm_query_buf()
2937 hmc_info->first_sd_index = (u16)FIELD_GET(IRDMA_QUERY_FPM_FIRST_PE_SD_INDEX, temp); in irdma_sc_parse_fpm_query_buf()
2941 hmc_info->sd_table.sd_cnt = max_pe_sds + hmc_info->first_sd_index; in irdma_sc_parse_fpm_query_buf()
3629 pble_obj_cnt = info->dev->hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].cnt; in irdma_sc_ceq_init()
3901 pble_obj_cnt = info->dev->hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].cnt; in irdma_sc_aeq_init()
4177 pble_obj_cnt = info->dev->hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].cnt; in irdma_sc_ccq_init()
4310 struct irdma_hmc_info *hmc_info; in irdma_sc_init_iw_hmc() local
4316 hmc_info = dev->hmc_info; in irdma_sc_init_iw_hmc()
4320 hmc_info->hmc_fn_id = hmc_fn_id; in irdma_sc_init_iw_hmc()
4323 ret_code = irdma_sc_query_fpm_val(dev->cqp, 0, hmc_info->hmc_fn_id, in irdma_sc_init_iw_hmc()
4329 ret_code = irdma_sc_parse_fpm_query_buf(dev, query_fpm_mem.va, hmc_info, in irdma_sc_init_iw_hmc()
4346 struct irdma_hmc_info *hmc_info; in irdma_sc_cfg_iw_fpm() local
4353 hmc_info = dev->hmc_info; in irdma_sc_cfg_iw_fpm()
4354 obj_info = hmc_info->hmc_obj; in irdma_sc_cfg_iw_fpm()
4394 ret_code = irdma_sc_commit_fpm_val(dev->cqp, 0, hmc_info->hmc_fn_id, in irdma_sc_cfg_iw_fpm()
4398 hmc_info->hmc_obj, in irdma_sc_cfg_iw_fpm()
4399 &hmc_info->sd_table.sd_cnt); in irdma_sc_cfg_iw_fpm()
4593 struct irdma_hmc_info *hmc_info) in irdma_est_sd() argument
4601 size += round_up(hmc_info->hmc_obj[i].cnt * in irdma_est_sd()
4602 hmc_info->hmc_obj[i].size, 512); in irdma_est_sd()
4603 size += round_up(hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].cnt * in irdma_est_sd()
4604 hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].size, 512); in irdma_est_sd()
4742 struct irdma_hmc_info *hmc_info, u32 qpwanted) in irdma_q1_cnt() argument
4759 struct irdma_hmc_info *hmc_info, u32 qpwanted) in cfg_fpm_value_gen_1() argument
4761 hmc_info->hmc_obj[IRDMA_HMC_IW_XF].cnt = roundup_pow_of_two(qpwanted * dev->hw_attrs.max_hw_wqes); in cfg_fpm_value_gen_1()
4765 struct irdma_hmc_info *hmc_info, u32 qpwanted) in cfg_fpm_value_gen_2() argument
4769 hmc_info->hmc_obj[IRDMA_HMC_IW_XF].cnt = in cfg_fpm_value_gen_2()
4772 hmc_info->hmc_obj[IRDMA_HMC_IW_HDR].cnt = qpwanted; in cfg_fpm_value_gen_2()
4774 if (hmc_info->hmc_obj[IRDMA_HMC_IW_RRF].max_cnt) in cfg_fpm_value_gen_2()
4775 hmc_info->hmc_obj[IRDMA_HMC_IW_RRF].cnt = 32 * qpwanted; in cfg_fpm_value_gen_2()
4776 if (hmc_info->hmc_obj[IRDMA_HMC_IW_RRFFL].max_cnt) in cfg_fpm_value_gen_2()
4777 hmc_info->hmc_obj[IRDMA_HMC_IW_RRFFL].cnt = in cfg_fpm_value_gen_2()
4778 hmc_info->hmc_obj[IRDMA_HMC_IW_RRF].cnt / in cfg_fpm_value_gen_2()
4780 if (hmc_info->hmc_obj[IRDMA_HMC_IW_OOISC].max_cnt) in cfg_fpm_value_gen_2()
4781 hmc_info->hmc_obj[IRDMA_HMC_IW_OOISC].cnt = 32 * qpwanted; in cfg_fpm_value_gen_2()
4782 if (hmc_info->hmc_obj[IRDMA_HMC_IW_OOISCFFL].max_cnt) in cfg_fpm_value_gen_2()
4783 hmc_info->hmc_obj[IRDMA_HMC_IW_OOISCFFL].cnt = in cfg_fpm_value_gen_2()
4784 hmc_info->hmc_obj[IRDMA_HMC_IW_OOISC].cnt / in cfg_fpm_value_gen_2()
4802 struct irdma_hmc_info *hmc_info; in irdma_cfg_fpm_val() local
4806 hmc_info = dev->hmc_info; in irdma_cfg_fpm_val()
4818 hmc_info->hmc_obj[i].cnt = hmc_info->hmc_obj[i].max_cnt; in irdma_cfg_fpm_val()
4819 sd_needed = irdma_est_sd(dev, hmc_info); in irdma_cfg_fpm_val()
4822 sd_needed, hmc_info->first_sd_index); in irdma_cfg_fpm_val()
4824 hmc_info->sd_table.sd_cnt, hmc_fpm_misc->max_sds); in irdma_cfg_fpm_val()
4826 qpwanted = min(qp_count, hmc_info->hmc_obj[IRDMA_HMC_IW_QP].max_cnt); in irdma_cfg_fpm_val()
4834 mrwanted = hmc_info->hmc_obj[IRDMA_HMC_IW_MR].max_cnt; in irdma_cfg_fpm_val()
4835 pblewanted = hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].max_cnt; in irdma_cfg_fpm_val()
4840 hmc_info->hmc_obj[IRDMA_HMC_IW_QP].max_cnt, in irdma_cfg_fpm_val()
4841 hmc_info->hmc_obj[IRDMA_HMC_IW_CQ].max_cnt, in irdma_cfg_fpm_val()
4842 hmc_info->hmc_obj[IRDMA_HMC_IW_MR].max_cnt, in irdma_cfg_fpm_val()
4843 hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].max_cnt, in irdma_cfg_fpm_val()
4844 hmc_info->hmc_obj[IRDMA_HMC_IW_FSIMC].max_cnt, in irdma_cfg_fpm_val()
4845 hmc_info->hmc_obj[IRDMA_HMC_IW_FSIAV].max_cnt); in irdma_cfg_fpm_val()
4846 hmc_info->hmc_obj[IRDMA_HMC_IW_FSIMC].cnt = in irdma_cfg_fpm_val()
4847 hmc_info->hmc_obj[IRDMA_HMC_IW_FSIMC].max_cnt; in irdma_cfg_fpm_val()
4848 hmc_info->hmc_obj[IRDMA_HMC_IW_FSIAV].cnt = in irdma_cfg_fpm_val()
4849 hmc_info->hmc_obj[IRDMA_HMC_IW_FSIAV].max_cnt; in irdma_cfg_fpm_val()
4850 hmc_info->hmc_obj[IRDMA_HMC_IW_ARP].cnt = in irdma_cfg_fpm_val()
4851 hmc_info->hmc_obj[IRDMA_HMC_IW_ARP].max_cnt; in irdma_cfg_fpm_val()
4853 hmc_info->hmc_obj[IRDMA_HMC_IW_APBVT_ENTRY].cnt = 1; in irdma_cfg_fpm_val()
4855 while (irdma_q1_cnt(dev, hmc_info, qpwanted) > hmc_info->hmc_obj[IRDMA_HMC_IW_Q1].max_cnt) in irdma_cfg_fpm_val()
4860 hmc_info->hmc_obj[IRDMA_HMC_IW_QP].cnt = qpwanted; in irdma_cfg_fpm_val()
4861 hmc_info->hmc_obj[IRDMA_HMC_IW_CQ].cnt = in irdma_cfg_fpm_val()
4862 min(2 * qpwanted, hmc_info->hmc_obj[IRDMA_HMC_IW_CQ].cnt); in irdma_cfg_fpm_val()
4863 hmc_info->hmc_obj[IRDMA_HMC_IW_RESERVED].cnt = 0; /* Reserved */ in irdma_cfg_fpm_val()
4864 hmc_info->hmc_obj[IRDMA_HMC_IW_MR].cnt = mrwanted; in irdma_cfg_fpm_val()
4866 hte = round_up(qpwanted + hmc_info->hmc_obj[IRDMA_HMC_IW_FSIMC].cnt, 512); in irdma_cfg_fpm_val()
4870 hmc_info->hmc_obj[IRDMA_HMC_IW_HTE].cnt = in irdma_cfg_fpm_val()
4873 cfg_fpm_value_gen_1(dev, hmc_info, qpwanted); in irdma_cfg_fpm_val()
4875 cfg_fpm_value_gen_2(dev, hmc_info, qpwanted); in irdma_cfg_fpm_val()
4877 hmc_info->hmc_obj[IRDMA_HMC_IW_Q1].cnt = irdma_q1_cnt(dev, hmc_info, qpwanted); in irdma_cfg_fpm_val()
4878 hmc_info->hmc_obj[IRDMA_HMC_IW_XFFL].cnt = in irdma_cfg_fpm_val()
4879 hmc_info->hmc_obj[IRDMA_HMC_IW_XF].cnt / hmc_fpm_misc->xf_block_size; in irdma_cfg_fpm_val()
4880 hmc_info->hmc_obj[IRDMA_HMC_IW_Q1FL].cnt = in irdma_cfg_fpm_val()
4881 hmc_info->hmc_obj[IRDMA_HMC_IW_Q1].cnt / hmc_fpm_misc->q1_block_size; in irdma_cfg_fpm_val()
4882 hmc_info->hmc_obj[IRDMA_HMC_IW_TIMER].cnt = in irdma_cfg_fpm_val()
4885 hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].cnt = pblewanted; in irdma_cfg_fpm_val()
4886 sd_needed = irdma_est_sd(dev, hmc_info); in irdma_cfg_fpm_val()
4915 if (hmc_info->hmc_obj[IRDMA_HMC_IW_FSIMC].cnt > 256) in irdma_cfg_fpm_val()
4916 hmc_info->hmc_obj[IRDMA_HMC_IW_FSIMC].cnt /= 2; in irdma_cfg_fpm_val()
4917 if (hmc_info->hmc_obj[IRDMA_HMC_IW_FSIAV].cnt > 256) in irdma_cfg_fpm_val()
4918 hmc_info->hmc_obj[IRDMA_HMC_IW_FSIAV].cnt /= 2; in irdma_cfg_fpm_val()
4924 if (hmc_info->hmc_obj[IRDMA_HMC_IW_FSIAV].cnt > 256) in irdma_cfg_fpm_val()
4925 hmc_info->hmc_obj[IRDMA_HMC_IW_FSIAV].cnt /= 2; in irdma_cfg_fpm_val()
4932 loop_count, sd_needed, hmc_info->sd_table.sd_cnt); in irdma_cfg_fpm_val()
4939 hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].cnt = pblewanted; in irdma_cfg_fpm_val()
4940 sd_needed = irdma_est_sd(dev, hmc_info); in irdma_cfg_fpm_val()
4946 hmc_info->hmc_obj[IRDMA_HMC_IW_QP].cnt, in irdma_cfg_fpm_val()
4947 hmc_info->hmc_obj[IRDMA_HMC_IW_CQ].cnt, in irdma_cfg_fpm_val()
4948 hmc_info->hmc_obj[IRDMA_HMC_IW_MR].cnt, in irdma_cfg_fpm_val()
4949 hmc_info->hmc_obj[IRDMA_HMC_IW_PBLE].cnt, in irdma_cfg_fpm_val()
4950 hmc_info->hmc_obj[IRDMA_HMC_IW_FSIMC].cnt, in irdma_cfg_fpm_val()
4951 hmc_info->hmc_obj[IRDMA_HMC_IW_FSIAV].cnt, in irdma_cfg_fpm_val()
4952 hmc_info->sd_table.sd_cnt, hmc_info->first_sd_index); in irdma_cfg_fpm_val()
4963 (hmc_info->sd_table.sd_cnt + hmc_info->first_sd_index + 1); in irdma_cfg_fpm_val()
4971 hmc_info->sd_table.sd_entry = virt_mem.va; in irdma_cfg_fpm_val()