Lines Matching refs:ibwc

2400 static void ocrdma_update_wc(struct ocrdma_qp *qp, struct ib_wc *ibwc,  in ocrdma_update_wc()  argument
2409 ibwc->wr_id = qp->wqe_wr_id_tbl[wqe_idx].wrid; in ocrdma_update_wc()
2414 ibwc->opcode = IB_WC_RDMA_WRITE; in ocrdma_update_wc()
2418 ibwc->opcode = IB_WC_RDMA_READ; in ocrdma_update_wc()
2419 ibwc->byte_len = rw->len; in ocrdma_update_wc()
2422 ibwc->opcode = IB_WC_SEND; in ocrdma_update_wc()
2425 ibwc->opcode = IB_WC_REG_MR; in ocrdma_update_wc()
2428 ibwc->opcode = IB_WC_LOCAL_INV; in ocrdma_update_wc()
2431 ibwc->status = IB_WC_GENERAL_ERR; in ocrdma_update_wc()
2470 static bool ocrdma_update_err_cqe(struct ib_wc *ibwc, struct ocrdma_cqe *cqe, in ocrdma_update_err_cqe() argument
2475 ibwc->byte_len = 0; in ocrdma_update_err_cqe()
2476 ibwc->qp = &qp->ibqp; in ocrdma_update_err_cqe()
2477 ibwc->status = ocrdma_to_ibwc_err(status); 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
2495 ibwc->opcode = IB_WC_RECV; in ocrdma_update_err_rcqe()
2496 ibwc->wr_id = qp->rqe_wr_id_tbl[qp->rq.tail]; in ocrdma_update_err_rcqe()
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
2505 ocrdma_update_wc(qp, ibwc, qp->sq.tail); in ocrdma_update_err_scqe()
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
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()
2558 struct ib_wc *ibwc, bool *polled) in ocrdma_poll_success_scqe() argument
2567 ibwc->status = IB_WC_SUCCESS; in ocrdma_poll_success_scqe()
2568 ibwc->wc_flags = 0; in ocrdma_poll_success_scqe()
2569 ibwc->qp = &qp->ibqp; in ocrdma_poll_success_scqe()
2570 ocrdma_update_wc(qp, ibwc, tail); in ocrdma_poll_success_scqe()
2583 struct ib_wc *ibwc, bool *polled, bool *stop) in ocrdma_poll_scqe() argument
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()
2598 static int ocrdma_update_ud_rcqe(struct ocrdma_dev *dev, struct ib_wc *ibwc, in ocrdma_update_ud_rcqe() argument
2606 ibwc->src_qp = le32_to_cpu(cqe->flags_status_srcqpn) & in ocrdma_update_ud_rcqe()
2608 ibwc->pkey_index = 0; in ocrdma_update_ud_rcqe()
2609 ibwc->wc_flags = IB_WC_GRH; in ocrdma_update_ud_rcqe()
2610 ibwc->byte_len = (le32_to_cpu(cqe->ud.rxlen_pkey) >> in ocrdma_update_ud_rcqe()
2618 ibwc->wc_flags |= IB_WC_WITH_NETWORK_HDR_TYPE; in ocrdma_update_ud_rcqe()
2619 ibwc->network_hdr_type = hdr_type; in ocrdma_update_ud_rcqe()
2625 static void ocrdma_update_free_srq_cqe(struct ib_wc *ibwc, in ocrdma_update_free_srq_cqe() argument
2638 ibwc->wr_id = srq->rqe_wr_id_tbl[wqe_idx]; in ocrdma_update_free_srq_cqe()
2646 struct ib_wc *ibwc, bool *polled, bool *stop, 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
2686 ibwc->opcode = IB_WC_RECV; in ocrdma_poll_success_rcqe()
2687 ibwc->qp = &qp->ibqp; in ocrdma_poll_success_rcqe()
2688 ibwc->status = IB_WC_SUCCESS; in ocrdma_poll_success_rcqe()
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()
2696 ibwc->ex.imm_data = htonl(le32_to_cpu(cqe->rq.lkey_immdt)); in ocrdma_poll_success_rcqe()
2697 ibwc->wc_flags |= IB_WC_WITH_IMM; in ocrdma_poll_success_rcqe()
2699 ibwc->opcode = IB_WC_RECV_RDMA_WITH_IMM; in ocrdma_poll_success_rcqe()
2700 ibwc->ex.imm_data = htonl(le32_to_cpu(cqe->rq.lkey_immdt)); in ocrdma_poll_success_rcqe()
2701 ibwc->wc_flags |= IB_WC_WITH_IMM; in ocrdma_poll_success_rcqe()
2703 ibwc->ex.invalidate_rkey = le32_to_cpu(cqe->rq.lkey_immdt); in ocrdma_poll_success_rcqe()
2704 ibwc->wc_flags |= IB_WC_WITH_INVALIDATE; in ocrdma_poll_success_rcqe()
2707 ocrdma_update_free_srq_cqe(ibwc, cqe, qp); in ocrdma_poll_success_rcqe()
2709 ibwc->wr_id = qp->rqe_wr_id_tbl[qp->rq.tail]; in ocrdma_poll_success_rcqe()
2715 struct ib_wc *ibwc, bool *polled, bool *stop) in ocrdma_poll_rcqe() argument
2720 ibwc->wc_flags = 0; 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()
2753 struct ib_wc *ibwc) in ocrdma_poll_hwcq() argument
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()
2798 ibwc = ibwc + 1; in ocrdma_poll_hwcq()
2813 struct ocrdma_qp *qp, struct ib_wc *ibwc) in ocrdma_add_err_cqe() argument
2821 ocrdma_update_wc(qp, ibwc, qp->sq.tail); in ocrdma_add_err_cqe()
2824 ibwc->wr_id = qp->rqe_wr_id_tbl[qp->rq.tail]; in ocrdma_add_err_cqe()
2829 ibwc->byte_len = 0; in ocrdma_add_err_cqe()
2830 ibwc->status = IB_WC_WR_FLUSH_ERR; in ocrdma_add_err_cqe()
2831 ibwc = ibwc + 1; in ocrdma_add_err_cqe()