Re: Question about AETH_NAK_PSN_SEQ_ERROR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




在 2022/5/14 21:35, Chengguang Xu 写道:
Hello Folks,


There is a logic(below code) in check_ack() in rxe_comp.c,  the case (AETH_NAK_PSN_SEQ_ERROR) indicates sending side received a nak ack which means opposite side had an psn seq error(expected psn < received psn). I don't fully understand the comment(/* a nak implicitly acks all packets with psns before */) here,
could someone give me a hint for this?

Carefully checking rxe_resp.c and found the psn in the ack (with AETH_NAK_PSN_SEQ_ERROR) is resp.psn not received pkt->psn.  :-)




Also, set qp->comp.psn as pkt->psn will skip some psns(from qp->comp.psn to pkt->psn) in the retry, is it correct?

Many thanks in advance!
Chengguang

-------------------------

  case AETH_NAK:
            switch (syn) {
            case AETH_NAK_PSN_SEQ_ERROR:
                /* a nak implicitly acks all packets with psns
                 * before
                 */
                if (psn_compare(pkt->psn, qp->comp.psn) > 0) {
                    rxe_counter_inc(rxe,
                            RXE_CNT_RCV_SEQ_ERR);
                    qp->comp.psn = pkt->psn;
                    if (qp->req.wait_psn) {
                        qp->req.wait_psn = 0;
                        rxe_run_task(&qp->req.task, 0);
                    }
                }
                return COMPST_ERROR_RETRY;









[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux