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;
303 qp->s_psn = wqe->psn;
552 len = ((qp->s_psn - wqe->psn) & QIB_PSN_MASK) * pmtu;
570 delta = (((int) bth2 - (int) wqe->psn) << 8) >> 8;
730 * @psn: the packet sequence number to restart at
736 static void reset_psn(struct rvt_qp *qp, u32 psn)
748 if (qib_cmp24(psn, wqe->psn) <= 0) {
763 diff = qib_cmp24(psn, wqe->psn);
806 qp->s_psn = psn;
821 void qib_restart_rc(struct rvt_qp *qp, u32 psn, int wait)
843 ibp->rvp.n_rc_resends += (qp->s_psn - psn) & QIB_PSN_MASK;
850 reset_psn(qp, psn);
855 * This would be psn+1 except when RDMA reads are present.
857 static void reset_sending_psn(struct rvt_qp *qp, u32 psn)
865 if (qib_cmp24(psn, wqe->lpsn) <= 0) {
869 qp->s_sending_psn = psn + 1;
887 u32 psn;
906 psn = be32_to_cpu(ohdr->bth[2]);
907 reset_sending_psn(qp, psn);
913 if ((psn & IB_BTH_REQ_ACK) && qp->s_acked != qp->s_tail &&
941 static inline void update_last_psn(struct rvt_qp *qp, u32 psn)
943 qp->s_last_psn = psn;
984 qp->s_psn = wqe->psn;
999 * @psn: the packet sequence number of the ACK
1007 static int do_rc_ack(struct rvt_qp *qp, u32 aeth, u32 psn, int opcode,
1023 ack_psn = psn;
1117 if (qib_cmp24(qp->s_psn, psn) <= 0)
1118 reset_psn(qp, psn + 1);
1122 if (qib_cmp24(qp->s_psn, psn) <= 0) {
1124 qp->s_psn = psn + 1;
1134 update_last_psn(qp, psn);
1151 update_last_psn(qp, psn - 1);
1153 ibp->rvp.n_rc_resends += (qp->s_psn - psn) & QIB_PSN_MASK;
1155 reset_psn(qp, psn);
1166 update_last_psn(qp, psn - 1);
1177 qib_restart_rc(qp, psn, 0);
1224 static void rdma_seq_err(struct rvt_qp *qp, struct qib_ibport *ibp, u32 psn,
1234 while (qib_cmp24(psn, wqe->lpsn) > 0) {
1260 * @psn: the packet sequence number for this packet
1274 u32 psn, u32 hdrsize, u32 pmtu,
1291 if ((qib_cmp24(psn, qp->s_sending_psn) >= 0) &&
1314 if (qib_cmp24(psn, READ_ONCE(qp->s_next_psn)) >= 0)
1318 diff = qib_cmp24(psn, qp->s_last_psn);
1334 if (qib_cmp24(psn, qp->s_last_psn + 1) != 0)
1353 if (!do_rc_ack(qp, aeth, psn, opcode, val, rcd) ||
1366 wqe, psn, pmtu);
1371 if (unlikely(qib_cmp24(psn, qp->s_last_psn + 1)))
1399 update_last_psn(qp, psn);
1407 if (!do_rc_ack(qp, aeth, psn, opcode, 0, rcd))
1425 wqe, psn, pmtu);
1430 if (unlikely(qib_cmp24(psn, qp->s_last_psn + 1)))
1451 (void) do_rc_ack(qp, aeth, psn,
1461 rdma_seq_err(qp, ibp, psn, rcd);
1483 * @psn: the packet sequence number for this packet
1497 u32 psn,
1570 if (qib_cmp24(psn, e->psn) >= 0) {
1572 qib_cmp24(psn, e->lpsn) <= 0)
1598 offset = ((psn - e->psn) & QIB_PSN_MASK) *
1621 e->psn = psn;
1646 if (!(psn & IB_BTH_REQ_ACK) || old_req)
1666 qp->r_ack_psn = qp->s_ack_queue[i].psn - 1;
1721 u32 psn;
1743 psn = be32_to_cpu(ohdr->bth[2]);
1754 qib_rc_rcv_resp(ibp, ohdr, data, tlen, qp, opcode, psn,
1760 diff = qib_cmp24(psn, qp->r_psn);
1762 if (qib_rc_rcv_error(ohdr, data, qp, opcode, psn, diff, rcd))
1986 e->psn = psn;
2054 e->psn = psn;
2055 e->lpsn = psn;
2075 qp->r_ack_psn = psn;
2078 if (psn & (1 << 31))