Lines Matching refs:cqe

970 	int entries = attr->cqe;  in ocrdma_create_cq()
1024 ibcq->cqe = new_cnt; in ocrdma_resize_cq()
1035 struct ocrdma_cqe *cqe = NULL; in ocrdma_flush_cq() local
1037 cqe = cq->va; in ocrdma_flush_cq()
1045 if (is_cqe_valid(cq, cqe)) in ocrdma_flush_cq()
1047 cqe++; in ocrdma_flush_cq()
1594 struct ocrdma_cqe *cqe; in ocrdma_discard_cqes() local
1613 cqe = cq->va + cur_getp; in ocrdma_discard_cqes()
1618 qpn = cqe->cmn.qpn & OCRDMA_CQE_QPN_MASK; in ocrdma_discard_cqes()
1624 if (is_cqe_for_sq(cqe)) { in ocrdma_discard_cqes()
1628 wqe_idx = (le32_to_cpu(cqe->rq.buftag_qpn) >> in ocrdma_discard_cqes()
1644 cqe->cmn.qpn = 0; in ocrdma_discard_cqes()
2439 struct ocrdma_cqe *cqe) in ocrdma_set_cqe_status_flushed() argument
2441 if (is_cqe_for_sq(cqe)) { in ocrdma_set_cqe_status_flushed()
2442 cqe->flags_status_srcqpn = cpu_to_le32(le32_to_cpu( in ocrdma_set_cqe_status_flushed()
2443 cqe->flags_status_srcqpn) & in ocrdma_set_cqe_status_flushed()
2445 cqe->flags_status_srcqpn = cpu_to_le32(le32_to_cpu( in ocrdma_set_cqe_status_flushed()
2446 cqe->flags_status_srcqpn) | in ocrdma_set_cqe_status_flushed()
2451 cqe->flags_status_srcqpn = cpu_to_le32(le32_to_cpu( in ocrdma_set_cqe_status_flushed()
2452 cqe->flags_status_srcqpn) & in ocrdma_set_cqe_status_flushed()
2454 cqe->flags_status_srcqpn = cpu_to_le32(le32_to_cpu( in ocrdma_set_cqe_status_flushed()
2455 cqe->flags_status_srcqpn) | in ocrdma_set_cqe_status_flushed()
2459 cqe->flags_status_srcqpn = cpu_to_le32(le32_to_cpu( in ocrdma_set_cqe_status_flushed()
2460 cqe->flags_status_srcqpn) & in ocrdma_set_cqe_status_flushed()
2462 cqe->flags_status_srcqpn = cpu_to_le32(le32_to_cpu( in ocrdma_set_cqe_status_flushed()
2463 cqe->flags_status_srcqpn) | in ocrdma_set_cqe_status_flushed()
2470 static bool ocrdma_update_err_cqe(struct ib_wc *ibwc, struct ocrdma_cqe *cqe, in ocrdma_update_err_cqe() argument
2487 ocrdma_set_cqe_status_flushed(qp, cqe); in ocrdma_update_err_cqe()
2492 static int ocrdma_update_err_rcqe(struct ib_wc *ibwc, struct ocrdma_cqe *cqe, in ocrdma_update_err_rcqe() argument
2499 return ocrdma_update_err_cqe(ibwc, cqe, qp, status); in ocrdma_update_err_rcqe()
2502 static int ocrdma_update_err_scqe(struct ib_wc *ibwc, struct ocrdma_cqe *cqe, in ocrdma_update_err_scqe() argument
2508 return ocrdma_update_err_cqe(ibwc, cqe, qp, status); in ocrdma_update_err_scqe()
2513 struct ocrdma_cqe *cqe, struct ib_wc *ibwc, in ocrdma_poll_err_scqe() argument
2518 int status = (le32_to_cpu(cqe->flags_status_srcqpn) & in ocrdma_poll_err_scqe()
2533 expand = ocrdma_update_err_rcqe(ibwc, cqe, qp, status); in ocrdma_poll_err_scqe()
2551 expand = ocrdma_update_err_scqe(ibwc, cqe, qp, status); in ocrdma_poll_err_scqe()
2557 struct ocrdma_cqe *cqe, in ocrdma_poll_success_scqe() argument
2573 wqe_idx = (le32_to_cpu(cqe->wq.wqeidx) & in ocrdma_poll_success_scqe()
2582 static bool ocrdma_poll_scqe(struct ocrdma_qp *qp, struct ocrdma_cqe *cqe, in ocrdma_poll_scqe() argument
2588 status = (le32_to_cpu(cqe->flags_status_srcqpn) & in ocrdma_poll_scqe()
2592 expand = ocrdma_poll_success_scqe(qp, cqe, ibwc, polled); in ocrdma_poll_scqe()
2594 expand = ocrdma_poll_err_scqe(qp, cqe, ibwc, polled, stop); in ocrdma_poll_scqe()
2599 struct ocrdma_cqe *cqe) in ocrdma_update_ud_rcqe() argument
2604 status = (le32_to_cpu(cqe->flags_status_srcqpn) & in ocrdma_update_ud_rcqe()
2606 ibwc->src_qp = le32_to_cpu(cqe->flags_status_srcqpn) & in ocrdma_update_ud_rcqe()
2610 ibwc->byte_len = (le32_to_cpu(cqe->ud.rxlen_pkey) >> in ocrdma_update_ud_rcqe()
2615 hdr_type = (le32_to_cpu(cqe->ud.rxlen_pkey) >> in ocrdma_update_ud_rcqe()
2626 struct ocrdma_cqe *cqe, in ocrdma_update_free_srq_cqe() argument
2634 wqe_idx = (le32_to_cpu(cqe->rq.buftag_qpn) >> in ocrdma_update_free_srq_cqe()
2645 static bool ocrdma_poll_err_rcqe(struct ocrdma_qp *qp, struct ocrdma_cqe *cqe, in ocrdma_poll_err_rcqe() argument
2662 expand = ocrdma_update_err_scqe(ibwc, cqe, qp, status); in ocrdma_poll_err_rcqe()
2675 expand = ocrdma_update_err_rcqe(ibwc, cqe, qp, status); in ocrdma_poll_err_rcqe()
2681 struct ocrdma_cqe *cqe, struct ib_wc *ibwc) in ocrdma_poll_success_rcqe() argument
2691 ocrdma_update_ud_rcqe(dev, ibwc, cqe); in ocrdma_poll_success_rcqe()
2693 ibwc->byte_len = le32_to_cpu(cqe->rq.rxlen); in ocrdma_poll_success_rcqe()
2695 if (is_cqe_imm(cqe)) { in ocrdma_poll_success_rcqe()
2696 ibwc->ex.imm_data = htonl(le32_to_cpu(cqe->rq.lkey_immdt)); in ocrdma_poll_success_rcqe()
2698 } else if (is_cqe_wr_imm(cqe)) { in ocrdma_poll_success_rcqe()
2700 ibwc->ex.imm_data = htonl(le32_to_cpu(cqe->rq.lkey_immdt)); in ocrdma_poll_success_rcqe()
2702 } else if (is_cqe_invalidated(cqe)) { in ocrdma_poll_success_rcqe()
2703 ibwc->ex.invalidate_rkey = le32_to_cpu(cqe->rq.lkey_immdt); in ocrdma_poll_success_rcqe()
2707 ocrdma_update_free_srq_cqe(ibwc, cqe, qp); in ocrdma_poll_success_rcqe()
2714 static bool ocrdma_poll_rcqe(struct ocrdma_qp *qp, struct ocrdma_cqe *cqe, in ocrdma_poll_rcqe() argument
2722 status = (le32_to_cpu(cqe->flags_status_srcqpn) & in ocrdma_poll_rcqe()
2726 status = (le32_to_cpu(cqe->flags_status_srcqpn) & in ocrdma_poll_rcqe()
2732 ocrdma_poll_success_rcqe(qp, cqe, ibwc); in ocrdma_poll_rcqe()
2734 expand = ocrdma_poll_err_rcqe(qp, cqe, ibwc, polled, stop, in ocrdma_poll_rcqe()
2740 static void ocrdma_change_cq_phase(struct ocrdma_cq *cq, struct ocrdma_cqe *cqe, in ocrdma_change_cq_phase() argument
2748 cqe->flags_status_srcqpn = 0; in ocrdma_change_cq_phase()
2761 struct ocrdma_cqe *cqe; in ocrdma_poll_hwcq() local
2766 cqe = cq->va + cur_getp; in ocrdma_poll_hwcq()
2768 if (!is_cqe_valid(cq, cqe)) in ocrdma_poll_hwcq()
2770 qpn = (le32_to_cpu(cqe->cmn.qpn) & OCRDMA_CQE_QPN_MASK); in ocrdma_poll_hwcq()
2777 if (is_cqe_for_sq(cqe)) { in ocrdma_poll_hwcq()
2778 expand = ocrdma_poll_scqe(qp, cqe, ibwc, &polled, in ocrdma_poll_hwcq()
2781 expand = ocrdma_poll_rcqe(qp, cqe, ibwc, &polled, in ocrdma_poll_hwcq()
2789 cqe->cmn.qpn = 0; in ocrdma_poll_hwcq()
2793 ocrdma_change_cq_phase(cq, cqe, cur_getp); in ocrdma_poll_hwcq()