• G
    [TFRC]: Ringbuffer to track loss interval history · 8a9c7e92
    Gerrit Renker 提交于
    A ringbuffer-based implementation of loss interval history is easier to
    maintain, allocate, and update.
    
    The `swap' routine to keep the RX history sorted is due to and was written
    by Arnaldo Carvalho de Melo, simplifying an earlier macro-based variant.
    
    Details:
     * access to the Loss Interval Records via macro wrappers (with safety checks);
     * simplified, on-demand allocation of entries (no extra memory consumption on
       lossless links); cache allocation is local to the module / exported as service;
     * provision of RFC-compliant algorithm to re-compute average loss interval;
     * provision of comprehensive, new loss detection algorithm
     	- support for all cases of loss, including re-ordered/duplicate packets;
     	- waiting for NDUPACK=3 packets to fill the hole;
    	- updating loss records when a late-arriving packet fills a hole.
    Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
    Signed-off-by: NIan McDonald <ian.mcdonald@jandi.co.nz>
    Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    8a9c7e92
loss_interval.c 12.0 KB