Lines Matching refs:swq

637 	kfree(srq->swq);  in bnxt_qplib_destroy_srq()
681 srq->swq = kcalloc(srq->hwq.depth, sizeof(*srq->swq), in bnxt_qplib_create_srq()
683 if (!srq->swq) in bnxt_qplib_create_srq()
688 srq->swq[idx].next_idx = idx + 1; in bnxt_qplib_create_srq()
689 srq->swq[srq->last_idx].next_idx = -1; in bnxt_qplib_create_srq()
783 srq->start_idx = srq->swq[next].next_idx; in bnxt_qplib_post_srq_recv()
802 srq->swq[next].wr_id = wqe->wr_id; in bnxt_qplib_post_srq_recv()
841 que->swq = kcalloc(que->max_wqe, sizeof(*que->swq), GFP_KERNEL); in bnxt_qplib_alloc_init_swq()
842 if (!que->swq) { in bnxt_qplib_alloc_init_swq()
850 que->swq[indx].next_idx = indx + 1; in bnxt_qplib_alloc_init_swq()
851 que->swq[que->swq_last].next_idx = 0; /* Make it circular */ in bnxt_qplib_alloc_init_swq()
865 return &que->swq[idx]; in bnxt_qplib_get_swqe()
870 que->swq_start = que->swq[idx].next_idx; in bnxt_qplib_swq_mod_start()
1028 kfree(sq->swq); in bnxt_qplib_create_qp1()
1277 kfree(sq->swq); in bnxt_qplib_create_qp()
1670 kfree(qp->rq.swq); in bnxt_qplib_free_qp_res()
1674 kfree(qp->sq.swq); in bnxt_qplib_free_qp_res()
1728 struct bnxt_qplib_swq *swq) in bnxt_qplib_fill_msn_search() argument
1734 msns = (struct sq_msn_search *)swq->psn_search; in bnxt_qplib_fill_msn_search()
1737 start_psn = swq->start_psn; in bnxt_qplib_fill_msn_search()
1738 next_psn = swq->next_psn; in bnxt_qplib_fill_msn_search()
1739 start_idx = swq->slot_idx; in bnxt_qplib_fill_msn_search()
1756 struct bnxt_qplib_swq *swq) in bnxt_qplib_fill_psn_search() argument
1763 if (!swq->psn_search) in bnxt_qplib_fill_psn_search()
1768 bnxt_qplib_fill_msn_search(qp, wqe, swq); in bnxt_qplib_fill_psn_search()
1771 psns = (struct sq_psn_search *)swq->psn_search; in bnxt_qplib_fill_psn_search()
1772 psns_ext = (struct sq_psn_search_ext *)swq->psn_search; in bnxt_qplib_fill_psn_search()
1774 op_spsn = ((swq->start_psn << SQ_PSN_SEARCH_START_PSN_SFT) & in bnxt_qplib_fill_psn_search()
1778 flg_npsn = ((swq->next_psn << SQ_PSN_SEARCH_NEXT_PSN_SFT) & in bnxt_qplib_fill_psn_search()
1784 psns_ext->start_slot_idx = cpu_to_le16(swq->slot_idx); in bnxt_qplib_fill_psn_search()
1900 struct bnxt_qplib_swq *swq, bool hw_retx) in bnxt_qplib_pull_psn_buff() argument
1911 tail = swq->slot_idx / sq->dbinfo.max_slot; in bnxt_qplib_pull_psn_buff()
1918 swq->psn_search = buff; in bnxt_qplib_pull_psn_buff()
1935 struct bnxt_qplib_swq *swq; in bnxt_qplib_post_send() local
1977 swq = bnxt_qplib_get_swqe(sq, &wqe_idx); in bnxt_qplib_post_send()
1978 swq->slot_idx = sw_prod; in bnxt_qplib_post_send()
1979 bnxt_qplib_pull_psn_buff(qp, sq, swq, BNXT_RE_HW_RETX(qp->dev_cap_flags)); in bnxt_qplib_post_send()
1981 swq->wr_id = wqe->wr_id; in bnxt_qplib_post_send()
1982 swq->type = wqe->type; in bnxt_qplib_post_send()
1983 swq->flags = wqe->flags; in bnxt_qplib_post_send()
1984 swq->slots = slots_needed; in bnxt_qplib_post_send()
1985 swq->start_psn = sq->psn & BTH_PSN_MASK; in bnxt_qplib_post_send()
1987 swq->flags |= SQ_SEND_FLAGS_SIGNAL_COMP; in bnxt_qplib_post_send()
1991 qp->id, wqe_idx, swq->wr_id); in bnxt_qplib_post_send()
2246 swq->next_psn = sq->psn & BTH_PSN_MASK; in bnxt_qplib_post_send()
2247 bnxt_qplib_fill_psn_search(qp, wqe, swq); in bnxt_qplib_post_send()
2251 bnxt_qplib_hwq_incr_prod(&sq->dbinfo, sq_hwq, swq->slots); in bnxt_qplib_post_send()
2301 struct bnxt_qplib_swq *swq; in bnxt_qplib_post_recv() local
2328 swq = bnxt_qplib_get_swqe(rq, &wqe_idx); in bnxt_qplib_post_recv()
2329 swq->wr_id = wqe->wr_id; in bnxt_qplib_post_recv()
2330 swq->slots = rq->dbinfo.max_slot; in bnxt_qplib_post_recv()
2333 wqe_idx, swq->wr_id); in bnxt_qplib_post_recv()
2362 bnxt_qplib_hwq_incr_prod(&rq->dbinfo, &rq->hwq, swq->slots); in bnxt_qplib_post_recv()
2634 if (sq->swq[last].wr_id == BNXT_QPLIB_FENCE_WRID) { in __flush_sq()
2643 cqe->wr_id = sq->swq[last].wr_id; in __flush_sq()
2645 cqe->type = sq->swq[last].type; in __flush_sq()
2656 sq->swq[last].slots, in __flush_sq()
2658 sq->swq_last = sq->swq[last].next_idx; in __flush_sq()
2701 cqe->wr_id = rq->swq[last].wr_id; in __flush_rq()
2710 rq->swq[last].slots, in __flush_rq()
2712 rq->swq_last = rq->swq[last].next_idx; in __flush_rq()
2748 struct bnxt_qplib_swq *swq; in bnxt_re_legacy_do_wa9060() local
2758 swq = &sq->swq[swq_last]; in bnxt_re_legacy_do_wa9060()
2759 if (swq->psn_search && in bnxt_re_legacy_do_wa9060()
2760 le32_to_cpu(swq->psn_search->flags_next_psn) & 0x80000000) { in bnxt_re_legacy_do_wa9060()
2762 swq->psn_search->flags_next_psn = cpu_to_le32 in bnxt_re_legacy_do_wa9060()
2763 (le32_to_cpu(swq->psn_search->flags_next_psn) in bnxt_re_legacy_do_wa9060()
2804 sq->swq[peek_sq_cons_idx].wr_id == in bnxt_re_legacy_do_wa9060()
2871 struct bnxt_qplib_swq *swq; in bnxt_qplib_cq_process_req() local
2900 swq = &sq->swq[sq->swq_last]; in bnxt_qplib_cq_process_req()
2905 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_req()
2910 cqe->type = swq->type; in bnxt_qplib_cq_process_req()
2916 if (swq->next_idx == cqe_sq_cons && in bnxt_qplib_cq_process_req()
2937 if (swq->flags & SQ_SEND_FLAGS_SIGNAL_COMP) { in bnxt_qplib_cq_process_req()
2953 swq->slots, &sq->dbinfo.flags); in bnxt_qplib_cq_process_req()
2954 sq->swq_last = swq->next_idx; in bnxt_qplib_cq_process_req()
2975 srq->swq[srq->last_idx].next_idx = (int)tag; in bnxt_qplib_release_srqe()
2977 srq->swq[srq->last_idx].next_idx = -1; in bnxt_qplib_release_srqe()
3032 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_rc()
3052 cqe->wr_id = rq->swq[rq->swq_last].wr_id; in bnxt_qplib_cq_process_res_rc()
3059 rq->swq[rq->swq_last].slots, in bnxt_qplib_cq_process_res_rc()
3061 rq->swq_last = rq->swq[rq->swq_last].next_idx; in bnxt_qplib_cq_process_res_rc()
3133 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_ud()
3154 cqe->wr_id = rq->swq[rq->swq_last].wr_id; in bnxt_qplib_cq_process_res_ud()
3161 rq->swq[rq->swq_last].slots, in bnxt_qplib_cq_process_res_ud()
3163 rq->swq_last = rq->swq[rq->swq_last].next_idx; in bnxt_qplib_cq_process_res_ud()
3252 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_raweth_qp1()
3274 cqe->wr_id = rq->swq[rq->swq_last].wr_id; in bnxt_qplib_cq_process_res_raweth_qp1()
3283 rq->swq[wr_id_idx].slots, in bnxt_qplib_cq_process_res_raweth_qp1()
3285 rq->swq_last = rq->swq[rq->swq_last].next_idx; in bnxt_qplib_cq_process_res_raweth_qp1()
3348 if (sq->swq[swq_last].flags & SQ_SEND_FLAGS_SIGNAL_COMP) { in bnxt_qplib_cq_process_terminal()
3354 cqe->wr_id = sq->swq[swq_last].wr_id; in bnxt_qplib_cq_process_terminal()
3355 cqe->type = sq->swq[swq_last].type; in bnxt_qplib_cq_process_terminal()
3365 sq->swq[swq_last].slots, in bnxt_qplib_cq_process_terminal()
3367 sq->swq_last = sq->swq[swq_last].next_idx; in bnxt_qplib_cq_process_terminal()