Lines Matching full:cqe

244  * clean_nq -	Invalidate cqe from given nq.
250 * consumer index. Invalidated cqe(marked from this function) will be
1608 struct cq_req *cqe = (struct cq_req *)hw_cqe; in __clean_cq() local
1610 if (qp == le64_to_cpu(cqe->qp_handle)) in __clean_cq()
1611 cqe->qp_handle = 0; in __clean_cq()
1618 struct cq_res_rc *cqe = (struct cq_res_rc *)hw_cqe; in __clean_cq() local
1620 if (qp == le64_to_cpu(cqe->qp_handle)) in __clean_cq()
1621 cqe->qp_handle = 0; in __clean_cq()
2621 struct bnxt_qplib_cqe *cqe; in __flush_sq() local
2627 cqe = *pcqe; in __flush_sq()
2639 memset(cqe, 0, sizeof(*cqe)); in __flush_sq()
2640 cqe->status = CQ_REQ_STATUS_WORK_REQUEST_FLUSHED_ERR; in __flush_sq()
2641 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in __flush_sq()
2642 cqe->qp_handle = (u64)qp; in __flush_sq()
2643 cqe->wr_id = sq->swq[last].wr_id; in __flush_sq()
2644 cqe->src_qp = qp->id; in __flush_sq()
2645 cqe->type = sq->swq[last].type; in __flush_sq()
2650 last, cqe->wr_id, cqe->status); in __flush_sq()
2651 cqe++; in __flush_sq()
2660 *pcqe = cqe; in __flush_sq()
2672 struct bnxt_qplib_cqe *cqe; in __flush_rq() local
2691 cqe = *pcqe; in __flush_rq()
2696 memset(cqe, 0, sizeof(*cqe)); in __flush_rq()
2697 cqe->status = in __flush_rq()
2699 cqe->opcode = opcode; in __flush_rq()
2700 cqe->qp_handle = (u64)qp; in __flush_rq()
2701 cqe->wr_id = rq->swq[last].wr_id; in __flush_rq()
2705 last, cqe->wr_id, cqe->status); in __flush_rq()
2706 cqe++; in __flush_rq()
2714 *pcqe = cqe; in __flush_rq()
2740 * CQE is track from sw_cq_cons to max_element but valid only if VALID=1
2766 "FP: Process Req cq_cons=0x%x qp=0x%x sq cons sw=0x%x cqe=0x%x marked!\n", in bnxt_re_legacy_do_wa9060()
2809 "FP: Process Req qp=0x%x current sq cons sw=0x%x cqe=0x%x\n", in bnxt_re_legacy_do_wa9060()
2869 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_req() local
2891 * signaled SWQEs due to CQE aggregation from the current sq cons in bnxt_qplib_cq_process_req()
2894 cqe = *pcqe; in bnxt_qplib_cq_process_req()
2901 memset(cqe, 0, sizeof(*cqe)); in bnxt_qplib_cq_process_req()
2902 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in bnxt_qplib_cq_process_req()
2903 cqe->qp_handle = (u64)qp; in bnxt_qplib_cq_process_req()
2904 cqe->src_qp = qp->id; in bnxt_qplib_cq_process_req()
2905 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_req()
2907 if (cqe->wr_id == BNXT_QPLIB_FENCE_WRID) in bnxt_qplib_cq_process_req()
2910 cqe->type = swq->type; in bnxt_qplib_cq_process_req()
2912 /* For the last CQE, check for status. For errors, regardless in bnxt_qplib_cq_process_req()
2918 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_req()
2923 cqe->src_qp, sq->swq_last, cqe->wr_id, cqe->type, cqe->status); in bnxt_qplib_cq_process_req()
2924 cqe++; in bnxt_qplib_cq_process_req()
2943 sq->swq_last, cqe->wr_id); in bnxt_qplib_cq_process_req()
2945 "QPLIB: with status 0x%x\n", cqe->status); in bnxt_qplib_cq_process_req()
2946 cqe->status = CQ_REQ_STATUS_OK; in bnxt_qplib_cq_process_req()
2947 cqe++; in bnxt_qplib_cq_process_req()
2959 *pcqe = cqe; in bnxt_qplib_cq_process_req()
2966 the WC for this CQE */ in bnxt_qplib_cq_process_req()
2989 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_rc() local
3006 cqe = *pcqe; in bnxt_qplib_cq_process_res_rc()
3007 cqe->opcode = hwcqe->cqe_type_toggle & CQ_BASE_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_rc()
3008 cqe->length = le32_to_cpu(hwcqe->length); in bnxt_qplib_cq_process_res_rc()
3009 cqe->invrkey = le32_to_cpu(hwcqe->imm_data_or_inv_r_key); in bnxt_qplib_cq_process_res_rc()
3010 cqe->mr_handle = le64_to_cpu(hwcqe->mr_handle); in bnxt_qplib_cq_process_res_rc()
3011 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_rc()
3012 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_res_rc()
3013 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_rc()
3017 if (cqe->flags & CQ_RES_RC_FLAGS_SRQ_SRQ) { in bnxt_qplib_cq_process_res_rc()
3032 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_rc()
3036 wr_id_idx, cqe->wr_id); in bnxt_qplib_cq_process_res_rc()
3037 cqe++; in bnxt_qplib_cq_process_res_rc()
3039 *pcqe = cqe; 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()
3055 rq->swq_last, cqe->wr_id); in bnxt_qplib_cq_process_res_rc()
3056 cqe++; in bnxt_qplib_cq_process_res_rc()
3062 *pcqe = cqe; in bnxt_qplib_cq_process_res_rc()
3077 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_ud() local
3094 cqe = *pcqe; in bnxt_qplib_cq_process_res_ud()
3095 cqe->opcode = hwcqe->cqe_type_toggle & CQ_RES_UD_V2_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_ud()
3096 cqe->length = le32_to_cpu((hwcqe->length & CQ_RES_UD_V2_LENGTH_MASK)); in bnxt_qplib_cq_process_res_ud()
3097 cqe->cfa_meta = le16_to_cpu(hwcqe->cfa_metadata0); in bnxt_qplib_cq_process_res_ud()
3099 cqe->cfa_meta |= (((le32_to_cpu(hwcqe->src_qp_high_srq_or_rq_wr_id) & in bnxt_qplib_cq_process_res_ud()
3103 cqe->invrkey = le32_to_cpu(hwcqe->imm_data); in bnxt_qplib_cq_process_res_ud()
3104 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_ud()
3105 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_res_ud()
3106 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_ud()
3107 smac = (u16 *)cqe->smac; in bnxt_qplib_cq_process_res_ud()
3113 cqe->src_qp = le16_to_cpu(hwcqe->src_qp_low) | in bnxt_qplib_cq_process_res_ud()
3118 if (cqe->flags & CQ_RES_UD_V2_FLAGS_SRQ) { in bnxt_qplib_cq_process_res_ud()
3133 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_ud()
3137 wr_id_idx, cqe->wr_id); in bnxt_qplib_cq_process_res_ud()
3138 cqe++; in bnxt_qplib_cq_process_res_ud()
3140 *pcqe = cqe; 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()
3157 rq->swq_last, cqe->wr_id); in bnxt_qplib_cq_process_res_ud()
3158 cqe++; in bnxt_qplib_cq_process_res_ud()
3164 *pcqe = cqe; in bnxt_qplib_cq_process_res_ud()
3183 /* Check for Valid bit. If the CQE is valid, return false */ in bnxt_qplib_is_cq_empty()
3197 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_raweth_qp1() local
3212 cqe = *pcqe; in bnxt_qplib_cq_process_res_raweth_qp1()
3213 cqe->opcode = hwcqe->cqe_type_toggle & CQ_BASE_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_raweth_qp1()
3214 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_raweth_qp1()
3215 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_raweth_qp1()
3219 cqe->src_qp = qp->id; in bnxt_qplib_cq_process_res_raweth_qp1()
3220 if (qp->id == 1 && !cqe->length) { in bnxt_qplib_cq_process_res_raweth_qp1()
3222 cqe->length = 296; in bnxt_qplib_cq_process_res_raweth_qp1()
3224 cqe->length = le16_to_cpu(hwcqe->length); in bnxt_qplib_cq_process_res_raweth_qp1()
3226 cqe->pkey_index = qp->pkey_index; in bnxt_qplib_cq_process_res_raweth_qp1()
3227 memcpy(cqe->smac, qp->smac, 6); in bnxt_qplib_cq_process_res_raweth_qp1()
3229 cqe->raweth_qp1_flags = le16_to_cpu(hwcqe->raweth_qp1_flags); in bnxt_qplib_cq_process_res_raweth_qp1()
3230 cqe->raweth_qp1_flags2 = le32_to_cpu(hwcqe->raweth_qp1_flags2); in bnxt_qplib_cq_process_res_raweth_qp1()
3231 cqe->raweth_qp1_metadata = le32_to_cpu(hwcqe->raweth_qp1_metadata); in bnxt_qplib_cq_process_res_raweth_qp1()
3235 cqe->raweth_qp1_flags, cqe->raweth_qp1_flags2); in bnxt_qplib_cq_process_res_raweth_qp1()
3237 if (cqe->flags & CQ_RES_RAWETH_QP1_FLAGS_SRQ_SRQ) { in bnxt_qplib_cq_process_res_raweth_qp1()
3252 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_raweth_qp1()
3257 wr_id_idx, cqe->wr_id, hwcqe->status); in bnxt_qplib_cq_process_res_raweth_qp1()
3258 cqe++; in bnxt_qplib_cq_process_res_raweth_qp1()
3261 *pcqe = cqe; 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()
3279 wr_id_idx, cqe->wr_id, hwcqe->status); in bnxt_qplib_cq_process_res_raweth_qp1()
3280 cqe++; in bnxt_qplib_cq_process_res_raweth_qp1()
3286 *pcqe = cqe; in bnxt_qplib_cq_process_res_raweth_qp1()
3301 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_terminal() local
3319 /* Terminal CQE requires all posted RQEs to complete with FLUSHED_ERR in bnxt_qplib_cq_process_terminal()
3321 * rq->cons the terminal CQE indicates. in bnxt_qplib_cq_process_terminal()
3339 /* Terminal CQE can also include aggregated successful CQEs prior. in bnxt_qplib_cq_process_terminal()
3342 cqe = *pcqe; in bnxt_qplib_cq_process_terminal()
3349 memset(cqe, 0, sizeof(*cqe)); in bnxt_qplib_cq_process_terminal()
3350 cqe->status = CQ_REQ_STATUS_OK; in bnxt_qplib_cq_process_terminal()
3351 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in bnxt_qplib_cq_process_terminal()
3352 cqe->qp_handle = (u64)qp; in bnxt_qplib_cq_process_terminal()
3353 cqe->src_qp = qp->id; 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()
3360 swq_last, cqe->wr_id, cqe->status); in bnxt_qplib_cq_process_terminal()
3361 cqe++; in bnxt_qplib_cq_process_terminal()
3369 *pcqe = cqe; in bnxt_qplib_cq_process_terminal()
3420 struct bnxt_qplib_cqe *cqe, in bnxt_qplib_process_flush_list() argument
3432 __flush_sq(&qp->sq, qp, &cqe, &budget); in bnxt_qplib_process_flush_list()
3439 __flush_rq(&qp->rq, qp, &cqe, &budget); in bnxt_qplib_process_flush_list()
3446 int bnxt_qplib_poll_cq(struct bnxt_qplib_cq *cq, struct bnxt_qplib_cqe *cqe, in bnxt_qplib_poll_cq() argument
3467 /* From the device's respective CQE format to qplib_wc*/ in bnxt_qplib_poll_cq()
3472 (struct cq_req *)hw_cqe, &cqe, &budget, in bnxt_qplib_poll_cq()
3477 (struct cq_res_rc *)hw_cqe, &cqe, in bnxt_qplib_poll_cq()
3483 &cqe, &budget); in bnxt_qplib_poll_cq()
3488 hw_cqe, &cqe, &budget); in bnxt_qplib_poll_cq()
3493 &cqe, &budget); in bnxt_qplib_poll_cq()
3513 /* Error while processing the CQE, just skip to the in bnxt_qplib_poll_cq()