Lines Matching refs:pkt

87 	struct rxe_pkt_info *pkt = SKB_TO_PKT(skb);  in rxe_resp_queue_pkt()  local
91 must_sched = (pkt->opcode == IB_OPCODE_RC_RDMA_READ_REQUEST) || in rxe_resp_queue_pkt()
123 struct rxe_pkt_info *pkt) in check_psn() argument
125 int diff = psn_compare(pkt->psn, qp->resp.psn); in check_psn()
150 if (pkt->mask & RXE_START_MASK) { in check_psn()
167 struct rxe_pkt_info *pkt) in check_op_seq() argument
174 switch (pkt->opcode) { in check_op_seq()
186 switch (pkt->opcode) { in check_op_seq()
196 switch (pkt->opcode) { in check_op_seq()
215 switch (pkt->opcode) { in check_op_seq()
226 switch (pkt->opcode) { in check_op_seq()
236 switch (pkt->opcode) { in check_op_seq()
257 struct rxe_pkt_info *pkt) in check_op_valid() argument
261 if (((pkt->mask & RXE_READ_MASK) && in check_op_valid()
263 ((pkt->mask & RXE_WRITE_MASK) && in check_op_valid()
265 ((pkt->mask & RXE_ATOMIC_MASK) && in check_op_valid()
273 if ((pkt->mask & RXE_WRITE_MASK) && in check_op_valid()
345 struct rxe_pkt_info *pkt) in check_resource() argument
367 if (pkt->mask & RXE_READ_OR_ATOMIC_MASK) { in check_resource()
378 if (pkt->mask & RXE_RWR_MASK) { in check_resource()
391 struct rxe_pkt_info *pkt) in check_length() argument
406 struct rxe_pkt_info *pkt) in check_rkey() argument
418 if (pkt->mask & RXE_READ_OR_WRITE_MASK) { in check_rkey()
419 if (pkt->mask & RXE_RETH_MASK) { in check_rkey()
420 qp->resp.va = reth_va(pkt); in check_rkey()
422 qp->resp.rkey = reth_rkey(pkt); in check_rkey()
423 qp->resp.resid = reth_len(pkt); in check_rkey()
424 qp->resp.length = reth_len(pkt); in check_rkey()
426 access = (pkt->mask & RXE_READ_MASK) ? IB_ACCESS_REMOTE_READ in check_rkey()
428 } else if (pkt->mask & RXE_ATOMIC_MASK) { in check_rkey()
429 qp->resp.va = atmeth_va(pkt); in check_rkey()
431 qp->resp.rkey = atmeth_rkey(pkt); in check_rkey()
439 if ((pkt->mask & RXE_READ_OR_WRITE_MASK) && in check_rkey()
440 (pkt->mask & RXE_RETH_MASK) && in check_rkey()
441 reth_len(pkt) == 0) { in check_rkey()
448 pktlen = payload_size(pkt); in check_rkey()
486 if (pkt->mask & RXE_WRITE_MASK) { in check_rkey()
488 if (pktlen != mtu || bth_pad(pkt)) { in check_rkey()
497 if ((bth_pad(pkt) != (0x3 & (-resid)))) { in check_rkey()
536 struct rxe_pkt_info *pkt) in write_data_in() argument
540 int data_len = payload_size(pkt); in write_data_in()
543 payload_addr(pkt), data_len, RXE_TO_MR_OBJ); in write_data_in()
557 struct rxe_pkt_info *pkt, in rxe_prepare_res() argument
578 pkts = max_t(u32, (reth_len(pkt) + qp->mtu - 1)/qp->mtu, 1); in rxe_prepare_res()
579 res->first_psn = pkt->psn; in rxe_prepare_res()
580 res->cur_psn = pkt->psn; in rxe_prepare_res()
581 res->last_psn = (pkt->psn + pkts - 1) & BTH_PSN_MASK; in rxe_prepare_res()
586 res->first_psn = pkt->psn; in rxe_prepare_res()
587 res->last_psn = pkt->psn; in rxe_prepare_res()
588 res->cur_psn = pkt->psn; in rxe_prepare_res()
599 struct rxe_pkt_info *pkt) in atomic_reply() argument
608 res = rxe_prepare_res(qp, pkt, RXE_ATOMIC_MASK); in atomic_reply()
630 if (pkt->opcode == IB_OPCODE_RC_COMPARE_SWAP) { in atomic_reply()
631 if (value == atmeth_comp(pkt)) in atomic_reply()
632 value = atmeth_swap_add(pkt); in atomic_reply()
634 value += atmeth_swap_add(pkt); in atomic_reply()
643 qp->resp.psn = (pkt->psn + 1) & BTH_PSN_MASK; in atomic_reply()
646 qp->resp.opcode = pkt->opcode; in atomic_reply()
858 static enum resp_states execute(struct rxe_qp *qp, struct rxe_pkt_info *pkt) in execute() argument
861 struct sk_buff *skb = PKT_TO_SKB(pkt); in execute()
864 if (pkt->mask & RXE_SEND_MASK) { in execute()
880 err = send_data_in(qp, payload_addr(pkt), payload_size(pkt)); in execute()
883 } else if (pkt->mask & RXE_WRITE_MASK) { in execute()
884 err = write_data_in(qp, pkt); in execute()
887 } else if (pkt->mask & RXE_READ_MASK) { in execute()
891 } else if (pkt->mask & RXE_ATOMIC_MASK) { in execute()
898 if (pkt->mask & RXE_IETH_MASK) { in execute()
899 u32 rkey = ieth_rkey(pkt); in execute()
906 if (pkt->mask & RXE_END_MASK) in execute()
911 qp->resp.psn = (pkt->psn + 1) & BTH_PSN_MASK; in execute()
914 qp->resp.opcode = pkt->opcode; in execute()
917 if (pkt->mask & RXE_COMP_MASK) in execute()
926 struct rxe_pkt_info *pkt) in do_complete() argument
951 wc->opcode = (pkt->mask & RXE_IMMDT_MASK && in do_complete()
952 pkt->mask & RXE_WRITE_MASK) ? in do_complete()
954 wc->byte_len = (pkt->mask & RXE_IMMDT_MASK && in do_complete()
955 pkt->mask & RXE_WRITE_MASK) ? in do_complete()
964 if (pkt->mask & RXE_IMMDT_MASK) { in do_complete()
966 uwc->ex.imm_data = immdt_imm(pkt); in do_complete()
969 if (pkt->mask & RXE_IETH_MASK) { in do_complete()
971 uwc->ex.invalidate_rkey = ieth_rkey(pkt); in do_complete()
974 if (pkt->mask & RXE_DETH_MASK) in do_complete()
975 uwc->src_qp = deth_sqp(pkt); in do_complete()
979 struct sk_buff *skb = PKT_TO_SKB(pkt); in do_complete()
992 if (pkt->mask & RXE_IMMDT_MASK) { in do_complete()
994 wc->ex.imm_data = immdt_imm(pkt); in do_complete()
997 if (pkt->mask & RXE_IETH_MASK) { in do_complete()
999 wc->ex.invalidate_rkey = ieth_rkey(pkt); in do_complete()
1002 if (pkt->mask & RXE_DETH_MASK) in do_complete()
1003 wc->src_qp = deth_sqp(pkt); in do_complete()
1015 if (rxe_cq_post(qp->rcq, &cqe, pkt ? bth_se(pkt) : 1)) in do_complete()
1021 if (unlikely(!pkt)) in do_complete()
1067 struct rxe_pkt_info *pkt) in acknowledge() argument
1073 send_ack(qp, qp->resp.aeth_syndrome, pkt->psn); in acknowledge()
1074 else if (pkt->mask & RXE_ATOMIC_MASK) in acknowledge()
1075 send_atomic_ack(qp, AETH_ACK_UNLIMITED, pkt->psn); in acknowledge()
1076 else if (bth_ack(pkt)) in acknowledge()
1077 send_ack(qp, AETH_ACK_UNLIMITED, pkt->psn); in acknowledge()
1083 struct rxe_pkt_info *pkt) in cleanup() argument
1087 if (pkt) { in cleanup()
1122 struct rxe_pkt_info *pkt) in duplicate_request() argument
1127 if (pkt->mask & RXE_SEND_MASK || in duplicate_request()
1128 pkt->mask & RXE_WRITE_MASK) { in duplicate_request()
1132 } else if (pkt->mask & RXE_READ_MASK) { in duplicate_request()
1135 res = find_resource(qp, pkt->psn); in duplicate_request()
1146 u64 iova = reth_va(pkt); in duplicate_request()
1147 u32 resid = reth_len(pkt); in duplicate_request()
1157 if (reth_rkey(pkt) != res->read.rkey) { in duplicate_request()
1162 res->cur_psn = pkt->psn; in duplicate_request()
1163 res->state = (pkt->psn == res->first_psn) ? in duplicate_request()
1182 res = find_resource(qp, pkt->psn); in duplicate_request()
1185 res->cur_psn = pkt->psn; in duplicate_request()
1267 struct rxe_pkt_info *pkt = NULL; in rxe_responder() local
1293 state = get_req(qp, &pkt); in rxe_responder()
1296 state = check_psn(qp, pkt); in rxe_responder()
1299 state = check_op_seq(qp, pkt); in rxe_responder()
1302 state = check_op_valid(qp, pkt); in rxe_responder()
1305 state = check_resource(qp, pkt); in rxe_responder()
1308 state = check_length(qp, pkt); in rxe_responder()
1311 state = check_rkey(qp, pkt); in rxe_responder()
1314 state = execute(qp, pkt); in rxe_responder()
1317 state = do_complete(qp, pkt); in rxe_responder()
1320 state = read_reply(qp, pkt); in rxe_responder()
1323 state = atomic_reply(qp, pkt); in rxe_responder()
1326 state = acknowledge(qp, pkt); in rxe_responder()
1329 state = cleanup(qp, pkt); in rxe_responder()
1332 state = duplicate_request(qp, pkt); in rxe_responder()
1361 pkt->psn); in rxe_responder()