Lines Matching full:cqe
1569 struct cq_req *cqe = (struct cq_req *)hw_cqe; in __clean_cq() local
1571 if (qp == le64_to_cpu(cqe->qp_handle)) in __clean_cq()
1572 cqe->qp_handle = 0; in __clean_cq()
1579 struct cq_res_rc *cqe = (struct cq_res_rc *)hw_cqe; in __clean_cq() local
1581 if (qp == le64_to_cpu(cqe->qp_handle)) in __clean_cq()
1582 cqe->qp_handle = 0; in __clean_cq()
2384 struct bnxt_qplib_cqe *cqe; in __flush_sq() local
2390 cqe = *pcqe; in __flush_sq()
2400 memset(cqe, 0, sizeof(*cqe)); in __flush_sq()
2401 cqe->status = CQ_REQ_STATUS_WORK_REQUEST_FLUSHED_ERR; in __flush_sq()
2402 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in __flush_sq()
2403 cqe->qp_handle = (u64)(unsigned long)qp; in __flush_sq()
2404 cqe->wr_id = sq->swq[last].wr_id; in __flush_sq()
2405 cqe->src_qp = qp->id; in __flush_sq()
2406 cqe->type = sq->swq[last].type; in __flush_sq()
2407 cqe++; in __flush_sq()
2414 *pcqe = cqe; in __flush_sq()
2425 struct bnxt_qplib_cqe *cqe; in __flush_rq() local
2445 cqe = *pcqe; in __flush_rq()
2450 memset(cqe, 0, sizeof(*cqe)); in __flush_rq()
2451 cqe->status = in __flush_rq()
2453 cqe->opcode = opcode; in __flush_rq()
2454 cqe->qp_handle = (unsigned long)qp; in __flush_rq()
2455 cqe->wr_id = rq->swq[last].wr_id; in __flush_rq()
2456 cqe++; in __flush_rq()
2462 *pcqe = cqe; in __flush_rq()
2483 * CQE is track from sw_cq_cons to max_element but valid only if VALID=1
2507 "FP: Process Req cq_cons=0x%x qp=0x%x sq cons sw=0x%x cqe=0x%x marked!\n", in do_wa9060()
2556 "FP: Got Phantom CQE\n"); in do_wa9060()
2614 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_req() local
2651 * signaled SWQEs due to CQE aggregation from the current sq cons in bnxt_qplib_cq_process_req()
2654 cqe = *pcqe; in bnxt_qplib_cq_process_req()
2661 memset(cqe, 0, sizeof(*cqe)); in bnxt_qplib_cq_process_req()
2662 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in bnxt_qplib_cq_process_req()
2663 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_req()
2664 cqe->src_qp = qp->id; in bnxt_qplib_cq_process_req()
2665 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_req()
2666 if (cqe->wr_id == BNXT_QPLIB_FENCE_WRID) in bnxt_qplib_cq_process_req()
2668 cqe->type = swq->type; in bnxt_qplib_cq_process_req()
2670 /* For the last CQE, check for status. For errors, regardless in bnxt_qplib_cq_process_req()
2676 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_req()
2679 sq->swq_last, cqe->wr_id, cqe->status); in bnxt_qplib_cq_process_req()
2680 cqe++; in bnxt_qplib_cq_process_req()
2695 cqe->status = CQ_REQ_STATUS_OK; in bnxt_qplib_cq_process_req()
2696 cqe++; in bnxt_qplib_cq_process_req()
2708 *pcqe = cqe; in bnxt_qplib_cq_process_req()
2716 * the WC for this CQE in bnxt_qplib_cq_process_req()
2740 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_rc() local
2757 cqe = *pcqe; in bnxt_qplib_cq_process_res_rc()
2758 cqe->opcode = hwcqe->cqe_type_toggle & CQ_BASE_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_rc()
2759 cqe->length = le32_to_cpu(hwcqe->length); in bnxt_qplib_cq_process_res_rc()
2760 cqe->invrkey = le32_to_cpu(hwcqe->imm_data_or_inv_r_key); in bnxt_qplib_cq_process_res_rc()
2761 cqe->mr_handle = le64_to_cpu(hwcqe->mr_handle); in bnxt_qplib_cq_process_res_rc()
2762 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_rc()
2763 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_res_rc()
2764 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_rc()
2768 if (cqe->flags & CQ_RES_RC_FLAGS_SRQ_SRQ) { in bnxt_qplib_cq_process_res_rc()
2778 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_rc()
2780 cqe++; in bnxt_qplib_cq_process_res_rc()
2782 *pcqe = cqe; in bnxt_qplib_cq_process_res_rc()
2796 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_rc()
2797 cqe++; in bnxt_qplib_cq_process_res_rc()
2802 *pcqe = cqe; in bnxt_qplib_cq_process_res_rc()
2820 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_ud() local
2836 cqe = *pcqe; in bnxt_qplib_cq_process_res_ud()
2837 cqe->opcode = hwcqe->cqe_type_toggle & CQ_BASE_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_ud()
2838 cqe->length = le16_to_cpu(hwcqe->length) & CQ_RES_UD_LENGTH_MASK; in bnxt_qplib_cq_process_res_ud()
2839 cqe->cfa_meta = le16_to_cpu(hwcqe->cfa_metadata); in bnxt_qplib_cq_process_res_ud()
2840 cqe->invrkey = le32_to_cpu(hwcqe->imm_data); in bnxt_qplib_cq_process_res_ud()
2841 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_ud()
2842 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_res_ud()
2843 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_ud()
2845 memcpy(cqe->smac, hwcqe->src_mac, ETH_ALEN); in bnxt_qplib_cq_process_res_ud()
2848 cqe->src_qp = le16_to_cpu(hwcqe->src_qp_low) | in bnxt_qplib_cq_process_res_ud()
2853 if (cqe->flags & CQ_RES_RC_FLAGS_SRQ_SRQ) { in bnxt_qplib_cq_process_res_ud()
2864 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_ud()
2866 cqe++; in bnxt_qplib_cq_process_res_ud()
2868 *pcqe = cqe; in bnxt_qplib_cq_process_res_ud()
2883 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_ud()
2884 cqe++; in bnxt_qplib_cq_process_res_ud()
2889 *pcqe = cqe; in bnxt_qplib_cq_process_res_ud()
2907 /* Check for Valid bit. If the CQE is valid, return false */ in bnxt_qplib_is_cq_empty()
2920 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_raweth_qp1() local
2934 cqe = *pcqe; in bnxt_qplib_cq_process_res_raweth_qp1()
2935 cqe->opcode = hwcqe->cqe_type_toggle & CQ_BASE_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_raweth_qp1()
2936 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_raweth_qp1()
2937 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_raweth_qp1()
2942 cqe->src_qp = qp->id; in bnxt_qplib_cq_process_res_raweth_qp1()
2943 if (qp->id == 1 && !cqe->length) { in bnxt_qplib_cq_process_res_raweth_qp1()
2945 cqe->length = 296; in bnxt_qplib_cq_process_res_raweth_qp1()
2947 cqe->length = le16_to_cpu(hwcqe->length); in bnxt_qplib_cq_process_res_raweth_qp1()
2949 cqe->pkey_index = qp->pkey_index; in bnxt_qplib_cq_process_res_raweth_qp1()
2950 memcpy(cqe->smac, qp->smac, 6); in bnxt_qplib_cq_process_res_raweth_qp1()
2952 cqe->raweth_qp1_flags = le16_to_cpu(hwcqe->raweth_qp1_flags); in bnxt_qplib_cq_process_res_raweth_qp1()
2953 cqe->raweth_qp1_flags2 = le32_to_cpu(hwcqe->raweth_qp1_flags2); in bnxt_qplib_cq_process_res_raweth_qp1()
2954 cqe->raweth_qp1_metadata = le32_to_cpu(hwcqe->raweth_qp1_metadata); in bnxt_qplib_cq_process_res_raweth_qp1()
2956 if (cqe->flags & CQ_RES_RAWETH_QP1_FLAGS_SRQ_SRQ) { in bnxt_qplib_cq_process_res_raweth_qp1()
2969 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_raweth_qp1()
2971 cqe++; in bnxt_qplib_cq_process_res_raweth_qp1()
2973 *pcqe = cqe; in bnxt_qplib_cq_process_res_raweth_qp1()
2987 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_raweth_qp1()
2988 cqe++; in bnxt_qplib_cq_process_res_raweth_qp1()
2993 *pcqe = cqe; in bnxt_qplib_cq_process_res_raweth_qp1()
3012 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_terminal() local
3044 /* Terminal CQE can also include aggregated successful CQEs prior. in bnxt_qplib_cq_process_terminal()
3048 cqe = *pcqe; in bnxt_qplib_cq_process_terminal()
3054 memset(cqe, 0, sizeof(*cqe)); in bnxt_qplib_cq_process_terminal()
3055 cqe->status = CQ_REQ_STATUS_OK; in bnxt_qplib_cq_process_terminal()
3056 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in bnxt_qplib_cq_process_terminal()
3057 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_terminal()
3058 cqe->src_qp = qp->id; in bnxt_qplib_cq_process_terminal()
3059 cqe->wr_id = sq->swq[swq_last].wr_id; in bnxt_qplib_cq_process_terminal()
3060 cqe->type = sq->swq[swq_last].type; in bnxt_qplib_cq_process_terminal()
3061 cqe++; in bnxt_qplib_cq_process_terminal()
3068 *pcqe = cqe; in bnxt_qplib_cq_process_terminal()
3096 /* Terminal CQE requires all posted RQEs to complete with FLUSHED_ERR in bnxt_qplib_cq_process_terminal()
3098 * rq->cons the terminal CQE indicates in bnxt_qplib_cq_process_terminal()
3124 struct bnxt_qplib_cqe *cqe, in bnxt_qplib_process_flush_list() argument
3134 __flush_sq(&qp->sq, qp, &cqe, &budget); in bnxt_qplib_process_flush_list()
3139 __flush_rq(&qp->rq, qp, &cqe, &budget); in bnxt_qplib_process_flush_list()
3146 int bnxt_qplib_poll_cq(struct bnxt_qplib_cq *cq, struct bnxt_qplib_cqe *cqe, in bnxt_qplib_poll_cq() argument
3168 /* From the device's respective CQE format to qplib_wc*/ in bnxt_qplib_poll_cq()
3174 &cqe, &budget, in bnxt_qplib_poll_cq()
3180 hw_cqe, &cqe, in bnxt_qplib_poll_cq()
3185 (cq, (struct cq_res_ud *)hw_cqe, &cqe, in bnxt_qplib_poll_cq()
3191 hw_cqe, &cqe, &budget); in bnxt_qplib_poll_cq()
3196 &cqe, &budget); in bnxt_qplib_poll_cq()
3214 /* Error while processing the CQE, just skip to the in bnxt_qplib_poll_cq()