• Alessandro Rubini's avatar
    pdelay: rework and extend prev commit · 31f08f19
    Alessandro Rubini authored
    The previous commit is not enough as a fix.  This may happen:
    
        - we invalidate stamps after processing them
        - we send request
        - get reply, loose reply-fup
        - send request
        - loose reply, get f-up
    
    So we now invalidate when sending the request. And invalidate t4 alone
    as the beautifulness and symmetry of the previous commit is lost
    anyways.
    
    Note: there no need to invalidate stamps in e2e mode, because checking
    the sequence number to validate RX frames is enough.  But here all
    replies match the sequence number, so the problem is not caught and
    stamps from different tuples are mixed.
    
    Example beofre this commit, with trimmed stamps (was 1497283863):
    
       diag-frames-1-wr1: SENT 54 bytes at 863.333173928 (pdelay_req)
       diag-frames-1-wr1: RECV 54 bytes at 863.334158796 (type 3, pdelay_resp)
       diag-frames-1-wr1: Drop received frame
       diag-frames-1-wr1: SENT 54 bytes at 864.479336104 (pdelay_req)
       diag-frames-1-wr1: Drop received frame
       diag-frames-1-wr1: RECV 54 bytes at 864.481095164 (type a, presp_follow_up)
    
       diag-servo-2-wr1: servo:t3 = 864:479336104:0
       diag-servo-2-wr1: servo:t4 = 863:333174267:586
       diag-servo-2-wr1: servo:t5 = 864:480295312:0
       diag-servo-2-wr1: servo:t6 = 863:334158796:773
       diag-servo-2-wr1: ->mdelay = -2:-292298352:359
    Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    31f08f19
Name
Last commit
Last update
arch-bare-i386 Loading commit data...
arch-bare-x86-64 Loading commit data...
arch-sim Loading commit data...
arch-unix Loading commit data...
arch-wrpc Loading commit data...
arch-wrs Loading commit data...
configs Loading commit data...
doc Loading commit data...
etc Loading commit data...
include/ppsi Loading commit data...
lib Loading commit data...
lib-bare Loading commit data...
pp_printf Loading commit data...
proto-ext-whiterabbit Loading commit data...
proto-standard Loading commit data...
scripts Loading commit data...
time-bare Loading commit data...
time-sim Loading commit data...
time-unix Loading commit data...
time-wrpc Loading commit data...
time-wrs Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LIB Loading commit data...
Kconfig Loading commit data...
MAKEALL Loading commit data...
Makefile Loading commit data...
Makefile.kconfig Loading commit data...
diag.c Loading commit data...
fsm.c Loading commit data...
msgtype.c Loading commit data...
timeout.c Loading commit data...