Lines Matching refs:hwq

76 		dev_dbg(&scq->hwq.pdev->dev,  in __bnxt_qplib_add_flush_qp()
84 dev_dbg(&rcq->hwq.pdev->dev, in __bnxt_qplib_add_flush_qp()
143 qp->sq.hwq.prod = 0; in bnxt_qplib_clean_qp()
144 qp->sq.hwq.cons = 0; in bnxt_qplib_clean_qp()
146 qp->rq.hwq.prod = 0; in bnxt_qplib_clean_qp()
147 qp->rq.hwq.cons = 0; in bnxt_qplib_clean_qp()
237 struct bnxt_qplib_hwq *hwq = &nq->hwq; in clean_nq() local
243 spin_lock_bh(&hwq->lock); in clean_nq()
246 nq_ptr = (struct nq_base **)hwq->pbl_ptr; in clean_nq()
247 nqe = &nq_ptr[NQE_PG(hwq->cons)][NQE_IDX(hwq->cons)]; in clean_nq()
276 bnxt_qplib_hwq_incr_cons(hwq->max_elements, &hwq->cons, in clean_nq()
279 spin_unlock_bh(&hwq->lock); in clean_nq()
300 struct bnxt_qplib_hwq *hwq = &nq->hwq; in bnxt_qplib_service_nq() local
308 spin_lock_bh(&hwq->lock); in bnxt_qplib_service_nq()
311 nqe = bnxt_qplib_get_qe(hwq, hwq->cons, NULL); in bnxt_qplib_service_nq()
372 bnxt_qplib_hwq_incr_cons(hwq->max_elements, &hwq->cons, in bnxt_qplib_service_nq()
377 spin_unlock_bh(&hwq->lock); in bnxt_qplib_service_nq()
393 nq->budget = nq->hwq.max_elements; in bnxt_re_synchronize_nq()
401 struct bnxt_qplib_hwq *hwq = &nq->hwq; in bnxt_qplib_nq_irq() local
405 sw_cons = HWQ_CMP(hwq->cons, hwq); in bnxt_qplib_nq_irq()
406 prefetch(bnxt_qplib_get_qe(hwq, sw_cons, NULL)); in bnxt_qplib_nq_irq()
524 nq_db->dbinfo.hwq = &nq->hwq; in bnxt_qplib_map_nq_db()
565 if (nq->hwq.max_elements) { in bnxt_qplib_free_nq()
566 bnxt_qplib_free_hwq(nq->res, &nq->hwq); in bnxt_qplib_free_nq()
567 nq->hwq.max_elements = 0; in bnxt_qplib_free_nq()
578 if (!nq->hwq.max_elements || in bnxt_qplib_alloc_nq()
579 nq->hwq.max_elements > BNXT_QPLIB_NQE_MAX_CNT) in bnxt_qplib_alloc_nq()
580 nq->hwq.max_elements = BNXT_QPLIB_NQE_MAX_CNT; in bnxt_qplib_alloc_nq()
586 hwq_attr.depth = nq->hwq.max_elements; in bnxt_qplib_alloc_nq()
589 if (bnxt_qplib_alloc_init_hwq(&nq->hwq, &hwq_attr)) { in bnxt_qplib_alloc_nq()
619 bnxt_qplib_free_hwq(res, &srq->hwq); in bnxt_qplib_destroy_srq()
639 rc = bnxt_qplib_alloc_init_hwq(&srq->hwq, &hwq_attr); in bnxt_qplib_create_srq()
643 srq->swq = kcalloc(srq->hwq.max_elements, sizeof(*srq->swq), in bnxt_qplib_create_srq()
658 req.srq_size = cpu_to_le16((u16)srq->hwq.max_elements); in bnxt_qplib_create_srq()
659 pbl = &srq->hwq.pbl[PBL_LVL_0]; in bnxt_qplib_create_srq()
660 pg_sz_lvl = ((u16)bnxt_qplib_base_pg_size(&srq->hwq) << in bnxt_qplib_create_srq()
662 pg_sz_lvl |= (srq->hwq.level & CMDQ_CREATE_SRQ_LVL_MASK) << in bnxt_qplib_create_srq()
676 srq->last_idx = srq->hwq.max_elements - 1; in bnxt_qplib_create_srq()
677 for (idx = 0; idx < srq->hwq.max_elements; idx++) in bnxt_qplib_create_srq()
682 srq->dbinfo.hwq = &srq->hwq; in bnxt_qplib_create_srq()
693 bnxt_qplib_free_hwq(res, &srq->hwq); in bnxt_qplib_create_srq()
702 struct bnxt_qplib_hwq *srq_hwq = &srq->hwq; in bnxt_qplib_modify_srq()
755 struct bnxt_qplib_hwq *srq_hwq = &srq->hwq; in bnxt_qplib_post_srq_recv()
853 rc = bnxt_qplib_alloc_init_hwq(&sq->hwq, &hwq_attr); in bnxt_qplib_create_qp1()
862 pbl = &sq->hwq.pbl[PBL_LVL_0]; in bnxt_qplib_create_qp1()
864 pg_sz_lvl = (bnxt_qplib_base_pg_size(&sq->hwq) << in bnxt_qplib_create_qp1()
866 pg_sz_lvl |= (sq->hwq.level & CMDQ_CREATE_QP1_SQ_LVL_MASK); in bnxt_qplib_create_qp1()
881 rc = bnxt_qplib_alloc_init_hwq(&rq->hwq, &hwq_attr); in bnxt_qplib_create_qp1()
888 pbl = &rq->hwq.pbl[PBL_LVL_0]; in bnxt_qplib_create_qp1()
890 pg_sz_lvl = (bnxt_qplib_base_pg_size(&rq->hwq) << in bnxt_qplib_create_qp1()
892 pg_sz_lvl |= (rq->hwq.level & CMDQ_CREATE_QP1_RQ_LVL_MASK); in bnxt_qplib_create_qp1()
918 sq->dbinfo.hwq = &sq->hwq; in bnxt_qplib_create_qp1()
923 rq->dbinfo.hwq = &rq->hwq; in bnxt_qplib_create_qp1()
939 bnxt_qplib_free_hwq(res, &rq->hwq); in bnxt_qplib_create_qp1()
943 bnxt_qplib_free_hwq(res, &sq->hwq); in bnxt_qplib_create_qp1()
949 struct bnxt_qplib_hwq *hwq; in bnxt_qplib_init_psn_ptr() local
955 hwq = &sq->hwq; in bnxt_qplib_init_psn_ptr()
957 fpsne = (u64)bnxt_qplib_get_qe(hwq, hwq->depth, &psn_pg); in bnxt_qplib_init_psn_ptr()
960 hwq->pad_pgofft = indx_pad; in bnxt_qplib_init_psn_ptr()
961 hwq->pad_pg = (u64 *)psn_pg; in bnxt_qplib_init_psn_ptr()
962 hwq->pad_stride = size; in bnxt_qplib_init_psn_ptr()
1023 rc = bnxt_qplib_alloc_init_hwq(&sq->hwq, &hwq_attr); in bnxt_qplib_create_qp()
1035 pbl = &sq->hwq.pbl[PBL_LVL_0]; in bnxt_qplib_create_qp()
1037 pg_sz_lvl = (bnxt_qplib_base_pg_size(&sq->hwq) << in bnxt_qplib_create_qp()
1039 pg_sz_lvl |= (sq->hwq.level & CMDQ_CREATE_QP_SQ_LVL_MASK); in bnxt_qplib_create_qp()
1056 rc = bnxt_qplib_alloc_init_hwq(&rq->hwq, &hwq_attr); in bnxt_qplib_create_qp()
1064 pbl = &rq->hwq.pbl[PBL_LVL_0]; in bnxt_qplib_create_qp()
1066 pg_sz_lvl = (bnxt_qplib_base_pg_size(&rq->hwq) << in bnxt_qplib_create_qp()
1068 pg_sz_lvl |= (rq->hwq.level & CMDQ_CREATE_QP_RQ_LVL_MASK); in bnxt_qplib_create_qp()
1147 sq->dbinfo.hwq = &sq->hwq; in bnxt_qplib_create_qp()
1152 rq->dbinfo.hwq = &rq->hwq; in bnxt_qplib_create_qp()
1169 bnxt_qplib_free_hwq(res, &rq->hwq); in bnxt_qplib_create_qp()
1173 bnxt_qplib_free_hwq(res, &sq->hwq); in bnxt_qplib_create_qp()
1354 req.sq_size = cpu_to_le32(qp->sq.hwq.max_elements); in bnxt_qplib_modify_qp()
1355 req.rq_size = cpu_to_le32(qp->rq.hwq.max_elements); in bnxt_qplib_modify_qp()
1446 qp->sq.max_wqe = qp->sq.hwq.max_elements; in bnxt_qplib_query_qp()
1447 qp->rq.max_wqe = qp->rq.hwq.max_elements; in bnxt_qplib_query_qp()
1462 struct bnxt_qplib_hwq *cq_hwq = &cq->hwq; in __clean_cq()
1541 bnxt_qplib_free_hwq(res, &qp->sq.hwq); in bnxt_qplib_free_qp_res()
1544 bnxt_qplib_free_hwq(res, &qp->rq.hwq); in bnxt_qplib_free_qp_res()
1666 struct bnxt_qplib_hwq *hwq; in bnxt_qplib_put_inline() local
1674 hwq = &qp->sq.hwq; in bnxt_qplib_put_inline()
1685 il_dst = bnxt_qplib_get_prod_qe(hwq, *idx); in bnxt_qplib_put_inline()
1707 static u32 bnxt_qplib_put_sges(struct bnxt_qplib_hwq *hwq, in bnxt_qplib_put_sges() argument
1715 dsge = bnxt_qplib_get_prod_qe(hwq, *idx); in bnxt_qplib_put_sges()
1753 struct bnxt_qplib_hwq *hwq; in bnxt_qplib_pull_psn_buff() local
1758 hwq = &sq->hwq; in bnxt_qplib_pull_psn_buff()
1759 if (!hwq->pad_pg) in bnxt_qplib_pull_psn_buff()
1767 pg_num = (tail + hwq->pad_pgofft) / (PAGE_SIZE / hwq->pad_stride); in bnxt_qplib_pull_psn_buff()
1768 pg_indx = (tail + hwq->pad_pgofft) % (PAGE_SIZE / hwq->pad_stride); in bnxt_qplib_pull_psn_buff()
1769 buff = (void *)(hwq->pad_pg[pg_num] + pg_indx * hwq->pad_stride); in bnxt_qplib_pull_psn_buff()
1787 struct bnxt_qplib_hwq *hwq; in bnxt_qplib_post_send() local
1799 hwq = &sq->hwq; in bnxt_qplib_post_send()
1802 dev_err(&hwq->pdev->dev, in bnxt_qplib_post_send()
1811 dev_err(&hwq->pdev->dev, in bnxt_qplib_post_send()
1813 hwq->prod, hwq->cons, hwq->depth, sq->q_full_delta); in bnxt_qplib_post_send()
1822 swq->slot_idx = hwq->prod; in bnxt_qplib_post_send()
1833 dev_dbg(&hwq->pdev->dev, in bnxt_qplib_post_send()
1838 base_hdr = bnxt_qplib_get_prod_qe(hwq, idx++); in bnxt_qplib_post_send()
1839 ext_hdr = bnxt_qplib_get_prod_qe(hwq, idx++); in bnxt_qplib_post_send()
1847 data_len = bnxt_qplib_put_sges(hwq, wqe->sg_list, wqe->num_sge, in bnxt_qplib_post_send()
2015 bnxt_qplib_hwq_incr_prod(&sq->dbinfo, hwq, swq->slots); in bnxt_qplib_post_send()
2026 dev_err(&hwq->pdev->dev, in bnxt_qplib_post_send()
2048 struct bnxt_qplib_hwq *hwq; in bnxt_qplib_post_recv() local
2055 hwq = &rq->hwq; in bnxt_qplib_post_recv()
2057 dev_err(&hwq->pdev->dev, in bnxt_qplib_post_recv()
2065 dev_err(&hwq->pdev->dev, in bnxt_qplib_post_recv()
2077 dev_dbg(&hwq->pdev->dev, in bnxt_qplib_post_recv()
2083 base_hdr = bnxt_qplib_get_prod_qe(hwq, idx++); in bnxt_qplib_post_recv()
2084 ext_hdr = bnxt_qplib_get_prod_qe(hwq, idx++); in bnxt_qplib_post_recv()
2089 bnxt_qplib_put_sges(hwq, wqe->sg_list, wqe->num_sge, &idx); in bnxt_qplib_post_recv()
2093 sge = bnxt_qplib_get_prod_qe(hwq, idx++); in bnxt_qplib_post_recv()
2103 bnxt_qplib_hwq_incr_prod(&rq->dbinfo, hwq, swq->slots); in bnxt_qplib_post_recv()
2113 dev_err(&hwq->pdev->dev, in bnxt_qplib_post_recv()
2146 rc = bnxt_qplib_alloc_init_hwq(&cq->hwq, &hwq_attr); in bnxt_qplib_create_cq()
2157 pbl = &cq->hwq.pbl[PBL_LVL_0]; in bnxt_qplib_create_cq()
2158 pg_sz_lvl = (bnxt_qplib_base_pg_size(&cq->hwq) << in bnxt_qplib_create_cq()
2160 pg_sz_lvl |= (cq->hwq.level & CMDQ_CREATE_CQ_LVL_MASK); in bnxt_qplib_create_cq()
2180 cq->dbinfo.hwq = &cq->hwq; in bnxt_qplib_create_cq()
2190 bnxt_qplib_free_hwq(res, &cq->hwq); in bnxt_qplib_create_cq()
2197 bnxt_qplib_free_hwq(res, &cq->hwq); in bnxt_qplib_resize_cq_complete()
2198 memcpy(&cq->hwq, &cq->resize_hwq, sizeof(cq->hwq)); in bnxt_qplib_resize_cq_complete()
2264 bnxt_qplib_free_hwq(res, &cq->hwq); in bnxt_qplib_destroy_cq()
2297 bnxt_qplib_hwq_incr_cons(sq->hwq.max_elements, &sq->hwq.cons, in __flush_sq()
2345 bnxt_qplib_hwq_incr_cons(rq->hwq.max_elements, &rq->hwq.cons, in __flush_rq()
2393 dev_dbg(&cq->hwq.pdev->dev, in do_wa9060()
2408 i = cq->hwq.max_elements; in do_wa9060()
2410 peek_hwcqe = bnxt_qplib_get_qe(&cq->hwq, in do_wa9060()
2442 dev_dbg(&cq->hwq.pdev->dev, in do_wa9060()
2456 bnxt_qplib_hwq_incr_cons(cq->hwq.max_elements, in do_wa9060()
2460 dev_err(&cq->hwq.pdev->dev, in do_wa9060()
2484 dev_err(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_req()
2492 dev_dbg(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_req()
2523 dev_err(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_req()
2545 bnxt_qplib_hwq_incr_cons(sq->hwq.max_elements, &sq->hwq.cons, in bnxt_qplib_cq_process_req()
2569 spin_lock(&srq->hwq.lock); in bnxt_qplib_release_srqe()
2573 bnxt_qplib_hwq_incr_cons(srq->hwq.max_elements, &srq->hwq.cons, in bnxt_qplib_release_srqe()
2575 spin_unlock(&srq->hwq.lock); in bnxt_qplib_release_srqe()
2592 dev_err(&cq->hwq.pdev->dev, "process_cq RC qp is NULL\n"); in bnxt_qplib_cq_process_res_rc()
2596 dev_dbg(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_res_rc()
2616 if (wr_id_idx >= srq->hwq.max_elements) { in bnxt_qplib_cq_process_res_rc()
2617 dev_err(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_res_rc()
2619 wr_id_idx, srq->hwq.max_elements); in bnxt_qplib_cq_process_res_rc()
2632 dev_err(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_res_rc()
2643 bnxt_qplib_hwq_incr_cons(rq->hwq.max_elements, &rq->hwq.cons, in bnxt_qplib_cq_process_res_rc()
2672 dev_err(&cq->hwq.pdev->dev, "process_cq UD qp is NULL\n"); in bnxt_qplib_cq_process_res_ud()
2676 dev_dbg(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_res_ud()
2702 if (wr_id_idx >= srq->hwq.max_elements) { in bnxt_qplib_cq_process_res_ud()
2703 dev_err(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_res_ud()
2705 wr_id_idx, srq->hwq.max_elements); in bnxt_qplib_cq_process_res_ud()
2718 dev_err(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_res_ud()
2730 bnxt_qplib_hwq_incr_cons(rq->hwq.max_elements, &rq->hwq.cons, in bnxt_qplib_cq_process_res_ud()
2750 hw_cqe = bnxt_qplib_get_qe(&cq->hwq, cq->hwq.cons, NULL); in bnxt_qplib_is_cq_empty()
2770 dev_err(&cq->hwq.pdev->dev, "process_cq Raw/QP1 qp is NULL\n"); in bnxt_qplib_cq_process_res_raweth_qp1()
2774 dev_dbg(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_res_raweth_qp1()
2803 dev_err(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_res_raweth_qp1()
2807 if (wr_id_idx >= srq->hwq.max_elements) { in bnxt_qplib_cq_process_res_raweth_qp1()
2808 dev_err(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_res_raweth_qp1()
2810 wr_id_idx, srq->hwq.max_elements); in bnxt_qplib_cq_process_res_raweth_qp1()
2823 dev_err(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_res_raweth_qp1()
2834 bnxt_qplib_hwq_incr_cons(rq->hwq.max_elements, &rq->hwq.cons, in bnxt_qplib_cq_process_res_raweth_qp1()
2862 dev_warn(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_terminal()
2883 dev_dbg(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_terminal()
2908 bnxt_qplib_hwq_incr_cons(sq->hwq.max_elements, &sq->hwq.cons, in bnxt_qplib_cq_process_terminal()
2926 dev_err(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_terminal()
2934 dev_dbg(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_terminal()
2956 dev_err(&cq->hwq.pdev->dev, in bnxt_qplib_cq_process_cutoff()
2977 dev_dbg(&cq->hwq.pdev->dev, "FP: Flushing SQ QP= %p\n", qp); in bnxt_qplib_process_flush_list()
2982 dev_dbg(&cq->hwq.pdev->dev, "FP: Flushing RQ QP= %p\n", qp); in bnxt_qplib_process_flush_list()
3001 hw_cqe = bnxt_qplib_get_qe(&cq->hwq, cq->hwq.cons, NULL); in bnxt_qplib_poll_cq()
3019 cq->hwq.cons, lib_qp); in bnxt_qplib_poll_cq()
3048 dev_err(&cq->hwq.pdev->dev, in bnxt_qplib_poll_cq()
3062 dev_err(&cq->hwq.pdev->dev, in bnxt_qplib_poll_cq()
3066 bnxt_qplib_hwq_incr_cons(cq->hwq.max_elements, &cq->hwq.cons, in bnxt_qplib_poll_cq()