Lines Matching full:cqe
1501 struct cq_req *cqe = (struct cq_req *)hw_cqe; in __clean_cq() local
1503 if (qp == le64_to_cpu(cqe->qp_handle)) in __clean_cq()
1504 cqe->qp_handle = 0; in __clean_cq()
1511 struct cq_res_rc *cqe = (struct cq_res_rc *)hw_cqe; in __clean_cq() local
1513 if (qp == le64_to_cpu(cqe->qp_handle)) in __clean_cq()
1514 cqe->qp_handle = 0; in __clean_cq()
2296 struct bnxt_qplib_cqe *cqe; in __flush_sq() local
2302 cqe = *pcqe; in __flush_sq()
2312 memset(cqe, 0, sizeof(*cqe)); in __flush_sq()
2313 cqe->status = CQ_REQ_STATUS_WORK_REQUEST_FLUSHED_ERR; in __flush_sq()
2314 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in __flush_sq()
2315 cqe->qp_handle = (u64)(unsigned long)qp; in __flush_sq()
2316 cqe->wr_id = sq->swq[last].wr_id; in __flush_sq()
2317 cqe->src_qp = qp->id; in __flush_sq()
2318 cqe->type = sq->swq[last].type; in __flush_sq()
2319 cqe++; in __flush_sq()
2326 *pcqe = cqe; in __flush_sq()
2337 struct bnxt_qplib_cqe *cqe; in __flush_rq() local
2357 cqe = *pcqe; in __flush_rq()
2362 memset(cqe, 0, sizeof(*cqe)); in __flush_rq()
2363 cqe->status = in __flush_rq()
2365 cqe->opcode = opcode; in __flush_rq()
2366 cqe->qp_handle = (unsigned long)qp; in __flush_rq()
2367 cqe->wr_id = rq->swq[last].wr_id; in __flush_rq()
2368 cqe++; in __flush_rq()
2374 *pcqe = cqe; in __flush_rq()
2395 * CQE is track from sw_cq_cons to max_element but valid only if VALID=1
2419 "FP: Process Req cq_cons=0x%x qp=0x%x sq cons sw=0x%x cqe=0x%x marked!\n", in do_wa9060()
2468 "FP: Got Phantom CQE\n"); in do_wa9060()
2526 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_req() local
2563 * signaled SWQEs due to CQE aggregation from the current sq cons in bnxt_qplib_cq_process_req()
2566 cqe = *pcqe; in bnxt_qplib_cq_process_req()
2573 memset(cqe, 0, sizeof(*cqe)); in bnxt_qplib_cq_process_req()
2574 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in bnxt_qplib_cq_process_req()
2575 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_req()
2576 cqe->src_qp = qp->id; in bnxt_qplib_cq_process_req()
2577 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_req()
2578 if (cqe->wr_id == BNXT_QPLIB_FENCE_WRID) in bnxt_qplib_cq_process_req()
2580 cqe->type = swq->type; in bnxt_qplib_cq_process_req()
2582 /* For the last CQE, check for status. For errors, regardless in bnxt_qplib_cq_process_req()
2588 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_req()
2591 sq->swq_last, cqe->wr_id, cqe->status); in bnxt_qplib_cq_process_req()
2592 cqe++; in bnxt_qplib_cq_process_req()
2605 cqe->status = CQ_REQ_STATUS_OK; in bnxt_qplib_cq_process_req()
2606 cqe++; in bnxt_qplib_cq_process_req()
2618 *pcqe = cqe; in bnxt_qplib_cq_process_req()
2626 * the WC for this CQE in bnxt_qplib_cq_process_req()
2650 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_rc() local
2667 cqe = *pcqe; in bnxt_qplib_cq_process_res_rc()
2668 cqe->opcode = hwcqe->cqe_type_toggle & CQ_BASE_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_rc()
2669 cqe->length = le32_to_cpu(hwcqe->length); in bnxt_qplib_cq_process_res_rc()
2670 cqe->invrkey = le32_to_cpu(hwcqe->imm_data_or_inv_r_key); in bnxt_qplib_cq_process_res_rc()
2671 cqe->mr_handle = le64_to_cpu(hwcqe->mr_handle); in bnxt_qplib_cq_process_res_rc()
2672 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_rc()
2673 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_res_rc()
2674 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_rc()
2678 if (cqe->flags & CQ_RES_RC_FLAGS_SRQ_SRQ) { in bnxt_qplib_cq_process_res_rc()
2688 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_rc()
2690 cqe++; in bnxt_qplib_cq_process_res_rc()
2692 *pcqe = cqe; in bnxt_qplib_cq_process_res_rc()
2706 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_rc()
2707 cqe++; in bnxt_qplib_cq_process_res_rc()
2712 *pcqe = cqe; in bnxt_qplib_cq_process_res_rc()
2730 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_ud() local
2746 cqe = *pcqe; in bnxt_qplib_cq_process_res_ud()
2747 cqe->opcode = hwcqe->cqe_type_toggle & CQ_BASE_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_ud()
2748 cqe->length = le16_to_cpu(hwcqe->length) & CQ_RES_UD_LENGTH_MASK; in bnxt_qplib_cq_process_res_ud()
2749 cqe->cfa_meta = le16_to_cpu(hwcqe->cfa_metadata); in bnxt_qplib_cq_process_res_ud()
2750 cqe->invrkey = le32_to_cpu(hwcqe->imm_data); in bnxt_qplib_cq_process_res_ud()
2751 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_ud()
2752 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_res_ud()
2753 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_ud()
2755 memcpy(cqe->smac, hwcqe->src_mac, ETH_ALEN); in bnxt_qplib_cq_process_res_ud()
2758 cqe->src_qp = le16_to_cpu(hwcqe->src_qp_low) | in bnxt_qplib_cq_process_res_ud()
2763 if (cqe->flags & CQ_RES_RC_FLAGS_SRQ_SRQ) { in bnxt_qplib_cq_process_res_ud()
2774 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_ud()
2776 cqe++; in bnxt_qplib_cq_process_res_ud()
2778 *pcqe = cqe; in bnxt_qplib_cq_process_res_ud()
2793 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_ud()
2794 cqe++; in bnxt_qplib_cq_process_res_ud()
2799 *pcqe = cqe; in bnxt_qplib_cq_process_res_ud()
2817 /* Check for Valid bit. If the CQE is valid, return false */ in bnxt_qplib_is_cq_empty()
2830 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_raweth_qp1() local
2844 cqe = *pcqe; in bnxt_qplib_cq_process_res_raweth_qp1()
2845 cqe->opcode = hwcqe->cqe_type_toggle & CQ_BASE_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_raweth_qp1()
2846 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_raweth_qp1()
2847 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_raweth_qp1()
2852 cqe->src_qp = qp->id; in bnxt_qplib_cq_process_res_raweth_qp1()
2853 if (qp->id == 1 && !cqe->length) { in bnxt_qplib_cq_process_res_raweth_qp1()
2855 cqe->length = 296; in bnxt_qplib_cq_process_res_raweth_qp1()
2857 cqe->length = le16_to_cpu(hwcqe->length); in bnxt_qplib_cq_process_res_raweth_qp1()
2859 cqe->pkey_index = qp->pkey_index; in bnxt_qplib_cq_process_res_raweth_qp1()
2860 memcpy(cqe->smac, qp->smac, 6); in bnxt_qplib_cq_process_res_raweth_qp1()
2862 cqe->raweth_qp1_flags = le16_to_cpu(hwcqe->raweth_qp1_flags); in bnxt_qplib_cq_process_res_raweth_qp1()
2863 cqe->raweth_qp1_flags2 = le32_to_cpu(hwcqe->raweth_qp1_flags2); in bnxt_qplib_cq_process_res_raweth_qp1()
2864 cqe->raweth_qp1_metadata = le32_to_cpu(hwcqe->raweth_qp1_metadata); in bnxt_qplib_cq_process_res_raweth_qp1()
2866 if (cqe->flags & CQ_RES_RAWETH_QP1_FLAGS_SRQ_SRQ) { in bnxt_qplib_cq_process_res_raweth_qp1()
2879 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_raweth_qp1()
2881 cqe++; in bnxt_qplib_cq_process_res_raweth_qp1()
2883 *pcqe = cqe; in bnxt_qplib_cq_process_res_raweth_qp1()
2897 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_raweth_qp1()
2898 cqe++; in bnxt_qplib_cq_process_res_raweth_qp1()
2903 *pcqe = cqe; in bnxt_qplib_cq_process_res_raweth_qp1()
2922 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_terminal() local
2954 /* Terminal CQE can also include aggregated successful CQEs prior. in bnxt_qplib_cq_process_terminal()
2958 cqe = *pcqe; in bnxt_qplib_cq_process_terminal()
2964 memset(cqe, 0, sizeof(*cqe)); in bnxt_qplib_cq_process_terminal()
2965 cqe->status = CQ_REQ_STATUS_OK; in bnxt_qplib_cq_process_terminal()
2966 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in bnxt_qplib_cq_process_terminal()
2967 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_terminal()
2968 cqe->src_qp = qp->id; in bnxt_qplib_cq_process_terminal()
2969 cqe->wr_id = sq->swq[swq_last].wr_id; in bnxt_qplib_cq_process_terminal()
2970 cqe->type = sq->swq[swq_last].type; in bnxt_qplib_cq_process_terminal()
2971 cqe++; in bnxt_qplib_cq_process_terminal()
2978 *pcqe = cqe; in bnxt_qplib_cq_process_terminal()
3006 /* Terminal CQE requires all posted RQEs to complete with FLUSHED_ERR in bnxt_qplib_cq_process_terminal()
3008 * rq->cons the terminal CQE indicates in bnxt_qplib_cq_process_terminal()
3034 struct bnxt_qplib_cqe *cqe, in bnxt_qplib_process_flush_list() argument
3044 __flush_sq(&qp->sq, qp, &cqe, &budget); in bnxt_qplib_process_flush_list()
3049 __flush_rq(&qp->rq, qp, &cqe, &budget); in bnxt_qplib_process_flush_list()
3056 int bnxt_qplib_poll_cq(struct bnxt_qplib_cq *cq, struct bnxt_qplib_cqe *cqe, in bnxt_qplib_poll_cq() argument
3078 /* From the device's respective CQE format to qplib_wc*/ in bnxt_qplib_poll_cq()
3084 &cqe, &budget, in bnxt_qplib_poll_cq()
3090 hw_cqe, &cqe, in bnxt_qplib_poll_cq()
3095 (cq, (struct cq_res_ud *)hw_cqe, &cqe, in bnxt_qplib_poll_cq()
3101 hw_cqe, &cqe, &budget); in bnxt_qplib_poll_cq()
3106 &cqe, &budget); in bnxt_qplib_poll_cq()
3124 /* Error while processing the CQE, just skip to the in bnxt_qplib_poll_cq()