Lines Matching refs:entry
160 int entry) in get_cqe_from_buf() argument
163 return buf->queue.direct.buf + (entry * MTHCA_CQ_ENTRY_SIZE); in get_cqe_from_buf()
165 return buf->queue.page_list[entry * MTHCA_CQ_ENTRY_SIZE / PAGE_SIZE].buf in get_cqe_from_buf()
166 + (entry * MTHCA_CQ_ENTRY_SIZE) % PAGE_SIZE; in get_cqe_from_buf()
169 static inline struct mthca_cqe *get_cqe(struct mthca_cq *cq, int entry) in get_cqe() argument
171 return get_cqe_from_buf(&cq->buf, entry); in get_cqe()
380 struct ib_wc *entry, int *free_cqe) in handle_error_cqe() argument
399 entry->status = IB_WC_LOC_LEN_ERR; in handle_error_cqe()
402 entry->status = IB_WC_LOC_QP_OP_ERR; in handle_error_cqe()
405 entry->status = IB_WC_LOC_EEC_OP_ERR; in handle_error_cqe()
408 entry->status = IB_WC_LOC_PROT_ERR; in handle_error_cqe()
411 entry->status = IB_WC_WR_FLUSH_ERR; in handle_error_cqe()
414 entry->status = IB_WC_MW_BIND_ERR; in handle_error_cqe()
417 entry->status = IB_WC_BAD_RESP_ERR; in handle_error_cqe()
420 entry->status = IB_WC_LOC_ACCESS_ERR; in handle_error_cqe()
423 entry->status = IB_WC_REM_INV_REQ_ERR; in handle_error_cqe()
426 entry->status = IB_WC_REM_ACCESS_ERR; in handle_error_cqe()
429 entry->status = IB_WC_REM_OP_ERR; in handle_error_cqe()
432 entry->status = IB_WC_RETRY_EXC_ERR; in handle_error_cqe()
435 entry->status = IB_WC_RNR_RETRY_EXC_ERR; in handle_error_cqe()
438 entry->status = IB_WC_LOC_RDD_VIOL_ERR; in handle_error_cqe()
441 entry->status = IB_WC_REM_INV_RD_REQ_ERR; in handle_error_cqe()
444 entry->status = IB_WC_REM_ABORT_ERR; in handle_error_cqe()
447 entry->status = IB_WC_INV_EECN_ERR; in handle_error_cqe()
450 entry->status = IB_WC_INV_EEC_STATE_ERR; in handle_error_cqe()
453 entry->status = IB_WC_GENERAL_ERR; in handle_error_cqe()
457 entry->vendor_err = cqe->vendor_err; in handle_error_cqe()
487 struct ib_wc *entry) in mthca_poll_one() argument
536 entry->qp = &(*cur_qp)->ibqp; in mthca_poll_one()
542 entry->wr_id = (*cur_qp)->wrid[wqe_index + in mthca_poll_one()
549 entry->wr_id = srq->wrid[wqe_index]; in mthca_poll_one()
563 entry->wr_id = (*cur_qp)->wrid[wqe_index]; in mthca_poll_one()
578 entry, &free_cqe); in mthca_poll_one()
583 entry->wc_flags = 0; in mthca_poll_one()
586 entry->opcode = IB_WC_RDMA_WRITE; in mthca_poll_one()
589 entry->opcode = IB_WC_RDMA_WRITE; in mthca_poll_one()
590 entry->wc_flags |= IB_WC_WITH_IMM; in mthca_poll_one()
593 entry->opcode = IB_WC_SEND; in mthca_poll_one()
596 entry->opcode = IB_WC_SEND; in mthca_poll_one()
597 entry->wc_flags |= IB_WC_WITH_IMM; in mthca_poll_one()
600 entry->opcode = IB_WC_RDMA_READ; in mthca_poll_one()
601 entry->byte_len = be32_to_cpu(cqe->byte_cnt); in mthca_poll_one()
604 entry->opcode = IB_WC_COMP_SWAP; in mthca_poll_one()
605 entry->byte_len = MTHCA_ATOMIC_BYTE_LEN; in mthca_poll_one()
608 entry->opcode = IB_WC_FETCH_ADD; in mthca_poll_one()
609 entry->byte_len = MTHCA_ATOMIC_BYTE_LEN; in mthca_poll_one()
612 entry->opcode = IB_WC_BIND_MW; in mthca_poll_one()
615 entry->opcode = MTHCA_OPCODE_INVALID; in mthca_poll_one()
619 entry->byte_len = be32_to_cpu(cqe->byte_cnt); in mthca_poll_one()
623 entry->wc_flags = IB_WC_WITH_IMM; in mthca_poll_one()
624 entry->ex.imm_data = cqe->imm_etype_pkey_eec; in mthca_poll_one()
625 entry->opcode = IB_WC_RECV; in mthca_poll_one()
629 entry->wc_flags = IB_WC_WITH_IMM; in mthca_poll_one()
630 entry->ex.imm_data = cqe->imm_etype_pkey_eec; in mthca_poll_one()
631 entry->opcode = IB_WC_RECV_RDMA_WITH_IMM; in mthca_poll_one()
634 entry->wc_flags = 0; in mthca_poll_one()
635 entry->opcode = IB_WC_RECV; in mthca_poll_one()
638 entry->slid = be16_to_cpu(cqe->rlid); in mthca_poll_one()
639 entry->sl = cqe->sl_ipok >> 4; in mthca_poll_one()
640 entry->src_qp = be32_to_cpu(cqe->rqpn) & 0xffffff; in mthca_poll_one()
641 entry->dlid_path_bits = cqe->g_mlpath & 0x7f; in mthca_poll_one()
642 entry->pkey_index = be32_to_cpu(cqe->imm_etype_pkey_eec) >> 16; in mthca_poll_one()
643 entry->wc_flags |= cqe->g_mlpath & 0x80 ? IB_WC_GRH : 0; in mthca_poll_one()
646 entry->wc_flags |= (cqe->sl_ipok & 1 && checksum == 0xffff) ? in mthca_poll_one()
650 entry->status = IB_WC_SUCCESS; in mthca_poll_one()
663 struct ib_wc *entry) in mthca_poll_cq() argument
679 &freed, entry + npolled); in mthca_poll_cq()