Lines Matching refs:psn
43 u32 psn, u32 pmtu) in restart_sge() argument
47 len = ((psn - wqe->psn) & QIB_PSN_MASK) * pmtu; in restart_sge()
134 qp->s_ack_rdma_psn = e->psn; in qib_make_rc_ack()
144 bth2 = e->psn & QIB_PSN_MASK; in qib_make_rc_ack()
303 qp->s_psn = wqe->psn; in qib_make_rc_req()
552 len = ((qp->s_psn - wqe->psn) & QIB_PSN_MASK) * pmtu; in qib_make_rc_req()
570 delta = (((int) bth2 - (int) wqe->psn) << 8) >> 8; in qib_make_rc_req()
736 static void reset_psn(struct rvt_qp *qp, u32 psn) in reset_psn() argument
748 if (qib_cmp24(psn, wqe->psn) <= 0) { in reset_psn()
763 diff = qib_cmp24(psn, wqe->psn); in reset_psn()
806 qp->s_psn = psn; in reset_psn()
821 void qib_restart_rc(struct rvt_qp *qp, u32 psn, int wait) in qib_restart_rc() argument
843 ibp->rvp.n_rc_resends += (qp->s_psn - psn) & QIB_PSN_MASK; in qib_restart_rc()
850 reset_psn(qp, psn); in qib_restart_rc()
857 static void reset_sending_psn(struct rvt_qp *qp, u32 psn) in reset_sending_psn() argument
865 if (qib_cmp24(psn, wqe->lpsn) <= 0) { in reset_sending_psn()
869 qp->s_sending_psn = psn + 1; in reset_sending_psn()
887 u32 psn; in qib_rc_send_complete() local
906 psn = be32_to_cpu(ohdr->bth[2]); in qib_rc_send_complete()
907 reset_sending_psn(qp, psn); in qib_rc_send_complete()
913 if ((psn & IB_BTH_REQ_ACK) && qp->s_acked != qp->s_tail && in qib_rc_send_complete()
941 static inline void update_last_psn(struct rvt_qp *qp, u32 psn) in update_last_psn() argument
943 qp->s_last_psn = psn; in update_last_psn()
984 qp->s_psn = wqe->psn; in do_rc_completion()
1007 static int do_rc_ack(struct rvt_qp *qp, u32 aeth, u32 psn, int opcode, in do_rc_ack() argument
1023 ack_psn = psn; in do_rc_ack()
1117 if (qib_cmp24(qp->s_psn, psn) <= 0) in do_rc_ack()
1118 reset_psn(qp, psn + 1); in do_rc_ack()
1122 if (qib_cmp24(qp->s_psn, psn) <= 0) { in do_rc_ack()
1124 qp->s_psn = psn + 1; in do_rc_ack()
1134 update_last_psn(qp, psn); in do_rc_ack()
1151 update_last_psn(qp, psn - 1); in do_rc_ack()
1153 ibp->rvp.n_rc_resends += (qp->s_psn - psn) & QIB_PSN_MASK; in do_rc_ack()
1155 reset_psn(qp, psn); in do_rc_ack()
1166 update_last_psn(qp, psn - 1); in do_rc_ack()
1177 qib_restart_rc(qp, psn, 0); in do_rc_ack()
1224 static void rdma_seq_err(struct rvt_qp *qp, struct qib_ibport *ibp, u32 psn, in rdma_seq_err() argument
1234 while (qib_cmp24(psn, wqe->lpsn) > 0) { in rdma_seq_err()
1274 u32 psn, u32 hdrsize, u32 pmtu, in qib_rc_rcv_resp() argument
1291 if ((qib_cmp24(psn, qp->s_sending_psn) >= 0) && in qib_rc_rcv_resp()
1314 if (qib_cmp24(psn, READ_ONCE(qp->s_next_psn)) >= 0) in qib_rc_rcv_resp()
1318 diff = qib_cmp24(psn, qp->s_last_psn); in qib_rc_rcv_resp()
1334 if (qib_cmp24(psn, qp->s_last_psn + 1) != 0) in qib_rc_rcv_resp()
1353 if (!do_rc_ack(qp, aeth, psn, opcode, val, rcd) || in qib_rc_rcv_resp()
1366 wqe, psn, pmtu); in qib_rc_rcv_resp()
1371 if (unlikely(qib_cmp24(psn, qp->s_last_psn + 1))) in qib_rc_rcv_resp()
1399 update_last_psn(qp, psn); in qib_rc_rcv_resp()
1407 if (!do_rc_ack(qp, aeth, psn, opcode, 0, rcd)) in qib_rc_rcv_resp()
1425 wqe, psn, pmtu); in qib_rc_rcv_resp()
1430 if (unlikely(qib_cmp24(psn, qp->s_last_psn + 1))) in qib_rc_rcv_resp()
1451 (void) do_rc_ack(qp, aeth, psn, in qib_rc_rcv_resp()
1461 rdma_seq_err(qp, ibp, psn, rcd); in qib_rc_rcv_resp()
1497 u32 psn, in qib_rc_rcv_error() argument
1570 if (qib_cmp24(psn, e->psn) >= 0) { in qib_rc_rcv_error()
1572 qib_cmp24(psn, e->lpsn) <= 0) in qib_rc_rcv_error()
1598 offset = ((psn - e->psn) & QIB_PSN_MASK) * in qib_rc_rcv_error()
1621 e->psn = psn; in qib_rc_rcv_error()
1646 if (!(psn & IB_BTH_REQ_ACK) || old_req) in qib_rc_rcv_error()
1666 qp->r_ack_psn = qp->s_ack_queue[i].psn - 1; in qib_rc_rcv_error()
1721 u32 psn; in qib_rc_rcv() local
1743 psn = be32_to_cpu(ohdr->bth[2]); in qib_rc_rcv()
1754 qib_rc_rcv_resp(ibp, ohdr, data, tlen, qp, opcode, psn, in qib_rc_rcv()
1760 diff = qib_cmp24(psn, qp->r_psn); in qib_rc_rcv()
1762 if (qib_rc_rcv_error(ohdr, data, qp, opcode, psn, diff, rcd)) in qib_rc_rcv()
1986 e->psn = psn; in qib_rc_rcv()
2054 e->psn = psn; in qib_rc_rcv()
2055 e->lpsn = psn; in qib_rc_rcv()
2075 qp->r_ack_psn = psn; in qib_rc_rcv()
2078 if (psn & (1 << 31)) in qib_rc_rcv()