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
1067 DP_VERBOSE(p_hwfn, QED_MSG_CXT, in qed_cid_map_alloc_single()
1074 static int qed_cid_map_alloc(struct qed_hwfn *p_hwfn) in qed_cid_map_alloc() argument
1076 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cid_map_alloc()
1086 if (qed_cid_map_alloc_single(p_hwfn, type, start_cid, in qed_cid_map_alloc()
1093 if (qed_cid_map_alloc_single(p_hwfn, type, in qed_cid_map_alloc()
1106 qed_cid_map_free(p_hwfn); in qed_cid_map_alloc()
1110 int qed_cxt_mngr_alloc(struct qed_hwfn *p_hwfn) in qed_cxt_mngr_alloc() argument
1149 p_mngr->conn_ctx_size = CONN_CXT_SIZE(p_hwfn); in qed_cxt_mngr_alloc()
1152 p_mngr->task_type_size[0] = TYPE0_TASK_CXT_SIZE(p_hwfn); in qed_cxt_mngr_alloc()
1153 p_mngr->task_type_size[1] = TYPE1_TASK_CXT_SIZE(p_hwfn); in qed_cxt_mngr_alloc()
1155 if (p_hwfn->cdev->p_iov_info) { in qed_cxt_mngr_alloc()
1156 p_mngr->vf_count = p_hwfn->cdev->p_iov_info->total_vfs; in qed_cxt_mngr_alloc()
1158 p_hwfn->cdev->p_iov_info->first_vf_in_pf; in qed_cxt_mngr_alloc()
1164 p_hwfn->p_cxt_mngr = p_mngr; in qed_cxt_mngr_alloc()
1169 int qed_cxt_tables_alloc(struct qed_hwfn *p_hwfn) in qed_cxt_tables_alloc() argument
1174 rc = qed_ilt_shadow_alloc(p_hwfn); in qed_cxt_tables_alloc()
1179 rc = qed_cxt_src_t2_alloc(p_hwfn); in qed_cxt_tables_alloc()
1184 rc = qed_cid_map_alloc(p_hwfn); in qed_cxt_tables_alloc()
1191 qed_cxt_mngr_free(p_hwfn); in qed_cxt_tables_alloc()
1195 void qed_cxt_mngr_free(struct qed_hwfn *p_hwfn) in qed_cxt_mngr_free() argument
1197 if (!p_hwfn->p_cxt_mngr) in qed_cxt_mngr_free()
1200 qed_cid_map_free(p_hwfn); in qed_cxt_mngr_free()
1201 qed_cxt_src_t2_free(p_hwfn); in qed_cxt_mngr_free()
1202 qed_ilt_shadow_free(p_hwfn); in qed_cxt_mngr_free()
1203 kfree(p_hwfn->p_cxt_mngr); in qed_cxt_mngr_free()
1205 p_hwfn->p_cxt_mngr = NULL; in qed_cxt_mngr_free()
1208 void qed_cxt_mngr_setup(struct qed_hwfn *p_hwfn) in qed_cxt_mngr_setup() argument
1210 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_mngr_setup()
1296 static void qed_cdu_init_common(struct qed_hwfn *p_hwfn) in qed_cdu_init_common() argument
1301 page_sz = p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC].p_size.val; in qed_cdu_init_common()
1302 cxt_size = CONN_CXT_SIZE(p_hwfn); in qed_cdu_init_common()
1309 STORE_RT_REG(p_hwfn, CDU_REG_CID_ADDR_PARAMS_RT_OFFSET, cdu_params); in qed_cdu_init_common()
1312 page_sz = p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT].p_size.val; in qed_cdu_init_common()
1313 cxt_size = p_hwfn->p_cxt_mngr->task_type_size[0]; in qed_cdu_init_common()
1322 STORE_RT_REG(p_hwfn, CDU_REG_SEGMENT0_PARAMS_RT_OFFSET, cdu_params); in qed_cdu_init_common()
1325 cxt_size = p_hwfn->p_cxt_mngr->task_type_size[1]; in qed_cdu_init_common()
1334 STORE_RT_REG(p_hwfn, CDU_REG_SEGMENT1_PARAMS_RT_OFFSET, cdu_params); in qed_cdu_init_common()
1343 static void qed_cdu_init_pf(struct qed_hwfn *p_hwfn) in qed_cdu_init_pf() argument
1364 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_cdu_init_pf()
1369 p_seg = qed_cxt_tid_seg_info(p_hwfn, i); in qed_cdu_init_pf()
1385 STORE_RT_REG(p_hwfn, rt_type_offset_arr[i], cdu_seg_params); in qed_cdu_init_pf()
1394 STORE_RT_REG(p_hwfn, rt_type_offset_fl_arr[i], cdu_seg_params); in qed_cdu_init_pf()
1398 void qed_qm_init_pf(struct qed_hwfn *p_hwfn, in qed_qm_init_pf() argument
1401 struct qed_qm_info *qm_info = &p_hwfn->qm_info; in qed_qm_init_pf()
1406 qed_cxt_qm_iids(p_hwfn, &iids); in qed_qm_init_pf()
1409 params.port_id = p_hwfn->port_id; in qed_qm_init_pf()
1410 params.pf_id = p_hwfn->rel_pf_id; in qed_qm_init_pf()
1426 qed_qm_pf_rt_init(p_hwfn, p_ptt, &params); in qed_qm_init_pf()
1430 static void qed_cm_init_pf(struct qed_hwfn *p_hwfn) in qed_cm_init_pf() argument
1433 STORE_RT_REG(p_hwfn, XCM_REG_CON_PHY_Q3_RT_OFFSET, in qed_cm_init_pf()
1434 qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_LB)); in qed_cm_init_pf()
1438 static void qed_dq_init_pf(struct qed_hwfn *p_hwfn) in qed_dq_init_pf() argument
1440 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_dq_init_pf()
1444 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_0_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1447 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_0_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1450 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_1_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1453 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_1_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1456 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_2_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1459 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_2_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1462 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_3_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1465 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_3_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1468 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_4_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1471 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_4_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1474 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_5_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1477 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_5_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1485 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_6_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1486 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_6_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1488 STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_7_RT_OFFSET, dq_pf_max_cid); in qed_dq_init_pf()
1489 STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_7_RT_OFFSET, dq_vf_max_cid); in qed_dq_init_pf()
1492 static void qed_ilt_bounds_init(struct qed_hwfn *p_hwfn) in qed_ilt_bounds_init() argument
1497 ilt_clients = p_hwfn->p_cxt_mngr->clients; in qed_ilt_bounds_init()
1499 STORE_RT_REG(p_hwfn, in qed_ilt_bounds_init()
1502 STORE_RT_REG(p_hwfn, in qed_ilt_bounds_init()
1504 STORE_RT_REG(p_hwfn, in qed_ilt_bounds_init()
1510 static void qed_ilt_vf_bounds_init(struct qed_hwfn *p_hwfn) in qed_ilt_vf_bounds_init() argument
1516 if (p_hwfn->cdev->p_iov_info) { in qed_ilt_vf_bounds_init()
1517 struct qed_hw_sriov_info *p_iov = p_hwfn->cdev->p_iov_info; in qed_ilt_vf_bounds_init()
1519 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1522 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1527 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC]; in qed_ilt_vf_bounds_init()
1530 STORE_RT_REG(p_hwfn, 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_CDUT]; 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_TM]; in qed_ilt_vf_bounds_init()
1558 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1560 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1563 STORE_RT_REG(p_hwfn, in qed_ilt_vf_bounds_init()
1570 static void qed_ilt_init_pf(struct qed_hwfn *p_hwfn) in qed_ilt_init_pf() argument
1577 qed_ilt_bounds_init(p_hwfn); in qed_ilt_init_pf()
1578 qed_ilt_vf_bounds_init(p_hwfn); in qed_ilt_init_pf()
1580 p_mngr = p_hwfn->p_cxt_mngr; in qed_ilt_init_pf()
1582 clients = p_hwfn->p_cxt_mngr->clients; in qed_ilt_init_pf()
1604 DP_VERBOSE(p_hwfn, QED_MSG_ILT, in qed_ilt_init_pf()
1610 STORE_RT_REG_AGG(p_hwfn, rt_offst, ilt_hw_entry); in qed_ilt_init_pf()
1616 static void qed_src_init_pf(struct qed_hwfn *p_hwfn) in qed_src_init_pf() argument
1618 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_src_init_pf()
1631 STORE_RT_REG(p_hwfn, SRC_REG_COUNTFREE_RT_OFFSET, conn_num); in qed_src_init_pf()
1632 STORE_RT_REG(p_hwfn, SRC_REG_NUMBER_HASH_BITS_RT_OFFSET, in qed_src_init_pf()
1635 STORE_RT_REG_AGG(p_hwfn, SRC_REG_FIRSTFREE_RT_OFFSET, in qed_src_init_pf()
1636 p_hwfn->p_cxt_mngr->src_t2.first_free); in qed_src_init_pf()
1637 STORE_RT_REG_AGG(p_hwfn, SRC_REG_LASTFREE_RT_OFFSET, in qed_src_init_pf()
1638 p_hwfn->p_cxt_mngr->src_t2.last_free); in qed_src_init_pf()
1657 static void qed_tm_init_pf(struct qed_hwfn *p_hwfn) in qed_tm_init_pf() argument
1659 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_tm_init_pf()
1666 qed_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids); in qed_tm_init_pf()
1675 SET_FIELD(cfg_word, TM_CFG_PARENT_PF, p_hwfn->rel_pf_id); in qed_tm_init_pf()
1679 (p_hwfn->cdev->p_iov_info->first_vf_in_pf + i); in qed_tm_init_pf()
1680 STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word); in qed_tm_init_pf()
1691 (NUM_OF_VFS(p_hwfn->cdev) + p_hwfn->rel_pf_id); in qed_tm_init_pf()
1692 STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word); in qed_tm_init_pf()
1695 STORE_RT_REG(p_hwfn, TM_REG_PF_ENABLE_CONN_RT_OFFSET, in qed_tm_init_pf()
1707 SET_FIELD(cfg_word, TM_CFG_PARENT_PF, p_hwfn->rel_pf_id); in qed_tm_init_pf()
1713 (p_hwfn->cdev->p_iov_info->first_vf_in_pf + i); in qed_tm_init_pf()
1715 STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word); in qed_tm_init_pf()
1729 (NUM_OF_VFS(p_hwfn->cdev) + in qed_tm_init_pf()
1730 p_hwfn->rel_pf_id * NUM_TASK_PF_SEGMENTS + i); in qed_tm_init_pf()
1732 STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word); in qed_tm_init_pf()
1738 if (QED_IS_RDMA_PERSONALITY(p_hwfn)) in qed_tm_init_pf()
1741 STORE_RT_REG(p_hwfn, TM_REG_PF_ENABLE_TASK_RT_OFFSET, active_seg_mask); in qed_tm_init_pf()
1746 static void qed_prs_init_common(struct qed_hwfn *p_hwfn) in qed_prs_init_common() argument
1748 if ((p_hwfn->hw_info.personality == QED_PCI_FCOE) && in qed_prs_init_common()
1749 p_hwfn->pf_params.fcoe_pf_params.is_target) in qed_prs_init_common()
1750 STORE_RT_REG(p_hwfn, in qed_prs_init_common()
1754 static void qed_prs_init_pf(struct qed_hwfn *p_hwfn) in qed_prs_init_pf() argument
1756 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_prs_init_pf()
1767 if (p_hwfn->pf_params.fcoe_pf_params.is_target) { in qed_prs_init_pf()
1768 STORE_RT_REG_AGG(p_hwfn, in qed_prs_init_pf()
1772 STORE_RT_REG_AGG(p_hwfn, in qed_prs_init_pf()
1778 void qed_cxt_hw_init_common(struct qed_hwfn *p_hwfn) in qed_cxt_hw_init_common() argument
1780 qed_cdu_init_common(p_hwfn); in qed_cxt_hw_init_common()
1781 qed_prs_init_common(p_hwfn); in qed_cxt_hw_init_common()
1784 void qed_cxt_hw_init_pf(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) in qed_cxt_hw_init_pf() argument
1786 qed_qm_init_pf(p_hwfn, p_ptt, true); in qed_cxt_hw_init_pf()
1787 qed_cm_init_pf(p_hwfn); in qed_cxt_hw_init_pf()
1788 qed_dq_init_pf(p_hwfn); in qed_cxt_hw_init_pf()
1789 qed_cdu_init_pf(p_hwfn); in qed_cxt_hw_init_pf()
1790 qed_ilt_init_pf(p_hwfn); in qed_cxt_hw_init_pf()
1791 qed_src_init_pf(p_hwfn); in qed_cxt_hw_init_pf()
1792 qed_tm_init_pf(p_hwfn); in qed_cxt_hw_init_pf()
1793 qed_prs_init_pf(p_hwfn); in qed_cxt_hw_init_pf()
1796 int _qed_cxt_acquire_cid(struct qed_hwfn *p_hwfn, in _qed_cxt_acquire_cid() argument
1799 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in _qed_cxt_acquire_cid()
1804 DP_NOTICE(p_hwfn, "Invalid protocol type %d", type); in _qed_cxt_acquire_cid()
1809 DP_NOTICE(p_hwfn, "VF [%02x] is out of range\n", vfid); in _qed_cxt_acquire_cid()
1820 DP_NOTICE(p_hwfn, "Invalid protocol type %d", type); in _qed_cxt_acquire_cid()
1827 DP_NOTICE(p_hwfn, "no CID available for protocol %d\n", type); in _qed_cxt_acquire_cid()
1835 DP_VERBOSE(p_hwfn, QED_MSG_CXT, in _qed_cxt_acquire_cid()
1842 int qed_cxt_acquire_cid(struct qed_hwfn *p_hwfn, in qed_cxt_acquire_cid() argument
1845 return _qed_cxt_acquire_cid(p_hwfn, type, p_cid, QED_CXT_PF_CID); in qed_cxt_acquire_cid()
1848 static bool qed_cxt_test_cid_acquired(struct qed_hwfn *p_hwfn, in qed_cxt_test_cid_acquired() argument
1854 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_test_cid_acquired()
1872 DP_NOTICE(p_hwfn, "Invalid CID %d vfid %02x", cid, vfid); in qed_cxt_test_cid_acquired()
1878 DP_NOTICE(p_hwfn, "CID %d [vifd %02x] not acquired", in qed_cxt_test_cid_acquired()
1890 void _qed_cxt_release_cid(struct qed_hwfn *p_hwfn, u32 cid, u8 vfid) in _qed_cxt_release_cid() argument
1898 DP_NOTICE(p_hwfn, in _qed_cxt_release_cid()
1905 b_acquired = qed_cxt_test_cid_acquired(p_hwfn, cid, vfid, in _qed_cxt_release_cid()
1914 DP_VERBOSE(p_hwfn, QED_MSG_CXT, in _qed_cxt_release_cid()
1919 void qed_cxt_release_cid(struct qed_hwfn *p_hwfn, u32 cid) in qed_cxt_release_cid() argument
1921 _qed_cxt_release_cid(p_hwfn, cid, QED_CXT_PF_CID); in qed_cxt_release_cid()
1924 int qed_cxt_get_cid_info(struct qed_hwfn *p_hwfn, struct qed_cxt_info *p_info) in qed_cxt_get_cid_info() argument
1926 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_cid_info()
1933 b_acquired = qed_cxt_test_cid_acquired(p_hwfn, p_info->iid, in qed_cxt_get_cid_info()
1943 hw_p_size = p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC].p_size.val; in qed_cxt_get_cid_info()
1945 conn_cxt_size = CONN_CXT_SIZE(p_hwfn); in qed_cxt_get_cid_info()
1956 DP_VERBOSE(p_hwfn, (QED_MSG_ILT | QED_MSG_CXT), in qed_cxt_get_cid_info()
1963 static void qed_rdma_set_pf_params(struct qed_hwfn *p_hwfn, in qed_rdma_set_pf_params() argument
1970 if (p_hwfn->mcp_info->func_info.protocol == QED_PCI_ETH_RDMA) { in qed_rdma_set_pf_params()
1971 DP_VERBOSE(p_hwfn, QED_MSG_SP, in qed_rdma_set_pf_params()
1973 p_hwfn->hw_info.personality = QED_PCI_ETH_ROCE; in qed_rdma_set_pf_params()
1976 switch (p_hwfn->hw_info.personality) { in qed_rdma_set_pf_params()
1994 qed_cxt_set_proto_cid_count(p_hwfn, proto, num_cons, 0); in qed_rdma_set_pf_params()
1999 qed_cxt_set_proto_tid_count(p_hwfn, PROTOCOLID_ROCE, in qed_rdma_set_pf_params()
2006 num_xrc_srqs = qed_cxt_xrc_srqs_per_page(p_hwfn); in qed_rdma_set_pf_params()
2008 qed_cxt_set_srq_count(p_hwfn, num_srqs, num_xrc_srqs); in qed_rdma_set_pf_params()
2010 DP_INFO(p_hwfn->cdev, in qed_rdma_set_pf_params()
2015 int qed_cxt_set_pf_params(struct qed_hwfn *p_hwfn, u32 rdma_tasks) in qed_cxt_set_pf_params() argument
2020 if (p_hwfn->using_ll2) in qed_cxt_set_pf_params()
2022 qed_cxt_set_proto_cid_count(p_hwfn, PROTOCOLID_CORE, core_cids, 0); in qed_cxt_set_pf_params()
2024 switch (p_hwfn->hw_info.personality) { in qed_cxt_set_pf_params()
2029 qed_rdma_set_pf_params(p_hwfn, in qed_cxt_set_pf_params()
2030 &p_hwfn-> in qed_cxt_set_pf_params()
2039 &p_hwfn->pf_params.eth_pf_params; in qed_cxt_set_pf_params()
2044 qed_cxt_set_proto_cid_count(p_hwfn, PROTOCOLID_ETH, in qed_cxt_set_pf_params()
2047 p_hwfn->p_cxt_mngr->arfs_count = p_params->num_arfs_filters; in qed_cxt_set_pf_params()
2054 p_params = &p_hwfn->pf_params.fcoe_pf_params; in qed_cxt_set_pf_params()
2057 qed_cxt_set_proto_cid_count(p_hwfn, in qed_cxt_set_pf_params()
2061 qed_cxt_set_proto_tid_count(p_hwfn, PROTOCOLID_FCOE, in qed_cxt_set_pf_params()
2065 DP_INFO(p_hwfn->cdev, in qed_cxt_set_pf_params()
2074 p_params = &p_hwfn->pf_params.iscsi_pf_params; in qed_cxt_set_pf_params()
2077 qed_cxt_set_proto_cid_count(p_hwfn, in qed_cxt_set_pf_params()
2081 qed_cxt_set_proto_tid_count(p_hwfn, in qed_cxt_set_pf_params()
2088 DP_INFO(p_hwfn->cdev, in qed_cxt_set_pf_params()
2097 p_params = &p_hwfn->pf_params.nvmetcp_pf_params; in qed_cxt_set_pf_params()
2100 qed_cxt_set_proto_cid_count(p_hwfn, in qed_cxt_set_pf_params()
2104 qed_cxt_set_proto_tid_count(p_hwfn, in qed_cxt_set_pf_params()
2111 DP_INFO(p_hwfn->cdev, in qed_cxt_set_pf_params()
2123 int qed_cxt_get_tid_mem_info(struct qed_hwfn *p_hwfn, in qed_cxt_get_tid_mem_info() argument
2126 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_tid_mem_info()
2133 switch (p_hwfn->hw_info.personality) { in qed_cxt_get_tid_mem_info()
2161 p_hwfn->p_cxt_mngr->pf_start_line; in qed_cxt_get_tid_mem_info()
2177 qed_cxt_dynamic_ilt_alloc(struct qed_hwfn *p_hwfn, in qed_cxt_dynamic_ilt_alloc() argument
2193 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC]; in qed_cxt_dynamic_ilt_alloc()
2194 elem_size = CONN_CXT_SIZE(p_hwfn); in qed_cxt_dynamic_ilt_alloc()
2199 iid += p_hwfn->p_cxt_mngr->xrc_srq_count; in qed_cxt_dynamic_ilt_alloc()
2200 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM]; in qed_cxt_dynamic_ilt_alloc()
2205 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM]; in qed_cxt_dynamic_ilt_alloc()
2210 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_cxt_dynamic_ilt_alloc()
2211 elem_size = TYPE1_TASK_CXT_SIZE(p_hwfn); in qed_cxt_dynamic_ilt_alloc()
2215 DP_NOTICE(p_hwfn, "-EOPNOTSUPP elem type = %d", elem_type); in qed_cxt_dynamic_ilt_alloc()
2223 shadow_line = line - p_hwfn->p_cxt_mngr->pf_start_line; in qed_cxt_dynamic_ilt_alloc()
2231 mutex_lock(&p_hwfn->p_cxt_mngr->mutex); in qed_cxt_dynamic_ilt_alloc()
2233 if (p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].virt_addr) in qed_cxt_dynamic_ilt_alloc()
2236 p_ptt = qed_ptt_acquire(p_hwfn); in qed_cxt_dynamic_ilt_alloc()
2238 DP_NOTICE(p_hwfn, in qed_cxt_dynamic_ilt_alloc()
2244 p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, in qed_cxt_dynamic_ilt_alloc()
2271 elem_start += TYPE1_TASK_CXT_SIZE(p_hwfn); in qed_cxt_dynamic_ilt_alloc()
2275 p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].virt_addr = p_virt; in qed_cxt_dynamic_ilt_alloc()
2276 p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].phys_addr = p_phys; in qed_cxt_dynamic_ilt_alloc()
2277 p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].size = in qed_cxt_dynamic_ilt_alloc()
2287 (p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].phys_addr in qed_cxt_dynamic_ilt_alloc()
2291 qed_dmae_host2grc(p_hwfn, p_ptt, (u64) (uintptr_t)&ilt_hw_entry, in qed_cxt_dynamic_ilt_alloc()
2300 qed_wr(p_hwfn, p_ptt, PRS_REG_ROCE_DEST_QP_MAX_PF, in qed_cxt_dynamic_ilt_alloc()
2303 if (!p_hwfn->b_rdma_enabled_in_prs) { in qed_cxt_dynamic_ilt_alloc()
2305 qed_wr(p_hwfn, p_ptt, p_hwfn->rdma_prs_search_reg, 1); in qed_cxt_dynamic_ilt_alloc()
2306 p_hwfn->b_rdma_enabled_in_prs = true; in qed_cxt_dynamic_ilt_alloc()
2311 qed_ptt_release(p_hwfn, p_ptt); in qed_cxt_dynamic_ilt_alloc()
2313 mutex_unlock(&p_hwfn->p_cxt_mngr->mutex); in qed_cxt_dynamic_ilt_alloc()
2322 qed_cxt_free_ilt_range(struct qed_hwfn *p_hwfn, in qed_cxt_free_ilt_range() argument
2337 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC]; in qed_cxt_free_ilt_range()
2338 elem_size = CONN_CXT_SIZE(p_hwfn); in qed_cxt_free_ilt_range()
2342 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM]; in qed_cxt_free_ilt_range()
2347 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM]; in qed_cxt_free_ilt_range()
2352 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_cxt_free_ilt_range()
2353 elem_size = TYPE1_TASK_CXT_SIZE(p_hwfn); in qed_cxt_free_ilt_range()
2357 DP_NOTICE(p_hwfn, "-EINVALID elem type = %d", elem_type); in qed_cxt_free_ilt_range()
2369 shadow_start_line = start_line - p_hwfn->p_cxt_mngr->pf_start_line; in qed_cxt_free_ilt_range()
2370 shadow_end_line = end_line - p_hwfn->p_cxt_mngr->pf_start_line; in qed_cxt_free_ilt_range()
2372 p_ptt = qed_ptt_acquire(p_hwfn); in qed_cxt_free_ilt_range()
2374 DP_NOTICE(p_hwfn, in qed_cxt_free_ilt_range()
2380 if (!p_hwfn->p_cxt_mngr->ilt_shadow[i].virt_addr) in qed_cxt_free_ilt_range()
2383 dma_free_coherent(&p_hwfn->cdev->pdev->dev, in qed_cxt_free_ilt_range()
2384 p_hwfn->p_cxt_mngr->ilt_shadow[i].size, in qed_cxt_free_ilt_range()
2385 p_hwfn->p_cxt_mngr->ilt_shadow[i].virt_addr, in qed_cxt_free_ilt_range()
2386 p_hwfn->p_cxt_mngr->ilt_shadow[i].phys_addr); in qed_cxt_free_ilt_range()
2388 p_hwfn->p_cxt_mngr->ilt_shadow[i].virt_addr = NULL; in qed_cxt_free_ilt_range()
2389 p_hwfn->p_cxt_mngr->ilt_shadow[i].phys_addr = 0; in qed_cxt_free_ilt_range()
2390 p_hwfn->p_cxt_mngr->ilt_shadow[i].size = 0; in qed_cxt_free_ilt_range()
2400 qed_dmae_host2grc(p_hwfn, p_ptt, in qed_cxt_free_ilt_range()
2407 qed_ptt_release(p_hwfn, p_ptt); in qed_cxt_free_ilt_range()
2412 int qed_cxt_free_proto_ilt(struct qed_hwfn *p_hwfn, enum protocol_type proto) in qed_cxt_free_proto_ilt() argument
2418 rc = qed_cxt_free_ilt_range(p_hwfn, QED_ELEM_CXT, in qed_cxt_free_proto_ilt()
2419 qed_cxt_get_proto_cid_start(p_hwfn, in qed_cxt_free_proto_ilt()
2421 qed_cxt_get_proto_cid_count(p_hwfn, in qed_cxt_free_proto_ilt()
2431 rc = qed_cxt_free_ilt_range(p_hwfn, QED_ELEM_TASK, 0, in qed_cxt_free_proto_ilt()
2432 qed_cxt_get_proto_tid_count(p_hwfn, proto)); in qed_cxt_free_proto_ilt()
2437 rc = qed_cxt_free_ilt_range(p_hwfn, QED_ELEM_XRC_SRQ, 0, in qed_cxt_free_proto_ilt()
2438 p_hwfn->p_cxt_mngr->xrc_srq_count); in qed_cxt_free_proto_ilt()
2440 rc = qed_cxt_free_ilt_range(p_hwfn, QED_ELEM_SRQ, in qed_cxt_free_proto_ilt()
2441 p_hwfn->p_cxt_mngr->xrc_srq_count, in qed_cxt_free_proto_ilt()
2442 p_hwfn->p_cxt_mngr->srq_count); in qed_cxt_free_proto_ilt()
2447 int qed_cxt_get_task_ctx(struct qed_hwfn *p_hwfn, in qed_cxt_get_task_ctx() argument
2450 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_task_ctx()
2460 switch (p_hwfn->hw_info.personality) { in qed_cxt_get_task_ctx()
2512 u16 qed_get_cdut_num_pf_init_pages(struct qed_hwfn *p_hwfn) in qed_get_cdut_num_pf_init_pages() argument
2518 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_get_cdut_num_pf_init_pages()
2527 u16 qed_get_cdut_num_vf_init_pages(struct qed_hwfn *p_hwfn) in qed_get_cdut_num_vf_init_pages() argument
2533 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_get_cdut_num_vf_init_pages()
2542 u16 qed_get_cdut_num_pf_work_pages(struct qed_hwfn *p_hwfn) in qed_get_cdut_num_pf_work_pages() argument
2548 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_get_cdut_num_pf_work_pages()
2557 u16 qed_get_cdut_num_vf_work_pages(struct qed_hwfn *p_hwfn) in qed_get_cdut_num_vf_work_pages() argument
2563 p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT]; in qed_get_cdut_num_vf_work_pages()