Lines Matching refs:swq
616 kfree(srq->swq); in bnxt_qplib_destroy_srq()
643 srq->swq = kcalloc(srq->hwq.max_elements, sizeof(*srq->swq), in bnxt_qplib_create_srq()
645 if (!srq->swq) { in bnxt_qplib_create_srq()
678 srq->swq[idx].next_idx = idx + 1; in bnxt_qplib_create_srq()
679 srq->swq[srq->last_idx].next_idx = -1; in bnxt_qplib_create_srq()
694 kfree(srq->swq); in bnxt_qplib_create_srq()
769 srq->start_idx = srq->swq[next].next_idx; in bnxt_qplib_post_srq_recv()
786 srq->swq[next].wr_id = wqe->wr_id; in bnxt_qplib_post_srq_recv()
809 que->swq = kcalloc(que->max_wqe, sizeof(*que->swq), GFP_KERNEL); in bnxt_qplib_alloc_init_swq()
810 if (!que->swq) in bnxt_qplib_alloc_init_swq()
816 que->swq[indx].next_idx = indx + 1; in bnxt_qplib_alloc_init_swq()
817 que->swq[que->swq_last].next_idx = 0; /* Make it circular */ in bnxt_qplib_alloc_init_swq()
937 kfree(rq->swq); in bnxt_qplib_create_qp1()
941 kfree(sq->swq); in bnxt_qplib_create_qp1()
1167 kfree(rq->swq); in bnxt_qplib_create_qp()
1171 kfree(sq->swq); in bnxt_qplib_create_qp()
1546 kfree(qp->sq.swq); in bnxt_qplib_free_qp_res()
1549 kfree(qp->rq.swq); in bnxt_qplib_free_qp_res()
1611 struct bnxt_qplib_swq *swq) in bnxt_qplib_fill_msn_search() argument
1617 msns = (struct sq_msn_search *)swq->psn_search; in bnxt_qplib_fill_msn_search()
1620 start_psn = swq->start_psn; in bnxt_qplib_fill_msn_search()
1621 next_psn = swq->next_psn; in bnxt_qplib_fill_msn_search()
1622 start_idx = swq->slot_idx; in bnxt_qplib_fill_msn_search()
1631 struct bnxt_qplib_swq *swq) in bnxt_qplib_fill_psn_search() argument
1638 if (!swq->psn_search) in bnxt_qplib_fill_psn_search()
1642 bnxt_qplib_fill_msn_search(qp, wqe, swq); in bnxt_qplib_fill_psn_search()
1645 psns = (struct sq_psn_search *)swq->psn_search; in bnxt_qplib_fill_psn_search()
1646 psns = swq->psn_search; in bnxt_qplib_fill_psn_search()
1647 psns_ext = swq->psn_ext; in bnxt_qplib_fill_psn_search()
1649 op_spsn = ((swq->start_psn << SQ_PSN_SEARCH_START_PSN_SFT) & in bnxt_qplib_fill_psn_search()
1653 flg_npsn = ((swq->next_psn << SQ_PSN_SEARCH_NEXT_PSN_SFT) & in bnxt_qplib_fill_psn_search()
1659 psns_ext->start_slot_idx = cpu_to_le16(swq->slot_idx); in bnxt_qplib_fill_psn_search()
1755 struct bnxt_qplib_swq *swq, bool hw_retx) in bnxt_qplib_pull_psn_buff() argument
1765 tail = swq->slot_idx / sq->dbinfo.max_slot; in bnxt_qplib_pull_psn_buff()
1774 swq->psn_ext = buff; in bnxt_qplib_pull_psn_buff()
1775 swq->psn_search = buff; in bnxt_qplib_pull_psn_buff()
1792 struct bnxt_qplib_swq *swq; in bnxt_qplib_post_send() local
1822 swq = bnxt_qplib_get_swqe(sq, &wqe_idx); in bnxt_qplib_post_send()
1823 bnxt_qplib_pull_psn_buff(qp, sq, swq, BNXT_RE_HW_RETX(qp->dev_cap_flags)); in bnxt_qplib_post_send()
1826 swq->slot_idx = hwq->prod; in bnxt_qplib_post_send()
1827 swq->slots = slots; in bnxt_qplib_post_send()
1828 swq->wr_id = wqe->wr_id; in bnxt_qplib_post_send()
1829 swq->type = wqe->type; in bnxt_qplib_post_send()
1830 swq->flags = wqe->flags; in bnxt_qplib_post_send()
1831 swq->start_psn = sq->psn & BTH_PSN_MASK; in bnxt_qplib_post_send()
1833 swq->flags |= SQ_SEND_FLAGS_SIGNAL_COMP; in bnxt_qplib_post_send()
2014 swq->next_psn = sq->psn & BTH_PSN_MASK; in bnxt_qplib_post_send()
2015 bnxt_qplib_fill_psn_search(qp, wqe, swq); in bnxt_qplib_post_send()
2019 bnxt_qplib_hwq_incr_prod(&sq->dbinfo, hwq, swq->slots); in bnxt_qplib_post_send()
2053 struct bnxt_qplib_swq *swq; in bnxt_qplib_post_recv() local
2075 swq = bnxt_qplib_get_swqe(rq, &wqe_idx); in bnxt_qplib_post_recv()
2076 swq->wr_id = wqe->wr_id; in bnxt_qplib_post_recv()
2077 swq->slots = rq->dbinfo.max_slot; in bnxt_qplib_post_recv()
2107 bnxt_qplib_hwq_incr_prod(&rq->dbinfo, hwq, swq->slots); in bnxt_qplib_post_recv()
2287 if (sq->swq[last].wr_id == BNXT_QPLIB_FENCE_WRID) { in __flush_sq()
2295 cqe->wr_id = sq->swq[last].wr_id; in __flush_sq()
2297 cqe->type = sq->swq[last].type; in __flush_sq()
2302 sq->swq[last].slots, &sq->dbinfo.flags); in __flush_sq()
2303 sq->swq_last = sq->swq[last].next_idx; in __flush_sq()
2346 cqe->wr_id = rq->swq[last].wr_id; in __flush_rq()
2350 rq->swq[last].slots, &rq->dbinfo.flags); in __flush_rq()
2351 rq->swq_last = rq->swq[last].next_idx; in __flush_rq()
2384 struct bnxt_qplib_swq *swq; in do_wa9060() local
2390 swq = &sq->swq[swq_last]; in do_wa9060()
2391 if (swq->psn_search && in do_wa9060()
2392 le32_to_cpu(swq->psn_search->flags_next_psn) & 0x80000000) { in do_wa9060()
2394 swq->psn_search->flags_next_psn = cpu_to_le32 in do_wa9060()
2395 (le32_to_cpu(swq->psn_search->flags_next_psn) in do_wa9060()
2440 sq->swq[peek_sq_cons_idx].wr_id == in do_wa9060()
2478 struct bnxt_qplib_swq *swq; in bnxt_qplib_cq_process_req() local
2510 swq = &sq->swq[sq->swq_last]; in bnxt_qplib_cq_process_req()
2515 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_req()
2518 cqe->type = swq->type; in bnxt_qplib_cq_process_req()
2524 if (swq->next_idx == cqe_sq_cons && in bnxt_qplib_cq_process_req()
2542 if (swq->flags & SQ_SEND_FLAGS_SIGNAL_COMP) { in bnxt_qplib_cq_process_req()
2550 swq->slots, &sq->dbinfo.flags); in bnxt_qplib_cq_process_req()
2551 sq->swq_last = swq->next_idx; in bnxt_qplib_cq_process_req()
2574 srq->swq[srq->last_idx].next_idx = (int)tag; in bnxt_qplib_release_srqe()
2576 srq->swq[srq->last_idx].next_idx = -1; in bnxt_qplib_release_srqe()
2626 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_rc()
2632 struct bnxt_qplib_swq *swq; in bnxt_qplib_cq_process_res_rc() local
2643 swq = &rq->swq[rq->swq_last]; in bnxt_qplib_cq_process_res_rc()
2644 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_rc()
2648 swq->slots, &rq->dbinfo.flags); in bnxt_qplib_cq_process_res_rc()
2649 rq->swq_last = swq->next_idx; in bnxt_qplib_cq_process_res_rc()
2712 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_ud()
2718 struct bnxt_qplib_swq *swq; in bnxt_qplib_cq_process_res_ud() local
2730 swq = &rq->swq[rq->swq_last]; in bnxt_qplib_cq_process_res_ud()
2731 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_ud()
2735 swq->slots, &rq->dbinfo.flags); in bnxt_qplib_cq_process_res_ud()
2736 rq->swq_last = swq->next_idx; in bnxt_qplib_cq_process_res_ud()
2817 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_raweth_qp1()
2823 struct bnxt_qplib_swq *swq; in bnxt_qplib_cq_process_res_raweth_qp1() local
2834 swq = &rq->swq[rq->swq_last]; in bnxt_qplib_cq_process_res_raweth_qp1()
2835 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_raweth_qp1()
2839 swq->slots, &rq->dbinfo.flags); in bnxt_qplib_cq_process_res_raweth_qp1()
2840 rq->swq_last = swq->next_idx; in bnxt_qplib_cq_process_res_raweth_qp1()
2901 if (sq->swq[swq_last].flags & SQ_SEND_FLAGS_SIGNAL_COMP) { in bnxt_qplib_cq_process_terminal()
2907 cqe->wr_id = sq->swq[swq_last].wr_id; in bnxt_qplib_cq_process_terminal()
2908 cqe->type = sq->swq[swq_last].type; in bnxt_qplib_cq_process_terminal()
2913 sq->swq[swq_last].slots, &sq->dbinfo.flags); in bnxt_qplib_cq_process_terminal()
2914 sq->swq_last = sq->swq[swq_last].next_idx; in bnxt_qplib_cq_process_terminal()