Lines Matching full:cqe

1484 			struct cq_req *cqe = (struct cq_req *)hw_cqe;  in __clean_cq()  local
1486 if (qp == le64_to_cpu(cqe->qp_handle)) in __clean_cq()
1487 cqe->qp_handle = 0; in __clean_cq()
1494 struct cq_res_rc *cqe = (struct cq_res_rc *)hw_cqe; in __clean_cq() local
1496 if (qp == le64_to_cpu(cqe->qp_handle)) in __clean_cq()
1497 cqe->qp_handle = 0; in __clean_cq()
2275 struct bnxt_qplib_cqe *cqe; in __flush_sq() local
2281 cqe = *pcqe; in __flush_sq()
2291 memset(cqe, 0, sizeof(*cqe)); in __flush_sq()
2292 cqe->status = CQ_REQ_STATUS_WORK_REQUEST_FLUSHED_ERR; in __flush_sq()
2293 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in __flush_sq()
2294 cqe->qp_handle = (u64)(unsigned long)qp; in __flush_sq()
2295 cqe->wr_id = sq->swq[last].wr_id; in __flush_sq()
2296 cqe->src_qp = qp->id; in __flush_sq()
2297 cqe->type = sq->swq[last].type; in __flush_sq()
2298 cqe++; in __flush_sq()
2305 *pcqe = cqe; in __flush_sq()
2316 struct bnxt_qplib_cqe *cqe; in __flush_rq() local
2336 cqe = *pcqe; in __flush_rq()
2341 memset(cqe, 0, sizeof(*cqe)); in __flush_rq()
2342 cqe->status = in __flush_rq()
2344 cqe->opcode = opcode; in __flush_rq()
2345 cqe->qp_handle = (unsigned long)qp; in __flush_rq()
2346 cqe->wr_id = rq->swq[last].wr_id; in __flush_rq()
2347 cqe++; in __flush_rq()
2353 *pcqe = cqe; in __flush_rq()
2374 * CQE is track from sw_cq_cons to max_element but valid only if VALID=1
2398 "FP: Process Req cq_cons=0x%x qp=0x%x sq cons sw=0x%x cqe=0x%x marked!\n", in do_wa9060()
2447 "FP: Got Phantom CQE\n"); in do_wa9060()
2479 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_req() local
2501 * signaled SWQEs due to CQE aggregation from the current sq cons in bnxt_qplib_cq_process_req()
2504 cqe = *pcqe; in bnxt_qplib_cq_process_req()
2511 memset(cqe, 0, sizeof(*cqe)); in bnxt_qplib_cq_process_req()
2512 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in bnxt_qplib_cq_process_req()
2513 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_req()
2514 cqe->src_qp = qp->id; in bnxt_qplib_cq_process_req()
2515 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_req()
2516 if (cqe->wr_id == BNXT_QPLIB_FENCE_WRID) in bnxt_qplib_cq_process_req()
2518 cqe->type = swq->type; in bnxt_qplib_cq_process_req()
2520 /* For the last CQE, check for status. For errors, regardless in bnxt_qplib_cq_process_req()
2526 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_req()
2529 sq->swq_last, cqe->wr_id, cqe->status); in bnxt_qplib_cq_process_req()
2530 cqe++; in bnxt_qplib_cq_process_req()
2543 cqe->status = CQ_REQ_STATUS_OK; in bnxt_qplib_cq_process_req()
2544 cqe++; in bnxt_qplib_cq_process_req()
2556 *pcqe = cqe; in bnxt_qplib_cq_process_req()
2564 * the WC for this CQE in bnxt_qplib_cq_process_req()
2588 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_rc() local
2605 cqe = *pcqe; in bnxt_qplib_cq_process_res_rc()
2606 cqe->opcode = hwcqe->cqe_type_toggle & CQ_BASE_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_rc()
2607 cqe->length = le32_to_cpu(hwcqe->length); in bnxt_qplib_cq_process_res_rc()
2608 cqe->invrkey = le32_to_cpu(hwcqe->imm_data_or_inv_r_key); in bnxt_qplib_cq_process_res_rc()
2609 cqe->mr_handle = le64_to_cpu(hwcqe->mr_handle); in bnxt_qplib_cq_process_res_rc()
2610 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_rc()
2611 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_res_rc()
2612 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_rc()
2616 if (cqe->flags & CQ_RES_RC_FLAGS_SRQ_SRQ) { in bnxt_qplib_cq_process_res_rc()
2626 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_rc()
2628 cqe++; in bnxt_qplib_cq_process_res_rc()
2630 *pcqe = cqe; in bnxt_qplib_cq_process_res_rc()
2644 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_rc()
2645 cqe++; in bnxt_qplib_cq_process_res_rc()
2650 *pcqe = cqe; in bnxt_qplib_cq_process_res_rc()
2668 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_ud() local
2684 cqe = *pcqe; in bnxt_qplib_cq_process_res_ud()
2685 cqe->opcode = hwcqe->cqe_type_toggle & CQ_BASE_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_ud()
2686 cqe->length = le16_to_cpu(hwcqe->length) & CQ_RES_UD_LENGTH_MASK; in bnxt_qplib_cq_process_res_ud()
2687 cqe->cfa_meta = le16_to_cpu(hwcqe->cfa_metadata); in bnxt_qplib_cq_process_res_ud()
2688 cqe->invrkey = le32_to_cpu(hwcqe->imm_data); in bnxt_qplib_cq_process_res_ud()
2689 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_ud()
2690 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_res_ud()
2691 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_ud()
2693 memcpy(cqe->smac, hwcqe->src_mac, ETH_ALEN); in bnxt_qplib_cq_process_res_ud()
2696 cqe->src_qp = le16_to_cpu(hwcqe->src_qp_low) | in bnxt_qplib_cq_process_res_ud()
2701 if (cqe->flags & CQ_RES_RC_FLAGS_SRQ_SRQ) { in bnxt_qplib_cq_process_res_ud()
2712 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_ud()
2714 cqe++; in bnxt_qplib_cq_process_res_ud()
2716 *pcqe = cqe; in bnxt_qplib_cq_process_res_ud()
2731 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_ud()
2732 cqe++; in bnxt_qplib_cq_process_res_ud()
2737 *pcqe = cqe; in bnxt_qplib_cq_process_res_ud()
2755 /* Check for Valid bit. If the CQE is valid, return false */ in bnxt_qplib_is_cq_empty()
2768 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_raweth_qp1() local
2782 cqe = *pcqe; in bnxt_qplib_cq_process_res_raweth_qp1()
2783 cqe->opcode = hwcqe->cqe_type_toggle & CQ_BASE_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_raweth_qp1()
2784 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_raweth_qp1()
2785 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_raweth_qp1()
2790 cqe->src_qp = qp->id; in bnxt_qplib_cq_process_res_raweth_qp1()
2791 if (qp->id == 1 && !cqe->length) { in bnxt_qplib_cq_process_res_raweth_qp1()
2793 cqe->length = 296; in bnxt_qplib_cq_process_res_raweth_qp1()
2795 cqe->length = le16_to_cpu(hwcqe->length); in bnxt_qplib_cq_process_res_raweth_qp1()
2797 cqe->pkey_index = qp->pkey_index; in bnxt_qplib_cq_process_res_raweth_qp1()
2798 memcpy(cqe->smac, qp->smac, 6); in bnxt_qplib_cq_process_res_raweth_qp1()
2800 cqe->raweth_qp1_flags = le16_to_cpu(hwcqe->raweth_qp1_flags); in bnxt_qplib_cq_process_res_raweth_qp1()
2801 cqe->raweth_qp1_flags2 = le32_to_cpu(hwcqe->raweth_qp1_flags2); in bnxt_qplib_cq_process_res_raweth_qp1()
2802 cqe->raweth_qp1_metadata = le32_to_cpu(hwcqe->raweth_qp1_metadata); in bnxt_qplib_cq_process_res_raweth_qp1()
2804 if (cqe->flags & CQ_RES_RAWETH_QP1_FLAGS_SRQ_SRQ) { in bnxt_qplib_cq_process_res_raweth_qp1()
2817 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_raweth_qp1()
2819 cqe++; in bnxt_qplib_cq_process_res_raweth_qp1()
2821 *pcqe = cqe; in bnxt_qplib_cq_process_res_raweth_qp1()
2835 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_raweth_qp1()
2836 cqe++; in bnxt_qplib_cq_process_res_raweth_qp1()
2841 *pcqe = cqe; in bnxt_qplib_cq_process_res_raweth_qp1()
2860 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_terminal() local
2892 /* Terminal CQE can also include aggregated successful CQEs prior. in bnxt_qplib_cq_process_terminal()
2896 cqe = *pcqe; in bnxt_qplib_cq_process_terminal()
2902 memset(cqe, 0, sizeof(*cqe)); in bnxt_qplib_cq_process_terminal()
2903 cqe->status = CQ_REQ_STATUS_OK; in bnxt_qplib_cq_process_terminal()
2904 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in bnxt_qplib_cq_process_terminal()
2905 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_terminal()
2906 cqe->src_qp = qp->id; 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()
2909 cqe++; in bnxt_qplib_cq_process_terminal()
2916 *pcqe = cqe; in bnxt_qplib_cq_process_terminal()
2944 /* Terminal CQE requires all posted RQEs to complete with FLUSHED_ERR in bnxt_qplib_cq_process_terminal()
2946 * rq->cons the terminal CQE indicates in bnxt_qplib_cq_process_terminal()
2972 struct bnxt_qplib_cqe *cqe, in bnxt_qplib_process_flush_list() argument
2982 __flush_sq(&qp->sq, qp, &cqe, &budget); in bnxt_qplib_process_flush_list()
2987 __flush_rq(&qp->rq, qp, &cqe, &budget); in bnxt_qplib_process_flush_list()
2994 int bnxt_qplib_poll_cq(struct bnxt_qplib_cq *cq, struct bnxt_qplib_cqe *cqe, in bnxt_qplib_poll_cq() argument
3016 /* From the device's respective CQE format to qplib_wc*/ in bnxt_qplib_poll_cq()
3022 &cqe, &budget, in bnxt_qplib_poll_cq()
3028 hw_cqe, &cqe, in bnxt_qplib_poll_cq()
3033 (cq, (struct cq_res_ud *)hw_cqe, &cqe, in bnxt_qplib_poll_cq()
3039 hw_cqe, &cqe, &budget); in bnxt_qplib_poll_cq()
3044 &cqe, &budget); in bnxt_qplib_poll_cq()
3062 /* Error while processing the CQE, just skip to the in bnxt_qplib_poll_cq()