Lines Matching full:cqe

1434 			struct cq_req *cqe = (struct cq_req *)hw_cqe;  in __clean_cq()  local
1436 if (qp == le64_to_cpu(cqe->qp_handle)) in __clean_cq()
1437 cqe->qp_handle = 0; in __clean_cq()
1444 struct cq_res_rc *cqe = (struct cq_res_rc *)hw_cqe; in __clean_cq() local
1446 if (qp == le64_to_cpu(cqe->qp_handle)) in __clean_cq()
1447 cqe->qp_handle = 0; in __clean_cq()
2125 struct bnxt_qplib_cqe *cqe; in __flush_sq() local
2131 cqe = *pcqe; in __flush_sq()
2141 memset(cqe, 0, sizeof(*cqe)); in __flush_sq()
2142 cqe->status = CQ_REQ_STATUS_WORK_REQUEST_FLUSHED_ERR; in __flush_sq()
2143 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in __flush_sq()
2144 cqe->qp_handle = (u64)(unsigned long)qp; in __flush_sq()
2145 cqe->wr_id = sq->swq[last].wr_id; in __flush_sq()
2146 cqe->src_qp = qp->id; in __flush_sq()
2147 cqe->type = sq->swq[last].type; in __flush_sq()
2148 cqe++; in __flush_sq()
2154 *pcqe = cqe; in __flush_sq()
2165 struct bnxt_qplib_cqe *cqe; in __flush_rq() local
2185 cqe = *pcqe; in __flush_rq()
2190 memset(cqe, 0, sizeof(*cqe)); in __flush_rq()
2191 cqe->status = in __flush_rq()
2193 cqe->opcode = opcode; in __flush_rq()
2194 cqe->qp_handle = (unsigned long)qp; in __flush_rq()
2195 cqe->wr_id = rq->swq[last].wr_id; in __flush_rq()
2196 cqe++; in __flush_rq()
2201 *pcqe = cqe; in __flush_rq()
2222 * CQE is track from sw_cq_cons to max_element but valid only if VALID=1
2246 "FP: Process Req cq_cons=0x%x qp=0x%x sq cons sw=0x%x cqe=0x%x marked!\n", in do_wa9060()
2297 "FP: Got Phantom CQE\n"); in do_wa9060()
2328 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_req() local
2350 * signaled SWQEs due to CQE aggregation from the current sq cons in bnxt_qplib_cq_process_req()
2353 cqe = *pcqe; in bnxt_qplib_cq_process_req()
2360 memset(cqe, 0, sizeof(*cqe)); in bnxt_qplib_cq_process_req()
2361 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in bnxt_qplib_cq_process_req()
2362 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_req()
2363 cqe->src_qp = qp->id; in bnxt_qplib_cq_process_req()
2364 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_req()
2365 if (cqe->wr_id == BNXT_QPLIB_FENCE_WRID) in bnxt_qplib_cq_process_req()
2367 cqe->type = swq->type; in bnxt_qplib_cq_process_req()
2369 /* For the last CQE, check for status. For errors, regardless in bnxt_qplib_cq_process_req()
2375 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_req()
2378 sq->swq_last, cqe->wr_id, cqe->status); in bnxt_qplib_cq_process_req()
2379 cqe++; in bnxt_qplib_cq_process_req()
2392 cqe->status = CQ_REQ_STATUS_OK; in bnxt_qplib_cq_process_req()
2393 cqe++; in bnxt_qplib_cq_process_req()
2404 *pcqe = cqe; in bnxt_qplib_cq_process_req()
2412 * the WC for this CQE in bnxt_qplib_cq_process_req()
2435 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_rc() local
2453 cqe = *pcqe; in bnxt_qplib_cq_process_res_rc()
2454 cqe->opcode = hwcqe->cqe_type_toggle & CQ_BASE_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_rc()
2455 cqe->length = le32_to_cpu(hwcqe->length); in bnxt_qplib_cq_process_res_rc()
2456 cqe->invrkey = le32_to_cpu(hwcqe->imm_data_or_inv_r_key); in bnxt_qplib_cq_process_res_rc()
2457 cqe->mr_handle = le64_to_cpu(hwcqe->mr_handle); in bnxt_qplib_cq_process_res_rc()
2458 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_rc()
2459 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_res_rc()
2460 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_rc()
2464 if (cqe->flags & CQ_RES_RC_FLAGS_SRQ_SRQ) { in bnxt_qplib_cq_process_res_rc()
2474 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_rc()
2476 cqe++; in bnxt_qplib_cq_process_res_rc()
2478 *pcqe = cqe; in bnxt_qplib_cq_process_res_rc()
2492 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_rc()
2493 cqe++; in bnxt_qplib_cq_process_res_rc()
2497 *pcqe = cqe; in bnxt_qplib_cq_process_res_rc()
2516 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_ud() local
2533 cqe = *pcqe; in bnxt_qplib_cq_process_res_ud()
2534 cqe->opcode = hwcqe->cqe_type_toggle & CQ_BASE_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_ud()
2535 cqe->length = le16_to_cpu(hwcqe->length) & CQ_RES_UD_LENGTH_MASK; in bnxt_qplib_cq_process_res_ud()
2536 cqe->cfa_meta = le16_to_cpu(hwcqe->cfa_metadata); in bnxt_qplib_cq_process_res_ud()
2537 cqe->invrkey = le32_to_cpu(hwcqe->imm_data); in bnxt_qplib_cq_process_res_ud()
2538 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_ud()
2539 cqe->status = hwcqe->status; in bnxt_qplib_cq_process_res_ud()
2540 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_ud()
2542 memcpy(cqe->smac, hwcqe->src_mac, ETH_ALEN); in bnxt_qplib_cq_process_res_ud()
2545 cqe->src_qp = le16_to_cpu(hwcqe->src_qp_low) | in bnxt_qplib_cq_process_res_ud()
2550 if (cqe->flags & CQ_RES_RC_FLAGS_SRQ_SRQ) { in bnxt_qplib_cq_process_res_ud()
2561 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_ud()
2563 cqe++; in bnxt_qplib_cq_process_res_ud()
2565 *pcqe = cqe; in bnxt_qplib_cq_process_res_ud()
2580 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_ud()
2581 cqe++; in bnxt_qplib_cq_process_res_ud()
2585 *pcqe = cqe; in bnxt_qplib_cq_process_res_ud()
2606 /* Check for Valid bit. If the CQE is valid, return false */ in bnxt_qplib_is_cq_empty()
2619 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_res_raweth_qp1() local
2634 cqe = *pcqe; in bnxt_qplib_cq_process_res_raweth_qp1()
2635 cqe->opcode = hwcqe->cqe_type_toggle & CQ_BASE_CQE_TYPE_MASK; in bnxt_qplib_cq_process_res_raweth_qp1()
2636 cqe->flags = le16_to_cpu(hwcqe->flags); in bnxt_qplib_cq_process_res_raweth_qp1()
2637 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_res_raweth_qp1()
2642 cqe->src_qp = qp->id; in bnxt_qplib_cq_process_res_raweth_qp1()
2643 if (qp->id == 1 && !cqe->length) { in bnxt_qplib_cq_process_res_raweth_qp1()
2645 cqe->length = 296; in bnxt_qplib_cq_process_res_raweth_qp1()
2647 cqe->length = le16_to_cpu(hwcqe->length); in bnxt_qplib_cq_process_res_raweth_qp1()
2649 cqe->pkey_index = qp->pkey_index; in bnxt_qplib_cq_process_res_raweth_qp1()
2650 memcpy(cqe->smac, qp->smac, 6); in bnxt_qplib_cq_process_res_raweth_qp1()
2652 cqe->raweth_qp1_flags = le16_to_cpu(hwcqe->raweth_qp1_flags); in bnxt_qplib_cq_process_res_raweth_qp1()
2653 cqe->raweth_qp1_flags2 = le32_to_cpu(hwcqe->raweth_qp1_flags2); in bnxt_qplib_cq_process_res_raweth_qp1()
2654 cqe->raweth_qp1_metadata = le32_to_cpu(hwcqe->raweth_qp1_metadata); in bnxt_qplib_cq_process_res_raweth_qp1()
2656 if (cqe->flags & CQ_RES_RAWETH_QP1_FLAGS_SRQ_SRQ) { in bnxt_qplib_cq_process_res_raweth_qp1()
2669 cqe->wr_id = srq->swq[wr_id_idx].wr_id; in bnxt_qplib_cq_process_res_raweth_qp1()
2671 cqe++; in bnxt_qplib_cq_process_res_raweth_qp1()
2673 *pcqe = cqe; in bnxt_qplib_cq_process_res_raweth_qp1()
2687 cqe->wr_id = swq->wr_id; in bnxt_qplib_cq_process_res_raweth_qp1()
2688 cqe++; in bnxt_qplib_cq_process_res_raweth_qp1()
2692 *pcqe = cqe; in bnxt_qplib_cq_process_res_raweth_qp1()
2712 struct bnxt_qplib_cqe *cqe; in bnxt_qplib_cq_process_terminal() local
2747 /* Terminal CQE can also include aggregated successful CQEs prior. in bnxt_qplib_cq_process_terminal()
2751 cqe = *pcqe; in bnxt_qplib_cq_process_terminal()
2757 memset(cqe, 0, sizeof(*cqe)); in bnxt_qplib_cq_process_terminal()
2758 cqe->status = CQ_REQ_STATUS_OK; in bnxt_qplib_cq_process_terminal()
2759 cqe->opcode = CQ_BASE_CQE_TYPE_REQ; in bnxt_qplib_cq_process_terminal()
2760 cqe->qp_handle = (u64)(unsigned long)qp; in bnxt_qplib_cq_process_terminal()
2761 cqe->src_qp = qp->id; in bnxt_qplib_cq_process_terminal()
2762 cqe->wr_id = sq->swq[swq_last].wr_id; in bnxt_qplib_cq_process_terminal()
2763 cqe->type = sq->swq[swq_last].type; in bnxt_qplib_cq_process_terminal()
2764 cqe++; in bnxt_qplib_cq_process_terminal()
2770 *pcqe = cqe; in bnxt_qplib_cq_process_terminal()
2797 /* Terminal CQE requires all posted RQEs to complete with FLUSHED_ERR in bnxt_qplib_cq_process_terminal()
2799 * rq->cons the terminal CQE indicates in bnxt_qplib_cq_process_terminal()
2825 struct bnxt_qplib_cqe *cqe, in bnxt_qplib_process_flush_list() argument
2835 __flush_sq(&qp->sq, qp, &cqe, &budget); in bnxt_qplib_process_flush_list()
2840 __flush_rq(&qp->rq, qp, &cqe, &budget); in bnxt_qplib_process_flush_list()
2847 int bnxt_qplib_poll_cq(struct bnxt_qplib_cq *cq, struct bnxt_qplib_cqe *cqe, in bnxt_qplib_poll_cq() argument
2870 /* From the device's respective CQE format to qplib_wc*/ in bnxt_qplib_poll_cq()
2875 &cqe, &budget, in bnxt_qplib_poll_cq()
2881 hw_cqe, &cqe, in bnxt_qplib_poll_cq()
2886 (cq, (struct cq_res_ud *)hw_cqe, &cqe, in bnxt_qplib_poll_cq()
2892 hw_cqe, &cqe, &budget); in bnxt_qplib_poll_cq()
2897 &cqe, &budget); in bnxt_qplib_poll_cq()
2915 /* Error while processing the CQE, just skip to the in bnxt_qplib_poll_cq()