• Florian Fainelli's avatar
    net: systemport: Track per TX ring statistics · 30defeb2
    Florian Fainelli authored
    bcm_sysport_tx_reclaim_one() is currently summing TX bytes/packets in a
    way that is not SMP friendly, mutliples CPUs could run
    bcm_sysport_tx_reclaim_one() independently and still update
    stats->tx_bytes and stats->tx_packets, cloberring the other CPUs
    statistics.
    
    Fix this by tracking per TX rings the number of bytes, packets,
    dropped and errors statistics, and provide a bcm_sysport_get_nstats()
    function which aggregates everything and returns a consistent output.
    Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    30defeb2
bcmsysport.h 21.8 KB