Lines Matching refs:resp
61 rxe_sched_task(&qp->resp.task); in rxe_resp_queue_pkt()
63 rxe_run_task(&qp->resp.task); in rxe_resp_queue_pkt()
77 return (qp->resp.res) ? RESPST_READ_REPLY : RESPST_CHK_PSN; in get_req()
83 int diff = psn_compare(pkt->psn, qp->resp.psn); in check_psn()
89 if (qp->resp.sent_psn_nak) in check_psn()
92 qp->resp.sent_psn_nak = 1; in check_psn()
101 if (qp->resp.sent_psn_nak) in check_psn()
102 qp->resp.sent_psn_nak = 0; in check_psn()
107 if (qp->resp.drop_msg || diff != 0) { in check_psn()
109 qp->resp.drop_msg = 0; in check_psn()
113 qp->resp.drop_msg = 1; in check_psn()
129 switch (qp->resp.opcode) { in check_op_seq()
170 switch (qp->resp.opcode) { in check_op_seq()
201 qp->resp.drop_msg = 1; in check_op_seq()
251 qp->resp.drop_msg = 1; in check_op_valid()
297 memcpy(&qp->resp.srq_wqe, wqe, size); in get_srq_wqe()
299 qp->resp.wqe = &qp->resp.srq_wqe.wqe; in get_srq_wqe()
340 qp->resp.wqe = queue_head(qp->rq.queue, in check_resource()
342 return (qp->resp.wqe) ? RESPST_CHK_LENGTH : RESPST_ERR_RNR; in check_resource()
405 qp->resp.va = reth_va(pkt); in qp_resp_from_reth()
406 qp->resp.offset = 0; in qp_resp_from_reth()
407 qp->resp.resid = length; in qp_resp_from_reth()
408 qp->resp.length = length; in qp_resp_from_reth()
410 qp->resp.rkey = 0; in qp_resp_from_reth()
412 qp->resp.rkey = reth_rkey(pkt); in qp_resp_from_reth()
417 qp->resp.va = atmeth_va(pkt); in qp_resp_from_atmeth()
418 qp->resp.offset = 0; in qp_resp_from_atmeth()
419 qp->resp.rkey = atmeth_rkey(pkt); in qp_resp_from_atmeth()
420 qp->resp.resid = sizeof(u64); in qp_resp_from_atmeth()
473 qp->resp.mr = NULL; in check_rkey()
477 va = qp->resp.va; in check_rkey()
478 rkey = qp->resp.rkey; in check_rkey()
479 resid = qp->resp.resid; in check_rkey()
498 qp->resp.offset = mw->addr; in check_rkey()
520 if (mr_check_range(mr, va + qp->resp.offset, resid)) { in check_rkey()
547 WARN_ON_ONCE(qp->resp.mr); in check_rkey()
549 qp->resp.mr = mr; in check_rkey()
553 qp->resp.mr = NULL; in check_rkey()
567 err = copy_data(qp->pd, IB_ACCESS_LOCAL_WRITE, &qp->resp.wqe->dma, in send_data_in()
583 err = rxe_mr_copy(qp->resp.mr, qp->resp.va + qp->resp.offset, in write_data_in()
590 qp->resp.va += data_len; in write_data_in()
591 qp->resp.resid -= data_len; in write_data_in()
604 res = &qp->resp.resources[qp->resp.res_head]; in rxe_prepare_res()
613 res->read.va = qp->resp.va + qp->resp.offset; in rxe_prepare_res()
614 res->read.va_org = qp->resp.va + qp->resp.offset; in rxe_prepare_res()
615 res->read.resid = qp->resp.resid; in rxe_prepare_res()
616 res->read.length = qp->resp.resid; in rxe_prepare_res()
617 res->read.rkey = qp->resp.rkey; in rxe_prepare_res()
633 res->flush.va = qp->resp.va + qp->resp.offset; in rxe_prepare_res()
634 res->flush.length = qp->resp.length; in rxe_prepare_res()
646 struct rxe_mr *mr = qp->resp.mr; in process_flush()
647 struct resp_res *res = qp->resp.res; in process_flush()
654 qp->resp.res = res; in process_flush()
675 qp->resp.msn++; in process_flush()
678 qp->resp.psn = (pkt->psn + 1) & BTH_PSN_MASK; in process_flush()
679 qp->resp.ack_psn = qp->resp.psn; in process_flush()
681 qp->resp.opcode = pkt->opcode; in process_flush()
682 qp->resp.status = IB_WC_SUCCESS; in process_flush()
690 struct rxe_mr *mr = qp->resp.mr; in atomic_reply()
691 struct resp_res *res = qp->resp.res; in atomic_reply()
696 qp->resp.res = res; in atomic_reply()
700 u64 iova = qp->resp.va + qp->resp.offset; in atomic_reply()
709 qp->resp.msn++; in atomic_reply()
712 qp->resp.psn = (pkt->psn + 1) & BTH_PSN_MASK; in atomic_reply()
713 qp->resp.ack_psn = qp->resp.psn; in atomic_reply()
715 qp->resp.opcode = pkt->opcode; in atomic_reply()
716 qp->resp.status = IB_WC_SUCCESS; in atomic_reply()
725 struct resp_res *res = qp->resp.res; in atomic_write_reply()
733 qp->resp.res = res; in atomic_write_reply()
739 mr = qp->resp.mr; in atomic_write_reply()
741 iova = qp->resp.va + qp->resp.offset; in atomic_write_reply()
747 qp->resp.resid = 0; in atomic_write_reply()
748 qp->resp.msn++; in atomic_write_reply()
751 qp->resp.psn = (pkt->psn + 1) & BTH_PSN_MASK; in atomic_write_reply()
752 qp->resp.ack_psn = qp->resp.psn; in atomic_write_reply()
754 qp->resp.opcode = pkt->opcode; in atomic_write_reply()
755 qp->resp.status = IB_WC_SUCCESS; in atomic_write_reply()
794 aeth_set_msn(ack, qp->resp.msn); in prepare_ack_packet()
798 atmack_set_orig(ack, qp->resp.res->atomic.orig_val); in prepare_ack_packet()
875 struct resp_res *res = qp->resp.res; in read_reply()
880 qp->resp.res = res; in read_reply()
884 if (!res->replay || qp->resp.length == 0) { in read_reply()
889 mr = qp->resp.mr; in read_reply()
890 qp->resp.mr = NULL; in read_reply()
955 qp->resp.res = NULL; in read_reply()
957 qp->resp.opcode = -1; in read_reply()
958 if (psn_compare(res->cur_psn, qp->resp.psn) >= 0) in read_reply()
959 qp->resp.psn = res->cur_psn; in read_reply()
1011 qp->resp.msn++; in execute()
1034 qp->resp.msn++; in execute()
1037 qp->resp.psn = (pkt->psn + 1) & BTH_PSN_MASK; in execute()
1038 qp->resp.ack_psn = qp->resp.psn; in execute()
1040 qp->resp.opcode = pkt->opcode; in execute()
1041 qp->resp.status = IB_WC_SUCCESS; in execute()
1057 struct rxe_recv_wqe *wqe = qp->resp.wqe; in do_complete()
1067 uwc->status = qp->resp.status; in do_complete()
1071 wc->status = qp->resp.status; in do_complete()
1083 qp->resp.length : wqe->dma.length - wqe->dma.resid; in do_complete()
1144 qp->resp.wqe = NULL; in do_complete()
1198 qp->resp.res = NULL; in send_atomic_ack()
1211 qp->resp.res = NULL; in send_read_response_ack()
1221 if (qp->resp.aeth_syndrome != AETH_ACK_UNLIMITED) in acknowledge()
1222 send_ack(qp, qp->resp.aeth_syndrome, pkt->psn); in acknowledge()
1245 if (qp->resp.mr) { in cleanup()
1246 rxe_put(qp->resp.mr); in cleanup()
1247 qp->resp.mr = NULL; in cleanup()
1258 struct resp_res *res = &qp->resp.resources[i]; in find_resource()
1276 u32 prev_psn = (qp->resp.ack_psn - 1) & BTH_PSN_MASK; in duplicate_request()
1291 qp->resp.res = res; in duplicate_request()
1341 qp->resp.res = res; in duplicate_request()
1353 qp->resp.res = res; in duplicate_request()
1372 qp->resp.aeth_syndrome = syndrome; in do_class_ac_error()
1373 qp->resp.status = status; in do_class_ac_error()
1376 qp->resp.goto_error = 1; in do_class_ac_error()
1384 qp->resp.drop_msg = 1; in do_class_d1e_error()
1385 if (qp->resp.wqe) { in do_class_d1e_error()
1386 qp->resp.status = IB_WC_REM_INV_REQ_ERR; in do_class_d1e_error()
1397 if (qp->resp.wqe) { in do_class_d1e_error()
1398 qp->resp.wqe->dma.resid = qp->resp.wqe->dma.length; in do_class_d1e_error()
1399 qp->resp.wqe->dma.cur_sge = 0; in do_class_d1e_error()
1400 qp->resp.wqe->dma.sge_offset = 0; in do_class_d1e_error()
1401 qp->resp.opcode = -1; in do_class_d1e_error()
1404 if (qp->resp.mr) { in do_class_d1e_error()
1405 rxe_put(qp->resp.mr); in do_class_d1e_error()
1406 qp->resp.mr = NULL; in do_class_d1e_error()
1485 qp->resp.wqe = NULL; in flush_recv_queue()
1508 qp->resp.aeth_syndrome = AETH_ACK_UNLIMITED; in rxe_responder()
1565 send_ack(qp, AETH_NAK_PSN_SEQ_ERROR, qp->resp.psn); in rxe_responder()
1593 qp->resp.drop_msg = 1; in rxe_responder()
1605 qp->resp.drop_msg = 1; in rxe_responder()
1608 qp->resp.status = IB_WC_REM_ACCESS_ERR; in rxe_responder()
1619 qp->resp.goto_error = 1; in rxe_responder()
1620 qp->resp.status = IB_WC_REM_INV_REQ_ERR; in rxe_responder()
1632 qp->resp.status = IB_WC_REM_INV_REQ_ERR; in rxe_responder()
1636 qp->resp.drop_msg = 1; in rxe_responder()
1654 if (qp->resp.goto_error) { in rxe_responder()
1662 if (qp->resp.goto_error) { in rxe_responder()
1670 qp->resp.goto_error = 0; in rxe_responder()