• Gerrit Renker's avatar
    [DCCP] ccid3: Two optimisations for sending rate recomputation · ff586298
    Gerrit Renker authored
    This performs two optimisations for the recomputation of the sending rate.
    
    1) Currently the target sending rate X_calc is recalculated whenever
    	a) the nofeedback timer expires, or
    	b) a feedback packet is received.
       In the (a) case, recomputing X_calc is redundant, since
    
        * the parameters p and RTT do not change in between the
          reception of feedback packets;
    
        * the parameter X_recv is either modified from received
          feedback or via the nofeedback timer;
    
        * a test (`p == 0') in the nofeedback timer avoids using
          a stale/undefined value of X_calc if p was previously 0.
    
    2) The nofeedback timer now only recomputes a timestamp when p == 0.
       This is according to step (4) of [RFC 3448, 4.3] and avoids
       unnecessarily determining a timestamp.
    
    A debug statement about not updating X is also removed - it helps very
    little in debugging and just clutters the logs.
    Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
    Acked-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
    ff586298
ccid3.c 36.9 KB