Lines Matching defs:packet

128 static void tid_rdma_rcv_err(struct hfi1_packet *packet,
131 static void update_r_next_psn_fecn(struct hfi1_packet *packet,
1732 * entire packet, nothing else should even look at the MR.
1742 /* Construct the TID RDMA READ REQ packet header */
1878 /* Build the packet header */
1891 struct hfi1_packet *packet,
1905 /* payload length = packet length - (header length + ICRC length) */
1906 pktlen = packet->tlen - (packet->hlen + 4);
1909 memcpy(flow->tid_entry, packet->ebuf, pktlen);
1985 static int tid_rdma_rcv_error(struct hfi1_packet *packet,
2062 if (tid_rdma_rcv_read_request(qp, e, packet, ohdr, bth0, psn,
2215 void hfi1_rc_rcv_tid_rdma_read_req(struct hfi1_packet *packet)
2217 /* HANDLER FOR TID RDMA READ REQUEST packet (Responder side)*/
2230 struct hfi1_ctxtdata *rcd = packet->rcd;
2231 struct rvt_qp *qp = packet->qp;
2233 struct ib_other_headers *ohdr = packet->ohdr;
2246 if (hfi1_ruc_check_hdr(ibp, packet))
2249 fecn = process_ecn(qp, packet);
2268 tid_rdma_rcv_err(packet, ohdr, qp, psn, diff, fecn);
2295 if (tid_rdma_rcv_read_request(qp, e, packet, ohdr, bth0, psn, vaddr,
2440 void hfi1_rc_rcv_tid_rdma_read_resp(struct hfi1_packet *packet)
2442 /* HANDLER FOR TID RDMA READ RESPONSE packet (Requestor side */
2451 struct ib_other_headers *ohdr = packet->ohdr;
2452 struct rvt_qp *qp = packet->qp;
2454 struct hfi1_ctxtdata *rcd = packet->rcd;
2463 fecn = process_ecn(qp, packet);
2477 update_r_next_psn_fecn(packet, priv, rcd, flow, fecn);
2483 * Copy the payload to destination buffer if this packet is
2484 * delivered as an eager packet due to RSM rule and FECN.
2487 * packet of each segment that has SH bit cleared.
2489 if (fecn && packet->etype == RHF_RCV_TYPE_EAGER) {
2492 u32 tlen = packet->tlen;
2493 u16 hdrsize = packet->hlen;
2494 u8 pad = packet->pad;
2495 u8 extra_bytes = pad + packet->extra_byte +
2504 rvt_copy_sge(qp, &ss, packet->payload, pmtu, false,
2506 /* Raise the sw sequence check flag for next packet */
2602 static bool tid_rdma_tid_err(struct hfi1_packet *packet, u8 rcv_type)
2604 struct rvt_qp *qp = packet->qp;
2614 * Eager buffer (packet that have payload) are TID RDMA WRITE
2623 /* Since no payload is delivered, just drop the packet */
2650 * Return true if the last packet for a segment has been received and it is
2653 * The caller must hold the packet->qp->r_lock and the rcu_read_lock.
2656 struct hfi1_packet *packet, u8 rcv_type,
2658 __must_hold(&packet->qp->r_lock) __must_hold(RCU)
2667 struct rvt_qp *qp = packet->qp;
2678 /* If the psn is out of valid range, drop the packet */
2764 /* Drop the packet.*/
2768 * If a response packet for a restarted
2776 /* Drop the packet.*/
2782 * this is the last packet in the segment, tell
2783 * the caller to process it as a normal packet.
2816 * generation mismatch, drop this stale packet.
2847 struct hfi1_packet *packet)
2852 u8 rcv_type = rhf_rcv_type(packet->rhf);
2853 u8 rte = rhf_rcv_type_err(packet->rhf);
2854 struct ib_header *hdr = packet->hdr;
2870 packet->rhf);
2871 if (packet->rhf & RHF_ICRC_ERR)
2874 packet->ohdr = &hdr->u.oth;
2875 ohdr = packet->ohdr;
2876 trace_input_ibhdr(rcd->dd, packet, !!(rhf_dc_info(packet->rhf)));
2892 packet->qp = qp;
2901 if (packet->rhf & RHF_TID_ERR) {
2903 u32 tlen = rhf_pkt_len(packet->rhf); /* in bytes */
2905 /* Sanity check packet */
2916 if (tid_rdma_tid_err(packet, rcv_type))
2924 ret = handle_read_kdeth_eflags(rcd, packet, rcv_type, rte, psn,
2968 * expected PSN, NAK the packet.
2984 * is the last packet in the segment, tell the
2985 * caller to process it as a normal packet.
3486 * before the RNR NAK packet. When the requester receives the
3487 * RNR NAK packet, it will restart with qp->s_last_psn + 1,
3644 void hfi1_rc_rcv_tid_rdma_write_req(struct hfi1_packet *packet)
3646 /* HANDLER FOR TID RDMA WRITE REQUEST packet (Responder side)*/
3659 struct hfi1_ctxtdata *rcd = packet->rcd;
3660 struct rvt_qp *qp = packet->qp;
3662 struct ib_other_headers *ohdr = packet->ohdr;
3675 if (hfi1_ruc_check_hdr(ibp, packet))
3678 fecn = process_ecn(qp, packet);
3695 tid_rdma_rcv_err(packet, ohdr, qp, psn, diff, fecn);
3899 * entire packet, nothing else should even look at the MR.
3912 /* Construct the TID RDMA WRITE RESP packet header */
4027 void hfi1_rc_rcv_tid_rdma_write_resp(struct hfi1_packet *packet)
4029 /* HANDLER FOR TID RDMA WRITE RESPONSE packet (Requestor side */
4040 struct ib_other_headers *ohdr = packet->ohdr;
4041 struct rvt_qp *qp = packet->qp;
4043 struct hfi1_ctxtdata *rcd = packet->rcd;
4052 fecn = process_ecn(qp, packet);
4071 * If we are waiting for a particular packet sequence number
4088 * behind, don't overwrite segments. Just drop the packet and
4096 * packet checks because it will end up updating the QP state.
4097 * Therefore, anything that would prevent the packet from
4125 /* payload length = packet length - (header length + ICRC length) */
4126 pktlen = packet->tlen - (packet->hlen + 4);
4131 memcpy(flow->tid_entry, packet->ebuf, pktlen);
4269 void hfi1_rc_rcv_tid_rdma_write_data(struct hfi1_packet *packet)
4271 struct rvt_qp *qp = packet->qp;
4274 struct ib_other_headers *ohdr = packet->ohdr;
4284 fecn = process_ecn(qp, packet);
4289 * All error handling should be done by now. If we are here, the packet
4297 update_r_next_psn_fecn(packet, priv, rcd, flow, fecn);
4304 * Copy the payload to destination buffer if this packet is
4305 * delivered as an eager packet due to RSM rule and FECN.
4308 * packet of each segment that has SH bit cleared.
4310 if (fecn && packet->etype == RHF_RCV_TYPE_EAGER) {
4313 u32 tlen = packet->tlen;
4314 u16 hdrsize = packet->hlen;
4315 u8 pad = packet->pad;
4316 u8 extra_bytes = pad + packet->extra_byte +
4338 rvt_copy_sge(qp, &ss, packet->payload, pmtu, false,
4340 /* Raise the sw sequence check flag for next packet */
4472 * DATA packet after a previous RESYNC.
4497 void hfi1_rc_rcv_tid_rdma_ack(struct hfi1_packet *packet)
4499 struct ib_other_headers *ohdr = packet->ohdr;
4500 struct rvt_qp *qp = packet->qp;
4510 process_ecn(qp, packet);
4605 * RESYNC request or wait for any more TID ACK packet.
4661 * Renumber all packet sequence number ranges
4827 /* Only send one packet (the RESYNC) */
4869 void hfi1_rc_rcv_tid_rdma_resync(struct hfi1_packet *packet)
4871 struct ib_other_headers *ohdr = packet->ohdr;
4872 struct rvt_qp *qp = packet->qp;
4884 fecn = process_ecn(qp, packet);
4893 * RESYNC packet contains the "next" generation and can only be
4980 * Call this function when the last TID RDMA WRITE DATA packet for a request
5093 * 3.1 Build TID RDMA WRITE DATA packet.
5094 * 3.2 If last packet in segment:
5379 /* insure a pre-built packet is handled */
5382 /* Check for a constructed packet to be sent. */
5391 * If the packet cannot be sent now, return and
5501 static void tid_rdma_rcv_err(struct hfi1_packet *packet,
5507 tid_rdma_rcv_error(packet, ohdr, qp, psn, diff);
5515 static void update_r_next_psn_fecn(struct hfi1_packet *packet,
5522 * If a start/middle packet is delivered here due to
5525 if (fecn && packet->etype == RHF_RCV_TYPE_EAGER &&