Lines Matching refs:hwq_attr

184 			      struct bnxt_qplib_hwq_attr *hwq_attr)  in bnxt_qplib_alloc_init_hwq()  argument
194 res = hwq_attr->res; in bnxt_qplib_alloc_init_hwq()
196 pg_size = hwq_attr->sginfo->pgsize; in bnxt_qplib_alloc_init_hwq()
199 depth = roundup_pow_of_two(hwq_attr->depth); in bnxt_qplib_alloc_init_hwq()
200 stride = roundup_pow_of_two(hwq_attr->stride); in bnxt_qplib_alloc_init_hwq()
201 if (hwq_attr->aux_depth) { in bnxt_qplib_alloc_init_hwq()
202 aux_slots = hwq_attr->aux_depth; in bnxt_qplib_alloc_init_hwq()
203 aux_size = roundup_pow_of_two(hwq_attr->aux_stride); in bnxt_qplib_alloc_init_hwq()
209 if (!hwq_attr->sginfo->umem) { in bnxt_qplib_alloc_init_hwq()
216 hwq_attr->sginfo->npages = npages; in bnxt_qplib_alloc_init_hwq()
218 npages = ib_umem_num_dma_blocks(hwq_attr->sginfo->umem, in bnxt_qplib_alloc_init_hwq()
219 hwq_attr->sginfo->pgsize); in bnxt_qplib_alloc_init_hwq()
223 if (npages == MAX_PBL_LVL_0_PGS && !hwq_attr->sginfo->nopte) { in bnxt_qplib_alloc_init_hwq()
225 rc = __alloc_pbl(res, &hwq->pbl[PBL_LVL_0], hwq_attr->sginfo); in bnxt_qplib_alloc_init_hwq()
234 u32 flag = (hwq_attr->type == HWQ_TYPE_L2_CMPL) ? in bnxt_qplib_alloc_init_hwq()
265 hwq_attr->sginfo); in bnxt_qplib_alloc_init_hwq()
269 if (hwq_attr->sginfo->nopte) in bnxt_qplib_alloc_init_hwq()
279 if (hwq_attr->type == HWQ_TYPE_QUEUE) { in bnxt_qplib_alloc_init_hwq()
290 u32 flag = (hwq_attr->type == HWQ_TYPE_L2_CMPL) ? in bnxt_qplib_alloc_init_hwq()
305 hwq_attr->sginfo); in bnxt_qplib_alloc_init_hwq()
309 if (hwq_attr->sginfo->nopte) in bnxt_qplib_alloc_init_hwq()
318 if (hwq_attr->type == HWQ_TYPE_QUEUE) { in bnxt_qplib_alloc_init_hwq()
334 hwq->depth = hwq_attr->depth; in bnxt_qplib_alloc_init_hwq()
340 if (hwq_attr->sginfo->nopte && hwq->level) in bnxt_qplib_alloc_init_hwq()
374 struct bnxt_qplib_hwq_attr hwq_attr = {}; in bnxt_qplib_alloc_tqm_rings() local
384 hwq_attr.sginfo = &sginfo; in bnxt_qplib_alloc_tqm_rings()
385 hwq_attr.res = res; in bnxt_qplib_alloc_tqm_rings()
386 hwq_attr.type = HWQ_TYPE_CTX; in bnxt_qplib_alloc_tqm_rings()
387 hwq_attr.depth = 512; in bnxt_qplib_alloc_tqm_rings()
388 hwq_attr.stride = sizeof(u64); in bnxt_qplib_alloc_tqm_rings()
390 rc = bnxt_qplib_alloc_init_hwq(&tqmctx->pde, &hwq_attr); in bnxt_qplib_alloc_tqm_rings()
396 hwq_attr.stride = 1; in bnxt_qplib_alloc_tqm_rings()
400 hwq_attr.depth = ctx->qpc_count * tqmctx->qcount[i]; in bnxt_qplib_alloc_tqm_rings()
401 rc = bnxt_qplib_alloc_init_hwq(&tqmctx->qtbl[i], &hwq_attr); in bnxt_qplib_alloc_tqm_rings()
491 struct bnxt_qplib_hwq_attr hwq_attr = {}; in bnxt_qplib_alloc_ctx() local
501 hwq_attr.sginfo = &sginfo; in bnxt_qplib_alloc_ctx()
503 hwq_attr.res = res; in bnxt_qplib_alloc_ctx()
504 hwq_attr.depth = ctx->qpc_count; in bnxt_qplib_alloc_ctx()
505 hwq_attr.stride = BNXT_QPLIB_MAX_QP_CTX_ENTRY_SIZE; in bnxt_qplib_alloc_ctx()
506 hwq_attr.type = HWQ_TYPE_CTX; in bnxt_qplib_alloc_ctx()
507 rc = bnxt_qplib_alloc_init_hwq(&ctx->qpc_tbl, &hwq_attr); in bnxt_qplib_alloc_ctx()
512 hwq_attr.depth = ctx->mrw_count; in bnxt_qplib_alloc_ctx()
513 hwq_attr.stride = BNXT_QPLIB_MAX_MRW_CTX_ENTRY_SIZE; in bnxt_qplib_alloc_ctx()
514 rc = bnxt_qplib_alloc_init_hwq(&ctx->mrw_tbl, &hwq_attr); in bnxt_qplib_alloc_ctx()
519 hwq_attr.depth = ctx->srqc_count; in bnxt_qplib_alloc_ctx()
520 hwq_attr.stride = BNXT_QPLIB_MAX_SRQ_CTX_ENTRY_SIZE; in bnxt_qplib_alloc_ctx()
521 rc = bnxt_qplib_alloc_init_hwq(&ctx->srqc_tbl, &hwq_attr); in bnxt_qplib_alloc_ctx()
526 hwq_attr.depth = ctx->cq_count; in bnxt_qplib_alloc_ctx()
527 hwq_attr.stride = BNXT_QPLIB_MAX_CQ_CTX_ENTRY_SIZE; in bnxt_qplib_alloc_ctx()
528 rc = bnxt_qplib_alloc_init_hwq(&ctx->cq_tbl, &hwq_attr); in bnxt_qplib_alloc_ctx()
538 hwq_attr.depth = ctx->qpc_count * 16; in bnxt_qplib_alloc_ctx()
539 hwq_attr.stride = 1; in bnxt_qplib_alloc_ctx()
540 rc = bnxt_qplib_alloc_init_hwq(&ctx->tim_tbl, &hwq_attr); in bnxt_qplib_alloc_ctx()