Lines Matching refs:cqe

186 	struct t4_cqe cqe;
190 memset(&cqe, 0, sizeof(cqe));
191 cqe.header = cpu_to_be32(CQE_STATUS_V(T4_ERR_SWFLUSH) |
196 cqe.bits_type_ts = cpu_to_be64(CQE_GENBIT_V((u64)cq->gen));
198 cqe.u.srcqe.abs_rqe_idx = cpu_to_be32(srqidx);
199 cq->sw_queue[cq->sw_pidx] = cqe;
220 struct t4_cqe cqe;
224 memset(&cqe, 0, sizeof(cqe));
225 cqe.header = cpu_to_be32(CQE_STATUS_V(T4_ERR_SWFLUSH) |
230 CQE_WRID_SQ_IDX(&cqe) = swcqe->idx;
231 cqe.bits_type_ts = cpu_to_be64(CQE_GENBIT_V((u64)cq->gen));
232 cq->sw_queue[cq->sw_pidx] = cqe;
284 * Insert this completed cqe into the swcq.
286 pr_debug("moving cqe into swcq sq idx %u cq idx %u\n",
288 swsqe->cqe.header |= htonl(CQE_SWCQE_V(1));
289 cq->sw_queue[cq->sw_pidx] = swsqe->cqe;
405 swsqe->cqe = *hw_cqe;
422 static int cqe_completes_wr(struct t4_cqe *cqe, struct t4_wq *wq)
424 if (DRAIN_CQE(cqe)) {
429 if (CQE_OPCODE(cqe) == FW_RI_TERMINATE)
432 if ((CQE_OPCODE(cqe) == FW_RI_RDMA_WRITE) && RQ_TYPE(cqe))
435 if ((CQE_OPCODE(cqe) == FW_RI_READ_RESP) && SQ_TYPE(cqe))
438 if (CQE_SEND_OPCODE(cqe) && RQ_TYPE(cqe) && t4_rq_empty(wq))
445 struct t4_cqe *cqe;
452 cqe = &cq->sw_queue[ptr];
453 if (RQ_TYPE(cqe) && (CQE_OPCODE(cqe) != FW_RI_READ_RESP) &&
454 (CQE_QPID(cqe) == wq->sq.qid) && cqe_completes_wr(cqe, wq))
500 pr_debug("%s in order cqe rel_idx %u cidx %u pidx %u wq_pidx %u in_use %u rq_size %u wr_id %llx\n",
517 pr_debug("%s ooo cqe rel_idx %u cidx %u pidx %u wq_pidx %u in_use %u rq_size %u ooo_count %u wr_id %llx\n",
537 * cqe: copy of the polled CQE.
544 static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe,
564 * skip cqe's not affiliated with a QP.
572 * skip hw cqe's if the wq is flushed.
588 * Special cqe for drain WR completions...
592 *cqe = *hw_cqe;
598 * 1) the cqe doesn't contain the sq_wptr from the wr.
686 swsqe->cqe = *hw_cqe;
693 *cqe = *hw_cqe;
743 pr_debug("cq %p cqid 0x%x skip sw cqe cidx %u\n",
747 pr_debug("cq %p cqid 0x%x skip hw cqe cidx %u\n",
757 struct t4_cqe cqe;
764 ret = poll_cq(wq, &(chp->cq), &cqe, &cqe_flushed, &cookie, &credit,
771 wc->vendor_err = CQE_STATUS(&cqe);
782 CQE_QPID(&cqe),
783 CQE_TYPE(&cqe), CQE_OPCODE(&cqe),
784 CQE_STATUS(&cqe), CQE_LEN(&cqe),
785 CQE_WRID_HI(&cqe), CQE_WRID_LOW(&cqe),
788 if (CQE_TYPE(&cqe) == 0) {
789 if (!CQE_STATUS(&cqe))
790 wc->byte_len = CQE_LEN(&cqe);
794 switch (CQE_OPCODE(&cqe)) {
801 wc->ex.invalidate_rkey = CQE_WRID_STAG(&cqe);
807 wc->ex.imm_data = CQE_IMM_DATA(&cqe);
812 CQE_OPCODE(&cqe), CQE_QPID(&cqe));
817 switch (CQE_OPCODE(&cqe)) {
824 wc->byte_len = CQE_LEN(&cqe);
843 if (CQE_STATUS(&cqe) != T4_ERR_SUCCESS)
845 CQE_WRID_FR_STAG(&cqe));
849 CQE_OPCODE(&cqe), CQE_QPID(&cqe));
859 switch (CQE_STATUS(&cqe)) {
904 CQE_STATUS(&cqe), CQE_QPID(&cqe));
916 * 0 cqe returned
995 int entries = attr->cqe;
1080 chp->ibcq.cqe = entries - 2;