• Eric Dumazet's avatar
    bonding: refine bond_fold_stats() wrap detection · 142c6594
    Eric Dumazet authored
    Some device drivers reset their stats at down/up events, possibly
    fooling bonding stats, since they operate with relative deltas.
    
    It is nearly not possible to fix drivers, since some of them compute the
    tx/rx counters based on per rx/tx queue stats, and the queues can be
    reconfigured (ethtool -L) between the down/up sequence.
    
    Lets avoid accumulating 'negative' values that render bonding stats
    useless.
    
    It is better to lose small deltas, assuming the bonding stats are
    fetched at a reasonable frequency.
    
    Fixes: 5f0c5f73 ("bonding: make global bonding stats more reliable")
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    142c6594
bond_main.c 133 KB