Lines Matching refs:psn
43 u32 psn, u32 pmtu)
47 len = ((psn - wqe->psn) & QIB_PSN_MASK) * pmtu;
134 qp->s_ack_rdma_psn = e->psn;
144 bth2 = e->psn & QIB_PSN_MASK;
302 qp->s_psn = wqe->psn;
551 len = ((qp->s_psn - wqe->psn) & QIB_PSN_MASK) * pmtu;
569 delta = (((int) bth2 - (int) wqe->psn) << 8) >> 8;
729 * @psn: the packet sequence number to restart at
735 static void reset_psn(struct rvt_qp *qp, u32 psn)
747 if (qib_cmp24(psn, wqe->psn) <= 0) {
762 diff = qib_cmp24(psn, wqe->psn);
805 qp->s_psn = psn;
820 void qib_restart_rc(struct rvt_qp *qp, u32 psn, int wait)
842 ibp->rvp.n_rc_resends += (qp->s_psn - psn) & QIB_PSN_MASK;
849 reset_psn(qp, psn);
854 * This would be psn+1 except when RDMA reads are present.
856 static void reset_sending_psn(struct rvt_qp *qp, u32 psn)
864 if (qib_cmp24(psn, wqe->lpsn) <= 0) {
868 qp->s_sending_psn = psn + 1;
886 u32 psn;
905 psn = be32_to_cpu(ohdr->bth[2]);
906 reset_sending_psn(qp, psn);
912 if ((psn & IB_BTH_REQ_ACK) && qp->s_acked != qp->s_tail &&
940 static inline void update_last_psn(struct rvt_qp *qp, u32 psn)
942 qp->s_last_psn = psn;
983 qp->s_psn = wqe->psn;
998 * @psn: the packet sequence number of the ACK
1006 static int do_rc_ack(struct rvt_qp *qp, u32 aeth, u32 psn, int opcode,
1022 ack_psn = psn;
1116 if (qib_cmp24(qp->s_psn, psn) <= 0)
1117 reset_psn(qp, psn + 1);
1121 if (qib_cmp24(qp->s_psn, psn) <= 0) {
1123 qp->s_psn = psn + 1;
1133 update_last_psn(qp, psn);
1150 update_last_psn(qp, psn - 1);
1152 ibp->rvp.n_rc_resends += (qp->s_psn - psn) & QIB_PSN_MASK;
1154 reset_psn(qp, psn);
1165 update_last_psn(qp, psn - 1);
1176 qib_restart_rc(qp, psn, 0);
1223 static void rdma_seq_err(struct rvt_qp *qp, struct qib_ibport *ibp, u32 psn,
1233 while (qib_cmp24(psn, wqe->lpsn) > 0) {
1259 * @psn: the packet sequence number for this packet
1272 u32 psn, u32 hdrsize, u32 pmtu,
1289 if ((qib_cmp24(psn, qp->s_sending_psn) >= 0) &&
1312 if (qib_cmp24(psn, READ_ONCE(qp->s_next_psn)) >= 0)
1316 diff = qib_cmp24(psn, qp->s_last_psn);
1332 if (qib_cmp24(psn, qp->s_last_psn + 1) != 0)
1351 if (!do_rc_ack(qp, aeth, psn, opcode, val, rcd) ||
1364 wqe, psn, pmtu);
1369 if (unlikely(qib_cmp24(psn, qp->s_last_psn + 1)))
1397 update_last_psn(qp, psn);
1405 if (!do_rc_ack(qp, aeth, psn, opcode, 0, rcd))
1423 wqe, psn, pmtu);
1428 if (unlikely(qib_cmp24(psn, qp->s_last_psn + 1)))
1449 (void) do_rc_ack(qp, aeth, psn,
1459 rdma_seq_err(qp, ibp, psn, rcd);
1481 * @psn: the packet sequence number for this packet
1494 u32 psn,
1567 if (qib_cmp24(psn, e->psn) >= 0) {
1569 qib_cmp24(psn, e->lpsn) <= 0)
1595 offset = ((psn - e->psn) & QIB_PSN_MASK) *
1618 e->psn = psn;
1643 if (!(psn & IB_BTH_REQ_ACK) || old_req)
1663 qp->r_ack_psn = qp->s_ack_queue[i].psn - 1;
1718 u32 psn;
1740 psn = be32_to_cpu(ohdr->bth[2]);
1751 qib_rc_rcv_resp(ibp, ohdr, data, tlen, qp, opcode, psn,
1757 diff = qib_cmp24(psn, qp->r_psn);
1759 if (qib_rc_rcv_error(ohdr, data, qp, opcode, psn, diff, rcd))
1983 e->psn = psn;
2051 e->psn = psn;
2052 e->lpsn = psn;
2072 qp->r_ack_psn = psn;
2075 if (psn & (1 << 31))