]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net: systemport: Track per TX ring statistics
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 23 Mar 2017 17:36:46 +0000 (10:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Mar 2017 19:53:14 +0000 (12:53 -0700)
commit30defeb2fb0a6219fb2c3575deb2da207b214f86
tree22ac2f988db67987a67cf9627b1284777fd9a458
parent12459cbd98e7acc5748fa879b86bb4d0f8dc4aef
net: systemport: Track per TX ring statistics

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: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bcmsysport.c
drivers/net/ethernet/broadcom/bcmsysport.h