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,
1725 * entire packet, nothing else should even look at the MR.
1735 /* Construct the TID RDMA READ REQ packet header */
1871 /* Build the packet header */
1884 struct hfi1_packet *packet,
1898 /* payload length = packet length - (header length + ICRC length) */
1899 pktlen = packet->tlen - (packet->hlen + 4);
1902 memcpy(flow->tid_entry, packet->ebuf, pktlen);
1978 static int tid_rdma_rcv_error(struct hfi1_packet *packet,
2055 if (tid_rdma_rcv_read_request(qp, e, packet, ohdr, bth0, psn,
2208 void hfi1_rc_rcv_tid_rdma_read_req(struct hfi1_packet *packet)
2210 /* HANDLER FOR TID RDMA READ REQUEST packet (Responder side)*/
2223 struct hfi1_ctxtdata *rcd = packet->rcd;
2224 struct rvt_qp *qp = packet->qp;
2226 struct ib_other_headers *ohdr = packet->ohdr;
2239 if (hfi1_ruc_check_hdr(ibp, packet))
2242 fecn = process_ecn(qp, packet);
2261 tid_rdma_rcv_err(packet, ohdr, qp, psn, diff, fecn);
2288 if (tid_rdma_rcv_read_request(qp, e, packet, ohdr, bth0, psn, vaddr,
2433 void hfi1_rc_rcv_tid_rdma_read_resp(struct hfi1_packet *packet)
2435 /* HANDLER FOR TID RDMA READ RESPONSE packet (Requestor side */
2444 struct ib_other_headers *ohdr = packet->ohdr;
2445 struct rvt_qp *qp = packet->qp;
2447 struct hfi1_ctxtdata *rcd = packet->rcd;
2456 fecn = process_ecn(qp, packet);
2470 update_r_next_psn_fecn(packet, priv, rcd, flow, fecn);
2476 * Copy the payload to destination buffer if this packet is
2477 * delivered as an eager packet due to RSM rule and FECN.
2480 * packet of each segment that has SH bit cleared.
2482 if (fecn && packet->etype == RHF_RCV_TYPE_EAGER) {
2485 u32 tlen = packet->tlen;
2486 u16 hdrsize = packet->hlen;
2487 u8 pad = packet->pad;
2488 u8 extra_bytes = pad + packet->extra_byte +
2497 rvt_copy_sge(qp, &ss, packet->payload, pmtu, false,
2499 /* Raise the sw sequence check flag for next packet */
2595 static bool tid_rdma_tid_err(struct hfi1_packet *packet, u8 rcv_type)
2597 struct rvt_qp *qp = packet->qp;
2607 * Eager buffer (packet that have payload) are TID RDMA WRITE
2616 /* Since no payload is delivered, just drop the packet */
2643 * Return true if the last packet for a segment has been received and it is
2646 * The caller must hold the packet->qp->r_lock and the rcu_read_lock.
2649 struct hfi1_packet *packet, u8 rcv_type,
2651 __must_hold(&packet->qp->r_lock) __must_hold(RCU)
2660 struct rvt_qp *qp = packet->qp;
2671 /* If the psn is out of valid range, drop the packet */
2757 /* Drop the packet.*/
2761 * If a response packet for a restarted
2769 /* Drop the packet.*/
2775 * this is the last packet in the segment, tell
2776 * the caller to process it as a normal packet.
2809 * generation mismatch, drop this stale packet.
2839 struct hfi1_packet *packet)
2844 u8 rcv_type = rhf_rcv_type(packet->rhf);
2845 u8 rte = rhf_rcv_type_err(packet->rhf);
2846 struct ib_header *hdr = packet->hdr;
2862 packet->rhf);
2863 if (packet->rhf & RHF_ICRC_ERR)
2866 packet->ohdr = &hdr->u.oth;
2867 ohdr = packet->ohdr;
2868 trace_input_ibhdr(rcd->dd, packet, !!(rhf_dc_info(packet->rhf)));
2884 packet->qp = qp;
2893 if (packet->rhf & RHF_TID_ERR) {
2895 u32 tlen = rhf_pkt_len(packet->rhf); /* in bytes */
2897 /* Sanity check packet */
2908 if (tid_rdma_tid_err(packet, rcv_type))
2916 ret = handle_read_kdeth_eflags(rcd, packet, rcv_type, rte, psn,
2960 * expected PSN, NAK the packet.
2976 * is the last packet in the segment, tell the
2977 * caller to process it as a normal packet.
3474 * before the RNR NAK packet. When the requester receives the
3475 * RNR NAK packet, it will restart with qp->s_last_psn + 1,
3632 void hfi1_rc_rcv_tid_rdma_write_req(struct hfi1_packet *packet)
3634 /* HANDLER FOR TID RDMA WRITE REQUEST packet (Responder side)*/
3647 struct hfi1_ctxtdata *rcd = packet->rcd;
3648 struct rvt_qp *qp = packet->qp;
3650 struct ib_other_headers *ohdr = packet->ohdr;
3663 if (hfi1_ruc_check_hdr(ibp, packet))
3666 fecn = process_ecn(qp, packet);
3683 tid_rdma_rcv_err(packet, ohdr, qp, psn, diff, fecn);
3887 * entire packet, nothing else should even look at the MR.
3900 /* Construct the TID RDMA WRITE RESP packet header */
4015 void hfi1_rc_rcv_tid_rdma_write_resp(struct hfi1_packet *packet)
4017 /* HANDLER FOR TID RDMA WRITE RESPONSE packet (Requestor side */
4028 struct ib_other_headers *ohdr = packet->ohdr;
4029 struct rvt_qp *qp = packet->qp;
4031 struct hfi1_ctxtdata *rcd = packet->rcd;
4040 fecn = process_ecn(qp, packet);
4059 * If we are waiting for a particular packet sequence number
4076 * behind, don't overwrite segments. Just drop the packet and
4084 * packet checks because it will end up updating the QP state.
4085 * Therefore, anything that would prevent the packet from
4113 /* payload length = packet length - (header length + ICRC length) */
4114 pktlen = packet->tlen - (packet->hlen + 4);
4119 memcpy(flow->tid_entry, packet->ebuf, pktlen);
4257 void hfi1_rc_rcv_tid_rdma_write_data(struct hfi1_packet *packet)
4259 struct rvt_qp *qp = packet->qp;
4262 struct ib_other_headers *ohdr = packet->ohdr;
4272 fecn = process_ecn(qp, packet);
4277 * All error handling should be done by now. If we are here, the packet
4285 update_r_next_psn_fecn(packet, priv, rcd, flow, fecn);
4292 * Copy the payload to destination buffer if this packet is
4293 * delivered as an eager packet due to RSM rule and FECN.
4296 * packet of each segment that has SH bit cleared.
4298 if (fecn && packet->etype == RHF_RCV_TYPE_EAGER) {
4301 u32 tlen = packet->tlen;
4302 u16 hdrsize = packet->hlen;
4303 u8 pad = packet->pad;
4304 u8 extra_bytes = pad + packet->extra_byte +
4326 rvt_copy_sge(qp, &ss, packet->payload, pmtu, false,
4328 /* Raise the sw sequence check flag for next packet */
4460 * DATA packet after a previous RESYNC.
4485 void hfi1_rc_rcv_tid_rdma_ack(struct hfi1_packet *packet)
4487 struct ib_other_headers *ohdr = packet->ohdr;
4488 struct rvt_qp *qp = packet->qp;
4498 process_ecn(qp, packet);
4593 * RESYNC request or wait for any more TID ACK packet.
4649 * Renumber all packet sequence number ranges
4815 /* Only send one packet (the RESYNC) */
4857 void hfi1_rc_rcv_tid_rdma_resync(struct hfi1_packet *packet)
4859 struct ib_other_headers *ohdr = packet->ohdr;
4860 struct rvt_qp *qp = packet->qp;
4872 fecn = process_ecn(qp, packet);
4881 * RESYNC packet contains the "next" generation and can only be
4968 * Call this function when the last TID RDMA WRITE DATA packet for a request
5081 * 3.1 Build TID RDMA WRITE DATA packet.
5082 * 3.2 If last packet in segment:
5367 /* insure a pre-built packet is handled */
5370 /* Check for a constructed packet to be sent. */
5379 * If the packet cannot be sent now, return and
5489 static void tid_rdma_rcv_err(struct hfi1_packet *packet,
5495 tid_rdma_rcv_error(packet, ohdr, qp, psn, diff);
5503 static void update_r_next_psn_fecn(struct hfi1_packet *packet,
5510 * If a start/middle packet is delivered here due to
5513 if (fecn && packet->etype == RHF_RCV_TYPE_EAGER &&