Lines Matching refs:p_hwfn

83 #define CONN_CXT_SIZE(p_hwfn) \  argument
84 ALIGNED_TYPE_SIZE(union conn_context, p_hwfn)
89 #define TYPE0_TASK_CXT_SIZE(p_hwfn) \ argument
90 ALIGNED_TYPE_SIZE(union type0_task_context, p_hwfn)
93 #define TYPE1_TASK_CXT_SIZE(p_hwfn) sizeof(union type1_task_context) argument
164 static void qed_cxt_tm_iids(struct qed_hwfn *p_hwfn, in qed_cxt_tm_iids() argument
222 static void qed_cxt_qm_iids(struct qed_hwfn *p_hwfn, in qed_cxt_qm_iids() argument
225 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_qm_iids()
251 DP_VERBOSE(p_hwfn, QED_MSG_ILT, in qed_cxt_qm_iids()
256 static struct qed_tid_seg *qed_cxt_tid_seg_info(struct qed_hwfn *p_hwfn, in qed_cxt_tid_seg_info() argument
259 struct qed_cxt_mngr *p_cfg = p_hwfn->p_cxt_mngr; in qed_cxt_tid_seg_info()
271 static void qed_cxt_set_srq_count(struct qed_hwfn *p_hwfn, in qed_cxt_set_srq_count() argument
274 struct qed_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; in qed_cxt_set_srq_count()
280 u32 qed_cxt_get_ilt_page_size(struct qed_hwfn *p_hwfn, in qed_cxt_get_ilt_page_size() argument
283 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_ilt_page_size()
289 static u32 qed_cxt_xrc_srqs_per_page(struct qed_hwfn *p_hwfn) in qed_cxt_xrc_srqs_per_page() argument
293 page_size = qed_cxt_get_ilt_page_size(p_hwfn, ILT_CLI_TSDM); in qed_cxt_xrc_srqs_per_page()
297 u32 qed_cxt_get_total_srq_count(struct qed_hwfn *p_hwfn) in qed_cxt_get_total_srq_count() argument
299 struct qed_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; in qed_cxt_get_total_srq_count()
308 static void qed_cxt_set_proto_cid_count(struct qed_hwfn *p_hwfn, in qed_cxt_set_proto_cid_count() argument
312 struct qed_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; in qed_cxt_set_proto_cid_count()
320 u32 cxt_size = CONN_CXT_SIZE(p_hwfn); in qed_cxt_set_proto_cid_count()
328 u32 qed_cxt_get_proto_cid_count(struct qed_hwfn *p_hwfn, in qed_cxt_get_proto_cid_count() argument
332 *vf_cid = p_hwfn->p_cxt_mngr->conn_cfg[type].cids_per_vf; in qed_cxt_get_proto_cid_count()
334 return p_hwfn->p_cxt_mngr->conn_cfg[type].cid_count; in qed_cxt_get_proto_cid_count()
337 u32 qed_cxt_get_proto_cid_start(struct qed_hwfn *p_hwfn, in qed_cxt_get_proto_cid_start() argument
340 return p_hwfn->p_cxt_mngr->acquired[type].start_cid; in qed_cxt_get_proto_cid_start()
343 u32 qed_cxt_get_proto_tid_count(struct qed_hwfn *p_hwfn, in qed_cxt_get_proto_tid_count() argument
350 cnt += p_hwfn->p_cxt_mngr->conn_cfg[type].tid_seg[i].count; in qed_cxt_get_proto_tid_count()
355 static void qed_cxt_set_proto_tid_count(struct qed_hwfn *p_hwfn, in qed_cxt_set_proto_tid_count() argument
360 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_set_proto_tid_count()
385 static void qed_ilt_cli_adv_line(struct qed_hwfn *p_hwfn, in qed_ilt_cli_adv_line() argument
400 DP_VERBOSE(p_hwfn, QED_MSG_ILT, in qed_ilt_cli_adv_line()
407 static u32 qed_ilt_get_dynamic_line_cnt(struct qed_hwfn *p_hwfn, in qed_ilt_get_dynamic_line_cnt() argument
410 u32 cid_count = p_hwfn->p_cxt_mngr->conn_cfg[PROTOCOLID_ROCE].cid_count; in qed_ilt_get_dynamic_line_cnt()
416 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC]; in qed_ilt_get_dynamic_line_cnt()
419 (u32) CONN_CXT_SIZE(p_hwfn); in qed_ilt_get_dynamic_line_cnt()
442 static void qed_cxt_ilt_blk_reset(struct qed_hwfn *p_hwfn) in qed_cxt_ilt_blk_reset() argument
444 struct qed_ilt_client_cfg *clients = p_hwfn->p_cxt_mngr->clients; in qed_cxt_ilt_blk_reset()
456 int qed_cxt_cfg_ilt_compute(struct qed_hwfn *p_hwfn, u32 *line_count) in qed_cxt_cfg_ilt_compute() argument
458 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_cfg_ilt_compute()
473 p_mngr->pf_start_line = RESC_START(p_hwfn, QED_ILT); in qed_cxt_cfg_ilt_compute()
478 qed_cxt_ilt_blk_reset(p_hwfn); in qed_cxt_cfg_ilt_compute()
480 DP_VERBOSE(p_hwfn, QED_MSG_ILT, in qed_cxt_cfg_ilt_compute()
482 p_hwfn->my_id, p_hwfn->p_cxt_mngr->pf_start_line); in qed_cxt_cfg_ilt_compute()
497 total = cdu_iids.pf_cids * CONN_CXT_SIZE(p_hwfn); in qed_cxt_cfg_ilt_compute()
500 total, CONN_CXT_SIZE(p_hwfn)); in qed_cxt_cfg_ilt_compute()
502 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, ILT_CLI_CDUC); in qed_cxt_cfg_ilt_compute()
505 p_blk->dynamic_line_cnt = qed_ilt_get_dynamic_line_cnt(p_hwfn, in qed_cxt_cfg_ilt_compute()
510 total = cdu_iids.per_vf_cids * CONN_CXT_SIZE(p_hwfn); in qed_cxt_cfg_ilt_compute()
513 total, CONN_CXT_SIZE(p_hwfn)); in qed_cxt_cfg_ilt_compute()
515 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, ILT_CLI_CDUC); in qed_cxt_cfg_ilt_compute()
519 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, in qed_cxt_cfg_ilt_compute()
528 p_seg = qed_cxt_tid_seg_info(p_hwfn, i); in qed_cxt_cfg_ilt_compute()
537 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, in qed_cxt_cfg_ilt_compute()
543 p_seg = qed_cxt_tid_seg_info(p_hwfn, i); in qed_cxt_cfg_ilt_compute()
578 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, in qed_cxt_cfg_ilt_compute()
584 p_seg = qed_cxt_tid_seg_info(p_hwfn, TASK_SEGMENT_VF); in qed_cxt_cfg_ilt_compute()
598 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, in qed_cxt_cfg_ilt_compute()
612 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, in qed_cxt_cfg_ilt_compute()
621 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, in qed_cxt_cfg_ilt_compute()
625 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, in qed_cxt_cfg_ilt_compute()
634 qed_cxt_qm_iids(p_hwfn, &qm_iids); in qed_cxt_cfg_ilt_compute()
637 p_hwfn->qm_info.num_pqs, in qed_cxt_cfg_ilt_compute()
638 p_hwfn->qm_info.num_vf_pqs); in qed_cxt_cfg_ilt_compute()
640 DP_VERBOSE(p_hwfn, in qed_cxt_cfg_ilt_compute()
646 p_hwfn->qm_info.num_pqs, p_hwfn->qm_info.num_vf_pqs, total); in qed_cxt_cfg_ilt_compute()
652 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, ILT_CLI_QM); in qed_cxt_cfg_ilt_compute()
675 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, in qed_cxt_cfg_ilt_compute()
682 qed_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids); in qed_cxt_cfg_ilt_compute()
689 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, in qed_cxt_cfg_ilt_compute()
701 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, in qed_cxt_cfg_ilt_compute()
706 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, in qed_cxt_cfg_ilt_compute()
711 total = qed_cxt_get_total_srq_count(p_hwfn); in qed_cxt_cfg_ilt_compute()
719 qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, in qed_cxt_cfg_ilt_compute()
724 *line_count = curr_line - p_hwfn->p_cxt_mngr->pf_start_line; in qed_cxt_cfg_ilt_compute()
726 if (curr_line - p_hwfn->p_cxt_mngr->pf_start_line > in qed_cxt_cfg_ilt_compute()
727 RESC_NUM(p_hwfn, QED_ILT)) in qed_cxt_cfg_ilt_compute()
733 u32 qed_cxt_cfg_ilt_compute_excess(struct qed_hwfn *p_hwfn, u32 used_lines) in qed_cxt_cfg_ilt_compute_excess() argument
742 available_lines = RESC_NUM(p_hwfn, QED_ILT); in qed_cxt_cfg_ilt_compute_excess()
748 if (!QED_IS_RDMA_PERSONALITY(p_hwfn)) in qed_cxt_cfg_ilt_compute_excess()
751 p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_cfg_ilt_compute_excess()
756 p_seg = qed_cxt_tid_seg_info(p_hwfn, i); in qed_cxt_cfg_ilt_compute_excess()
767 DP_NOTICE(p_hwfn, "failed computing excess ILT lines\n"); in qed_cxt_cfg_ilt_compute_excess()
771 static void qed_cxt_src_t2_free(struct qed_hwfn *p_hwfn) in qed_cxt_src_t2_free() argument
773 struct qed_src_t2 *p_t2 = &p_hwfn->p_cxt_mngr->src_t2; in qed_cxt_src_t2_free()
781 dma_free_coherent(&p_hwfn->cdev->pdev->dev, in qed_cxt_src_t2_free()
791 qed_cxt_t2_alloc_pages(struct qed_hwfn *p_hwfn, in qed_cxt_t2_alloc_pages() argument
804 *p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, in qed_cxt_t2_alloc_pages()
819 static int qed_cxt_src_t2_alloc(struct qed_hwfn *p_hwfn) in qed_cxt_src_t2_alloc() argument
821 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_src_t2_alloc()
834 p_src = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_SRC]; in qed_cxt_src_t2_alloc()
851 DP_NOTICE(p_hwfn, "Failed to allocate t2 table\n"); in qed_cxt_src_t2_alloc()
856 rc = qed_cxt_t2_alloc_pages(p_hwfn, p_t2, total_size, psz); in qed_cxt_src_t2_alloc()
896 qed_cxt_src_t2_free(p_hwfn); in qed_cxt_src_t2_alloc()
918 static void qed_ilt_shadow_free(struct qed_hwfn *p_hwfn) in qed_ilt_shadow_free() argument
920 struct qed_ilt_client_cfg *p_cli = p_hwfn->p_cxt_mngr->clients; in qed_ilt_shadow_free()
921 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_ilt_shadow_free()
930 dma_free_coherent(&p_hwfn->cdev->pdev->dev, in qed_ilt_shadow_free()
938 static int qed_ilt_blk_alloc(struct qed_hwfn *p_hwfn, in qed_ilt_blk_alloc() argument
943 struct phys_mem_desc *ilt_shadow = p_hwfn->p_cxt_mngr->ilt_shadow; in qed_ilt_blk_alloc()
947 if (QED_IS_RDMA_PERSONALITY(p_hwfn) && in qed_ilt_blk_alloc()
959 p_hwfn->p_cxt_mngr->pf_start_line + lines_to_skip; in qed_ilt_blk_alloc()
967 p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, size, in qed_ilt_blk_alloc()
976 DP_VERBOSE(p_hwfn, QED_MSG_ILT, in qed_ilt_blk_alloc()
987 static int qed_ilt_shadow_alloc(struct qed_hwfn *p_hwfn) in qed_ilt_shadow_alloc() argument
989 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_ilt_shadow_alloc()
1003 DP_VERBOSE(p_hwfn, QED_MSG_ILT, in qed_ilt_shadow_alloc()
1010 rc = qed_ilt_blk_alloc(p_hwfn, p_blk, i, 0); in qed_ilt_shadow_alloc()
1019 rc = qed_ilt_blk_alloc(p_hwfn, p_blk, i, lines); in qed_ilt_shadow_alloc()
1029 qed_ilt_shadow_free(p_hwfn); in qed_ilt_shadow_alloc()
1033 static void qed_cid_map_free(struct qed_hwfn *p_hwfn) in qed_cid_map_free() argument
1035 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cid_map_free()
1052 qed_cid_map_alloc_single(struct qed_hwfn *p_hwfn, in qed_cid_map_alloc_single() argument
1072 DP_VERBOSE(p_hwfn, QED_MSG_CXT, in qed_cid_map_alloc_single()
1079 static int qed_cid_map_alloc(struct qed_hwfn *p_hwfn) in qed_cid_map_alloc() argument
1081 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cid_map_alloc()
1091 if (qed_cid_map_alloc_single(p_hwfn, type, start_cid, in qed_cid_map_alloc()
1098 if (qed_cid_map_alloc_single(p_hwfn, type, in qed_cid_map_alloc()
1111 qed_cid_map_free(p_hwfn); in qed_cid_map_alloc()
1115 int qed_cxt_mngr_alloc(struct qed_hwfn *p_hwfn) in qed_cxt_mngr_alloc() argument
1154 p_mngr->conn_ctx_size = CONN_CXT_SIZE(p_hwfn); in qed_cxt_mngr_alloc()
1157 p_mngr->task_type_size[0] = TYPE0_TASK_CXT_SIZE(p_hwfn); in qed_cxt_mngr_alloc()
1158 p_mngr->task_type_size[1] = TYPE1_TASK_CXT_SIZE(p_hwfn); in qed_cxt_mngr_alloc()
1160 if (p_hwfn->cdev->p_iov_info) { in qed_cxt_mngr_alloc()
1161 p_mngr->vf_count = p_hwfn->cdev->p_iov_info->total_vfs; in qed_cxt_mngr_alloc()
1163 p_hwfn->cdev->p_iov_info->first_vf_in_pf; in qed_cxt_mngr_alloc()
1169 p_hwfn->p_cxt_mngr = p_mngr; in qed_cxt_mngr_alloc()
1174 int qed_cxt_tables_alloc(struct qed_hwfn *p_hwfn) in qed_cxt_tables_alloc() argument
1179 rc = qed_ilt_shadow_alloc(p_hwfn); in qed_cxt_tables_alloc()
1184 rc = qed_cxt_src_t2_alloc(p_hwfn); in qed_cxt_tables_alloc()
1189 rc = qed_cid_map_alloc(p_hwfn); in qed_cxt_tables_alloc()
1196 qed_cxt_mngr_free(p_hwfn); in qed_cxt_tables_alloc()
1200 void qed_cxt_mngr_free(struct qed_hwfn *p_hwfn) in qed_cxt_mngr_free() argument
1202 if (!p_hwfn->p_cxt_mngr) in qed_cxt_mngr_free()
1205 qed_cid_map_free(p_hwfn); in qed_cxt_mngr_free()
1206 qed_cxt_src_t2_free(p_hwfn); in qed_cxt_mngr_free()
1207 qed_ilt_shadow_free(p_hwfn); in qed_cxt_mngr_free()
1208 kfree(p_hwfn->p_cxt_mngr); in qed_cxt_mngr_free()
1210 p_hwfn->p_cxt_mngr = NULL; in qed_cxt_mngr_free()
1213 void qed_cxt_mngr_setup(struct qed_hwfn *p_hwfn) in qed_cxt_mngr_setup() argument
1215 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_mngr_setup()
1310 static void qed_cdu_init_common(struct qed_hwfn *p_hwfn) in qed_cdu_init_common() argument
1315 page_sz = p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC].p_size.val; in qed_cdu_init_common()
1316 cxt_size = CONN_CXT_SIZE(p_hwfn); in qed_cdu_init_common()
1323 STORE_RT_REG(p_hwfn, CDU_REG_CID_ADDR_PARAMS_RT_OFFSET, cdu_params); in qed_cdu_init_common()
1326 page_sz = p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT].p_size.val; in qed_cdu_init_common()
1327 cxt_size = p_hwfn->p_cxt_mngr->task_type_size[0]; in qed_cdu_init_common()
1336 STORE_RT_REG(p_hwfn, CDU_REG_SEGMENT0_PARAMS_RT_OFFSET, cdu_params); in qed_cdu_init_common()
1339 cxt_size = p_hwfn->p_cxt_mngr->task_type_size[1]; in qed_cdu_init_common()
1348 STORE_RT_REG(p_hwfn, CDU_REG_SEGMENT1_PARAMS_RT_OFFSET, cdu_params); in qed_cdu_init_common()
1357 static void qed_cdu_init_pf(struct qed_hwfn *p_hwfn) in qed_cdu_init_pf() argument
1378 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_cdu_init_pf()
1383 p_seg = qed_cxt_tid_seg_info(p_hwfn, i); in qed_cdu_init_pf()
1399 STORE_RT_REG(p_hwfn, rt_type_offset_arr[i], cdu_seg_params); in qed_cdu_init_pf()
1408 STORE_RT_REG(p_hwfn, rt_type_offset_fl_arr[i], cdu_seg_params); in qed_cdu_init_pf()
1412 void qed_qm_init_pf(struct qed_hwfn *p_hwfn, in qed_qm_init_pf() argument
1415 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_qm_init_pf()
1420 qed_cxt_qm_iids(p_hwfn, &iids); in qed_qm_init_pf()
1423 params.port_id = p_hwfn->port_id; in qed_qm_init_pf()
1424 params.pf_id = p_hwfn->rel_pf_id; in qed_qm_init_pf()
1440 qed_qm_pf_rt_init(p_hwfn, p_ptt, &params); in qed_qm_init_pf()
1444 static void qed_cm_init_pf(struct qed_hwfn *p_hwfn) in qed_cm_init_pf() argument
1447 STORE_RT_REG(p_hwfn, XCM_REG_CON_PHY_Q3_RT_OFFSET, in qed_cm_init_pf()
1448 qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_LB)); in qed_cm_init_pf()
1452 static void qed_dq_init_pf(struct qed_hwfn *p_hwfn) in qed_dq_init_pf() argument
1454 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_dq_init_pf()
1458 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_0_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1461 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_0_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1464 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_1_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1467 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_1_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1470 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_2_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1473 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_2_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1476 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_3_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1479 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_3_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1482 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_4_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1485 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_4_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1488 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_5_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1491 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_5_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1499 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_6_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1500 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_6_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1502 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_7_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1503 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_7_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1506 static void qed_ilt_bounds_init(struct qed_hwfn *p_hwfn) in qed_ilt_bounds_init() argument
1511 ilt_clients = p_hwfn->p_cxt_mngr->clients; in qed_ilt_bounds_init()
1513 STORE_RT_REG(p_hwfn, in qed_ilt_bounds_init()
1516 STORE_RT_REG(p_hwfn, in qed_ilt_bounds_init()
1518 STORE_RT_REG(p_hwfn, in qed_ilt_bounds_init()
1524 static void qed_ilt_vf_bounds_init(struct qed_hwfn *p_hwfn) in qed_ilt_vf_bounds_init() argument
1530 if (p_hwfn->cdev->p_iov_info) { in qed_ilt_vf_bounds_init()
1531 struct qed_hw_sriov_info *p_iov = p_hwfn->cdev->p_iov_info; in qed_ilt_vf_bounds_init()
1533 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1536 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1541 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC]; in qed_ilt_vf_bounds_init()
1544 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1547 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1550 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1555 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_ilt_vf_bounds_init()
1558 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1561 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1564 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1569 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TM]; in qed_ilt_vf_bounds_init()
1572 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1574 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1577 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1584 static void qed_ilt_init_pf(struct qed_hwfn *p_hwfn) in qed_ilt_init_pf() argument
1591 qed_ilt_bounds_init(p_hwfn); in qed_ilt_init_pf()
1592 qed_ilt_vf_bounds_init(p_hwfn); in qed_ilt_init_pf()
1594 p_mngr = p_hwfn->p_cxt_mngr; in qed_ilt_init_pf()
1596 clients = p_hwfn->p_cxt_mngr->clients; in qed_ilt_init_pf()
1618 DP_VERBOSE(p_hwfn, QED_MSG_ILT, in qed_ilt_init_pf()
1624 STORE_RT_REG_AGG(p_hwfn, rt_offst, ilt_hw_entry); in qed_ilt_init_pf()
1630 static void qed_src_init_pf(struct qed_hwfn *p_hwfn) in qed_src_init_pf() argument
1632 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_src_init_pf()
1645 STORE_RT_REG(p_hwfn, SRC_REG_COUNTFREE_RT_OFFSET, conn_num); in qed_src_init_pf()
1646 STORE_RT_REG(p_hwfn, SRC_REG_NUMBER_HASH_BITS_RT_OFFSET, in qed_src_init_pf()
1649 STORE_RT_REG_AGG(p_hwfn, SRC_REG_FIRSTFREE_RT_OFFSET, in qed_src_init_pf()
1650 p_hwfn->p_cxt_mngr->src_t2.first_free); in qed_src_init_pf()
1651 STORE_RT_REG_AGG(p_hwfn, SRC_REG_LASTFREE_RT_OFFSET, in qed_src_init_pf()
1652 p_hwfn->p_cxt_mngr->src_t2.last_free); in qed_src_init_pf()
1671 static void qed_tm_init_pf(struct qed_hwfn *p_hwfn) in qed_tm_init_pf() argument
1673 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_tm_init_pf()
1680 qed_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids); in qed_tm_init_pf()
1689 SET_FIELD(cfg_word, TM_CFG_PARENT_PF, p_hwfn->rel_pf_id); in qed_tm_init_pf()
1693 (p_hwfn->cdev->p_iov_info->first_vf_in_pf + i); in qed_tm_init_pf()
1694 STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word); in qed_tm_init_pf()
1705 (NUM_OF_VFS(p_hwfn->cdev) + p_hwfn->rel_pf_id); in qed_tm_init_pf()
1706 STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word); in qed_tm_init_pf()
1709 STORE_RT_REG(p_hwfn, TM_REG_PF_ENABLE_CONN_RT_OFFSET, in qed_tm_init_pf()
1721 SET_FIELD(cfg_word, TM_CFG_PARENT_PF, p_hwfn->rel_pf_id); in qed_tm_init_pf()
1727 (p_hwfn->cdev->p_iov_info->first_vf_in_pf + i); in qed_tm_init_pf()
1729 STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word); in qed_tm_init_pf()
1743 (NUM_OF_VFS(p_hwfn->cdev) + in qed_tm_init_pf()
1744 p_hwfn->rel_pf_id * NUM_TASK_PF_SEGMENTS + i); in qed_tm_init_pf()
1746 STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word); in qed_tm_init_pf()
1752 if (QED_IS_RDMA_PERSONALITY(p_hwfn)) in qed_tm_init_pf()
1755 STORE_RT_REG(p_hwfn, TM_REG_PF_ENABLE_TASK_RT_OFFSET, active_seg_mask); in qed_tm_init_pf()
1760 static void qed_prs_init_common(struct qed_hwfn *p_hwfn) in qed_prs_init_common() argument
1762 if ((p_hwfn->hw_info.personality == QED_PCI_FCOE) && in qed_prs_init_common()
1763 p_hwfn->pf_params.fcoe_pf_params.is_target) in qed_prs_init_common()
1764 STORE_RT_REG(p_hwfn, in qed_prs_init_common()
1768 static void qed_prs_init_pf(struct qed_hwfn *p_hwfn) in qed_prs_init_pf() argument
1770 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_prs_init_pf()
1781 if (p_hwfn->pf_params.fcoe_pf_params.is_target) { in qed_prs_init_pf()
1782 STORE_RT_REG_AGG(p_hwfn, in qed_prs_init_pf()
1786 STORE_RT_REG_AGG(p_hwfn, in qed_prs_init_pf()
1792 void qed_cxt_hw_init_common(struct qed_hwfn *p_hwfn) in qed_cxt_hw_init_common() argument
1794 qed_cdu_init_common(p_hwfn); in qed_cxt_hw_init_common()
1795 qed_prs_init_common(p_hwfn); in qed_cxt_hw_init_common()
1798 void qed_cxt_hw_init_pf(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) in qed_cxt_hw_init_pf() argument
1800 qed_qm_init_pf(p_hwfn, p_ptt, true); in qed_cxt_hw_init_pf()
1801 qed_cm_init_pf(p_hwfn); in qed_cxt_hw_init_pf()
1802 qed_dq_init_pf(p_hwfn); in qed_cxt_hw_init_pf()
1803 qed_cdu_init_pf(p_hwfn); in qed_cxt_hw_init_pf()
1804 qed_ilt_init_pf(p_hwfn); in qed_cxt_hw_init_pf()
1805 qed_src_init_pf(p_hwfn); in qed_cxt_hw_init_pf()
1806 qed_tm_init_pf(p_hwfn); in qed_cxt_hw_init_pf()
1807 qed_prs_init_pf(p_hwfn); in qed_cxt_hw_init_pf()
1810 int _qed_cxt_acquire_cid(struct qed_hwfn *p_hwfn, in _qed_cxt_acquire_cid() argument
1813 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in _qed_cxt_acquire_cid()
1818 DP_NOTICE(p_hwfn, "Invalid protocol type %d", type); in _qed_cxt_acquire_cid()
1823 DP_NOTICE(p_hwfn, "VF [%02x] is out of range\n", vfid); in _qed_cxt_acquire_cid()
1834 DP_NOTICE(p_hwfn, "Invalid protocol type %d", type); in _qed_cxt_acquire_cid()
1841 DP_NOTICE(p_hwfn, "no CID available for protocol %d\n", type); in _qed_cxt_acquire_cid()
1849 DP_VERBOSE(p_hwfn, QED_MSG_CXT, in _qed_cxt_acquire_cid()
1856 int qed_cxt_acquire_cid(struct qed_hwfn *p_hwfn, in qed_cxt_acquire_cid() argument
1859 return _qed_cxt_acquire_cid(p_hwfn, type, p_cid, QED_CXT_PF_CID); in qed_cxt_acquire_cid()
1862 static bool qed_cxt_test_cid_acquired(struct qed_hwfn *p_hwfn, in qed_cxt_test_cid_acquired() argument
1868 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_test_cid_acquired()
1886 DP_NOTICE(p_hwfn, "Invalid CID %d vfid %02x", cid, vfid); in qed_cxt_test_cid_acquired()
1892 DP_NOTICE(p_hwfn, "CID %d [vifd %02x] not acquired", in qed_cxt_test_cid_acquired()
1904 void _qed_cxt_release_cid(struct qed_hwfn *p_hwfn, u32 cid, u8 vfid) in _qed_cxt_release_cid() argument
1912 DP_NOTICE(p_hwfn, in _qed_cxt_release_cid()
1919 b_acquired = qed_cxt_test_cid_acquired(p_hwfn, cid, vfid, in _qed_cxt_release_cid()
1928 DP_VERBOSE(p_hwfn, QED_MSG_CXT, in _qed_cxt_release_cid()
1933 void qed_cxt_release_cid(struct qed_hwfn *p_hwfn, u32 cid) in qed_cxt_release_cid() argument
1935 _qed_cxt_release_cid(p_hwfn, cid, QED_CXT_PF_CID); in qed_cxt_release_cid()
1938 int qed_cxt_get_cid_info(struct qed_hwfn *p_hwfn, struct qed_cxt_info *p_info) in qed_cxt_get_cid_info() argument
1940 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_cid_info()
1947 b_acquired = qed_cxt_test_cid_acquired(p_hwfn, p_info->iid, in qed_cxt_get_cid_info()
1957 hw_p_size = p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC].p_size.val; in qed_cxt_get_cid_info()
1959 conn_cxt_size = CONN_CXT_SIZE(p_hwfn); in qed_cxt_get_cid_info()
1970 DP_VERBOSE(p_hwfn, (QED_MSG_ILT | QED_MSG_CXT), in qed_cxt_get_cid_info()
1977 static void qed_rdma_set_pf_params(struct qed_hwfn *p_hwfn, in qed_rdma_set_pf_params() argument
1984 if (p_hwfn->mcp_info->func_info.protocol == QED_PCI_ETH_RDMA) { in qed_rdma_set_pf_params()
1985 DP_VERBOSE(p_hwfn, QED_MSG_SP, in qed_rdma_set_pf_params()
1987 p_hwfn->hw_info.personality = QED_PCI_ETH_ROCE; in qed_rdma_set_pf_params()
1990 switch (p_hwfn->hw_info.personality) { in qed_rdma_set_pf_params()
2008 qed_cxt_set_proto_cid_count(p_hwfn, proto, num_cons, 0); in qed_rdma_set_pf_params()
2013 qed_cxt_set_proto_tid_count(p_hwfn, PROTOCOLID_ROCE, in qed_rdma_set_pf_params()
2020 num_xrc_srqs = qed_cxt_xrc_srqs_per_page(p_hwfn); in qed_rdma_set_pf_params()
2022 qed_cxt_set_srq_count(p_hwfn, num_srqs, num_xrc_srqs); in qed_rdma_set_pf_params()
2024 DP_INFO(p_hwfn->cdev, in qed_rdma_set_pf_params()
2029 int qed_cxt_set_pf_params(struct qed_hwfn *p_hwfn, u32 rdma_tasks) in qed_cxt_set_pf_params() argument
2034 if (p_hwfn->using_ll2) in qed_cxt_set_pf_params()
2036 qed_cxt_set_proto_cid_count(p_hwfn, PROTOCOLID_CORE, core_cids, 0); in qed_cxt_set_pf_params()
2038 switch (p_hwfn->hw_info.personality) { in qed_cxt_set_pf_params()
2043 qed_rdma_set_pf_params(p_hwfn, in qed_cxt_set_pf_params()
2044 &p_hwfn-> in qed_cxt_set_pf_params()
2053 &p_hwfn->pf_params.eth_pf_params; in qed_cxt_set_pf_params()
2058 qed_cxt_set_proto_cid_count(p_hwfn, PROTOCOLID_ETH, in qed_cxt_set_pf_params()
2061 p_hwfn->p_cxt_mngr->arfs_count = p_params->num_arfs_filters; in qed_cxt_set_pf_params()
2068 p_params = &p_hwfn->pf_params.fcoe_pf_params; in qed_cxt_set_pf_params()
2071 qed_cxt_set_proto_cid_count(p_hwfn, in qed_cxt_set_pf_params()
2075 qed_cxt_set_proto_tid_count(p_hwfn, PROTOCOLID_FCOE, in qed_cxt_set_pf_params()
2079 DP_INFO(p_hwfn->cdev, in qed_cxt_set_pf_params()
2088 p_params = &p_hwfn->pf_params.iscsi_pf_params; in qed_cxt_set_pf_params()
2091 qed_cxt_set_proto_cid_count(p_hwfn, in qed_cxt_set_pf_params()
2095 qed_cxt_set_proto_tid_count(p_hwfn, in qed_cxt_set_pf_params()
2102 DP_INFO(p_hwfn->cdev, in qed_cxt_set_pf_params()
2111 p_params = &p_hwfn->pf_params.nvmetcp_pf_params; in qed_cxt_set_pf_params()
2114 qed_cxt_set_proto_cid_count(p_hwfn, in qed_cxt_set_pf_params()
2118 qed_cxt_set_proto_tid_count(p_hwfn, in qed_cxt_set_pf_params()
2125 DP_INFO(p_hwfn->cdev, in qed_cxt_set_pf_params()
2137 int qed_cxt_get_tid_mem_info(struct qed_hwfn *p_hwfn, in qed_cxt_get_tid_mem_info() argument
2140 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_tid_mem_info()
2147 switch (p_hwfn->hw_info.personality) { in qed_cxt_get_tid_mem_info()
2175 p_hwfn->p_cxt_mngr->pf_start_line; in qed_cxt_get_tid_mem_info()
2191 qed_cxt_dynamic_ilt_alloc(struct qed_hwfn *p_hwfn, in qed_cxt_dynamic_ilt_alloc() argument
2207 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC]; in qed_cxt_dynamic_ilt_alloc()
2208 elem_size = CONN_CXT_SIZE(p_hwfn); in qed_cxt_dynamic_ilt_alloc()
2213 iid += p_hwfn->p_cxt_mngr->xrc_srq_count; in qed_cxt_dynamic_ilt_alloc()
2214 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM]; in qed_cxt_dynamic_ilt_alloc()
2219 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM]; in qed_cxt_dynamic_ilt_alloc()
2224 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_cxt_dynamic_ilt_alloc()
2225 elem_size = TYPE1_TASK_CXT_SIZE(p_hwfn); in qed_cxt_dynamic_ilt_alloc()
2229 DP_NOTICE(p_hwfn, "-EOPNOTSUPP elem type = %d", elem_type); in qed_cxt_dynamic_ilt_alloc()
2237 shadow_line = line - p_hwfn->p_cxt_mngr->pf_start_line; in qed_cxt_dynamic_ilt_alloc()
2245 mutex_lock(&p_hwfn->p_cxt_mngr->mutex); in qed_cxt_dynamic_ilt_alloc()
2247 if (p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].virt_addr) in qed_cxt_dynamic_ilt_alloc()
2250 p_ptt = qed_ptt_acquire(p_hwfn); in qed_cxt_dynamic_ilt_alloc()
2252 DP_NOTICE(p_hwfn, in qed_cxt_dynamic_ilt_alloc()
2258 p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, in qed_cxt_dynamic_ilt_alloc()
2285 elem_start += TYPE1_TASK_CXT_SIZE(p_hwfn); in qed_cxt_dynamic_ilt_alloc()
2289 p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].virt_addr = p_virt; in qed_cxt_dynamic_ilt_alloc()
2290 p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].phys_addr = p_phys; in qed_cxt_dynamic_ilt_alloc()
2291 p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].size = in qed_cxt_dynamic_ilt_alloc()
2301 (p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].phys_addr in qed_cxt_dynamic_ilt_alloc()
2305 qed_dmae_host2grc(p_hwfn, p_ptt, (u64) (uintptr_t)&ilt_hw_entry, in qed_cxt_dynamic_ilt_alloc()
2314 qed_wr(p_hwfn, p_ptt, PRS_REG_ROCE_DEST_QP_MAX_PF, in qed_cxt_dynamic_ilt_alloc()
2317 if (!p_hwfn->b_rdma_enabled_in_prs) { in qed_cxt_dynamic_ilt_alloc()
2319 qed_wr(p_hwfn, p_ptt, p_hwfn->rdma_prs_search_reg, 1); in qed_cxt_dynamic_ilt_alloc()
2320 p_hwfn->b_rdma_enabled_in_prs = true; in qed_cxt_dynamic_ilt_alloc()
2325 qed_ptt_release(p_hwfn, p_ptt); in qed_cxt_dynamic_ilt_alloc()
2327 mutex_unlock(&p_hwfn->p_cxt_mngr->mutex); in qed_cxt_dynamic_ilt_alloc()
2336 qed_cxt_free_ilt_range(struct qed_hwfn *p_hwfn, in qed_cxt_free_ilt_range() argument
2351 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC]; in qed_cxt_free_ilt_range()
2352 elem_size = CONN_CXT_SIZE(p_hwfn); in qed_cxt_free_ilt_range()
2356 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM]; in qed_cxt_free_ilt_range()
2361 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM]; in qed_cxt_free_ilt_range()
2366 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_cxt_free_ilt_range()
2367 elem_size = TYPE1_TASK_CXT_SIZE(p_hwfn); in qed_cxt_free_ilt_range()
2371 DP_NOTICE(p_hwfn, "-EINVALID elem type = %d", elem_type); in qed_cxt_free_ilt_range()
2383 shadow_start_line = start_line - p_hwfn->p_cxt_mngr->pf_start_line; in qed_cxt_free_ilt_range()
2384 shadow_end_line = end_line - p_hwfn->p_cxt_mngr->pf_start_line; in qed_cxt_free_ilt_range()
2386 p_ptt = qed_ptt_acquire(p_hwfn); in qed_cxt_free_ilt_range()
2388 DP_NOTICE(p_hwfn, in qed_cxt_free_ilt_range()
2394 if (!p_hwfn->p_cxt_mngr->ilt_shadow[i].virt_addr) in qed_cxt_free_ilt_range()
2397 dma_free_coherent(&p_hwfn->cdev->pdev->dev, in qed_cxt_free_ilt_range()
2398 p_hwfn->p_cxt_mngr->ilt_shadow[i].size, in qed_cxt_free_ilt_range()
2399 p_hwfn->p_cxt_mngr->ilt_shadow[i].virt_addr, in qed_cxt_free_ilt_range()
2400 p_hwfn->p_cxt_mngr->ilt_shadow[i].phys_addr); in qed_cxt_free_ilt_range()
2402 p_hwfn->p_cxt_mngr->ilt_shadow[i].virt_addr = NULL; in qed_cxt_free_ilt_range()
2403 p_hwfn->p_cxt_mngr->ilt_shadow[i].phys_addr = 0; in qed_cxt_free_ilt_range()
2404 p_hwfn->p_cxt_mngr->ilt_shadow[i].size = 0; in qed_cxt_free_ilt_range()
2414 qed_dmae_host2grc(p_hwfn, p_ptt, in qed_cxt_free_ilt_range()
2421 qed_ptt_release(p_hwfn, p_ptt); in qed_cxt_free_ilt_range()
2426 int qed_cxt_free_proto_ilt(struct qed_hwfn *p_hwfn, enum protocol_type proto) in qed_cxt_free_proto_ilt() argument
2432 rc = qed_cxt_free_ilt_range(p_hwfn, QED_ELEM_CXT, in qed_cxt_free_proto_ilt()
2433 qed_cxt_get_proto_cid_start(p_hwfn, in qed_cxt_free_proto_ilt()
2435 qed_cxt_get_proto_cid_count(p_hwfn, in qed_cxt_free_proto_ilt()
2445 rc = qed_cxt_free_ilt_range(p_hwfn, QED_ELEM_TASK, 0, in qed_cxt_free_proto_ilt()
2446 qed_cxt_get_proto_tid_count(p_hwfn, proto)); in qed_cxt_free_proto_ilt()
2451 rc = qed_cxt_free_ilt_range(p_hwfn, QED_ELEM_XRC_SRQ, 0, in qed_cxt_free_proto_ilt()
2452 p_hwfn->p_cxt_mngr->xrc_srq_count); in qed_cxt_free_proto_ilt()
2454 rc = qed_cxt_free_ilt_range(p_hwfn, QED_ELEM_SRQ, in qed_cxt_free_proto_ilt()
2455 p_hwfn->p_cxt_mngr->xrc_srq_count, in qed_cxt_free_proto_ilt()
2456 p_hwfn->p_cxt_mngr->srq_count); in qed_cxt_free_proto_ilt()
2461 int qed_cxt_get_task_ctx(struct qed_hwfn *p_hwfn, in qed_cxt_get_task_ctx() argument
2464 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_task_ctx()
2474 switch (p_hwfn->hw_info.personality) { in qed_cxt_get_task_ctx()
2526 u16 qed_get_cdut_num_pf_init_pages(struct qed_hwfn *p_hwfn) in qed_get_cdut_num_pf_init_pages() argument
2532 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_get_cdut_num_pf_init_pages()
2541 u16 qed_get_cdut_num_vf_init_pages(struct qed_hwfn *p_hwfn) in qed_get_cdut_num_vf_init_pages() argument
2547 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_get_cdut_num_vf_init_pages()
2556 u16 qed_get_cdut_num_pf_work_pages(struct qed_hwfn *p_hwfn) in qed_get_cdut_num_pf_work_pages() argument
2562 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_get_cdut_num_pf_work_pages()
2571 u16 qed_get_cdut_num_vf_work_pages(struct qed_hwfn *p_hwfn) in qed_get_cdut_num_vf_work_pages() argument
2577 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_get_cdut_num_vf_work_pages()