Lines Matching full:resp
67 return (qp->resp.res) ? RESPST_READ_REPLY : RESPST_CHK_PSN; in get_req()
73 int diff = psn_compare(pkt->psn, qp->resp.psn); in check_psn()
79 if (qp->resp.sent_psn_nak) in check_psn()
82 qp->resp.sent_psn_nak = 1; in check_psn()
91 if (qp->resp.sent_psn_nak) in check_psn()
92 qp->resp.sent_psn_nak = 0; in check_psn()
97 if (qp->resp.drop_msg || diff != 0) { in check_psn()
99 qp->resp.drop_msg = 0; in check_psn()
103 qp->resp.drop_msg = 1; in check_psn()
119 switch (qp->resp.opcode) { in check_op_seq()
160 switch (qp->resp.opcode) { in check_op_seq()
191 qp->resp.drop_msg = 1; in check_op_seq()
241 qp->resp.drop_msg = 1; in check_op_valid()
287 memcpy(&qp->resp.srq_wqe, wqe, size); in get_srq_wqe()
289 qp->resp.wqe = &qp->resp.srq_wqe.wqe; in get_srq_wqe()
330 qp->resp.wqe = queue_head(qp->rq.queue, in check_resource()
332 return (qp->resp.wqe) ? RESPST_CHK_LENGTH : RESPST_ERR_RNR; in check_resource()
352 for (i = 0; i < qp->resp.wqe->dma.num_sge; i++) in rxe_resp_check_length()
353 recv_buffer_len += qp->resp.wqe->dma.sge[i].length; in rxe_resp_check_length()
401 * Instead set qp->resp.rkey to 0 which is an invalid rkey
408 qp->resp.va = reth_va(pkt); in qp_resp_from_reth()
409 qp->resp.offset = 0; in qp_resp_from_reth()
410 qp->resp.resid = length; in qp_resp_from_reth()
411 qp->resp.length = length; in qp_resp_from_reth()
413 qp->resp.rkey = 0; in qp_resp_from_reth()
415 qp->resp.rkey = reth_rkey(pkt); in qp_resp_from_reth()
420 qp->resp.va = atmeth_va(pkt); in qp_resp_from_atmeth()
421 qp->resp.offset = 0; in qp_resp_from_atmeth()
422 qp->resp.rkey = atmeth_rkey(pkt); in qp_resp_from_atmeth()
423 qp->resp.resid = sizeof(u64); in qp_resp_from_atmeth()
426 /* resolve the packet rkey to qp->resp.mr or set qp->resp.mr to NULL
476 qp->resp.mr = NULL; in check_rkey()
480 va = qp->resp.va; in check_rkey()
481 rkey = qp->resp.rkey; in check_rkey()
482 resid = qp->resp.resid; in check_rkey()
501 qp->resp.offset = mw->addr; in check_rkey()
523 if (mr_check_range(mr, va + qp->resp.offset, resid)) { in check_rkey()
550 WARN_ON_ONCE(qp->resp.mr); in check_rkey()
552 qp->resp.mr = mr; in check_rkey()
556 qp->resp.mr = NULL; in check_rkey()
570 err = copy_data(qp->pd, IB_ACCESS_LOCAL_WRITE, &qp->resp.wqe->dma, in send_data_in()
586 err = rxe_mr_copy(qp->resp.mr, qp->resp.va + qp->resp.offset, in write_data_in()
593 qp->resp.va += data_len; in write_data_in()
594 qp->resp.resid -= data_len; in write_data_in()
607 res = &qp->resp.resources[qp->resp.res_head]; in rxe_prepare_res()
616 res->read.va = qp->resp.va + qp->resp.offset; in rxe_prepare_res()
617 res->read.va_org = qp->resp.va + qp->resp.offset; in rxe_prepare_res()
618 res->read.resid = qp->resp.resid; in rxe_prepare_res()
619 res->read.length = qp->resp.resid; in rxe_prepare_res()
620 res->read.rkey = qp->resp.rkey; in rxe_prepare_res()
636 res->flush.va = qp->resp.va + qp->resp.offset; in rxe_prepare_res()
637 res->flush.length = qp->resp.length; in rxe_prepare_res()
649 struct rxe_mr *mr = qp->resp.mr; in process_flush()
650 struct resp_res *res = qp->resp.res; in process_flush()
657 qp->resp.res = res; in process_flush()
678 qp->resp.msn++; in process_flush()
681 qp->resp.psn = (pkt->psn + 1) & BTH_PSN_MASK; in process_flush()
682 qp->resp.ack_psn = qp->resp.psn; in process_flush()
684 qp->resp.opcode = pkt->opcode; in process_flush()
685 qp->resp.status = IB_WC_SUCCESS; in process_flush()
693 struct rxe_mr *mr = qp->resp.mr; in atomic_reply()
694 struct resp_res *res = qp->resp.res; in atomic_reply()
699 qp->resp.res = res; in atomic_reply()
703 u64 iova = qp->resp.va + qp->resp.offset; in atomic_reply()
712 qp->resp.msn++; in atomic_reply()
715 qp->resp.psn = (pkt->psn + 1) & BTH_PSN_MASK; in atomic_reply()
716 qp->resp.ack_psn = qp->resp.psn; in atomic_reply()
718 qp->resp.opcode = pkt->opcode; in atomic_reply()
719 qp->resp.status = IB_WC_SUCCESS; in atomic_reply()
728 struct resp_res *res = qp->resp.res; in atomic_write_reply()
736 qp->resp.res = res; in atomic_write_reply()
742 mr = qp->resp.mr; in atomic_write_reply()
744 iova = qp->resp.va + qp->resp.offset; in atomic_write_reply()
750 qp->resp.resid = 0; in atomic_write_reply()
751 qp->resp.msn++; in atomic_write_reply()
754 qp->resp.psn = (pkt->psn + 1) & BTH_PSN_MASK; in atomic_write_reply()
755 qp->resp.ack_psn = qp->resp.psn; in atomic_write_reply()
757 qp->resp.opcode = pkt->opcode; in atomic_write_reply()
758 qp->resp.status = IB_WC_SUCCESS; in atomic_write_reply()
797 aeth_set_msn(ack, qp->resp.msn); in prepare_ack_packet()
801 atmack_set_orig(ack, qp->resp.res->atomic.orig_val); in prepare_ack_packet()
878 struct resp_res *res = qp->resp.res; in read_reply()
883 qp->resp.res = res; in read_reply()
887 if (!res->replay || qp->resp.length == 0) { in read_reply()
889 * otherwise qp->resp.mr holds a ref on mr in read_reply()
892 mr = qp->resp.mr; in read_reply()
893 qp->resp.mr = NULL; in read_reply()
958 qp->resp.res = NULL; in read_reply()
960 qp->resp.opcode = -1; in read_reply()
961 if (psn_compare(res->cur_psn, qp->resp.psn) >= 0) in read_reply()
962 qp->resp.psn = res->cur_psn; in read_reply()
1014 qp->resp.msn++; in execute()
1037 qp->resp.msn++; in execute()
1040 qp->resp.psn = (pkt->psn + 1) & BTH_PSN_MASK; in execute()
1041 qp->resp.ack_psn = qp->resp.psn; in execute()
1043 qp->resp.opcode = pkt->opcode; in execute()
1044 qp->resp.status = IB_WC_SUCCESS; in execute()
1060 struct rxe_recv_wqe *wqe = qp->resp.wqe; in do_complete()
1070 uwc->status = qp->resp.status; in do_complete()
1074 wc->status = qp->resp.status; in do_complete()
1086 qp->resp.length : wqe->dma.length - wqe->dma.resid; in do_complete()
1147 qp->resp.wqe = NULL; in do_complete()
1201 qp->resp.res = NULL; in send_atomic_ack()
1214 qp->resp.res = NULL; in send_read_response_ack()
1224 if (qp->resp.aeth_syndrome != AETH_ACK_UNLIMITED) in acknowledge()
1225 send_ack(qp, qp->resp.aeth_syndrome, pkt->psn); in acknowledge()
1248 if (qp->resp.mr) { in cleanup()
1249 rxe_put(qp->resp.mr); in cleanup()
1250 qp->resp.mr = NULL; in cleanup()
1261 struct resp_res *res = &qp->resp.resources[i]; in find_resource()
1279 u32 prev_psn = (qp->resp.ack_psn - 1) & BTH_PSN_MASK; in duplicate_request()
1294 qp->resp.res = res; in duplicate_request()
1344 qp->resp.res = res; in duplicate_request()
1356 qp->resp.res = res; in duplicate_request()
1375 qp->resp.aeth_syndrome = syndrome; in do_class_ac_error()
1376 qp->resp.status = status; in do_class_ac_error()
1379 qp->resp.goto_error = 1; in do_class_ac_error()
1387 qp->resp.drop_msg = 1; in do_class_d1e_error()
1388 if (qp->resp.wqe) { in do_class_d1e_error()
1389 qp->resp.status = IB_WC_REM_INV_REQ_ERR; in do_class_d1e_error()
1400 if (qp->resp.wqe) { in do_class_d1e_error()
1401 qp->resp.wqe->dma.resid = qp->resp.wqe->dma.length; in do_class_d1e_error()
1402 qp->resp.wqe->dma.cur_sge = 0; in do_class_d1e_error()
1403 qp->resp.wqe->dma.sge_offset = 0; in do_class_d1e_error()
1404 qp->resp.opcode = -1; in do_class_d1e_error()
1407 if (qp->resp.mr) { in do_class_d1e_error()
1408 rxe_put(qp->resp.mr); in do_class_d1e_error()
1409 qp->resp.mr = NULL; in do_class_d1e_error()
1488 qp->resp.wqe = NULL; in flush_recv_queue()
1511 qp->resp.aeth_syndrome = AETH_ACK_UNLIMITED; in rxe_receiver()
1568 send_ack(qp, AETH_NAK_PSN_SEQ_ERROR, qp->resp.psn); in rxe_receiver()
1596 qp->resp.drop_msg = 1; in rxe_receiver()
1608 qp->resp.drop_msg = 1; in rxe_receiver()
1611 qp->resp.status = IB_WC_REM_ACCESS_ERR; in rxe_receiver()
1622 qp->resp.goto_error = 1; in rxe_receiver()
1623 qp->resp.status = IB_WC_REM_INV_REQ_ERR; in rxe_receiver()
1635 qp->resp.status = IB_WC_REM_INV_REQ_ERR; in rxe_receiver()
1639 qp->resp.drop_msg = 1; in rxe_receiver()
1657 if (qp->resp.goto_error) { in rxe_receiver()
1665 if (qp->resp.goto_error) { in rxe_receiver()
1673 qp->resp.goto_error = 0; in rxe_receiver()