diff options
author | Iyappan Subramanian <isubramanian@apm.com> | 2016-05-13 16:53:00 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-13 21:12:06 -0400 |
commit | 3bb502f83080ad28abdd7404f29aa2fc743b28b5 (patch) | |
tree | c779ca4ce0daff518722ee0b0d96210d6c54855c /drivers/net/ethernet/apm/xgene/xgene_enet_main.h | |
parent | drivers: net: xgene: fix ununiform latency across queues (diff) | |
download | linux-dev-3bb502f83080ad28abdd7404f29aa2fc743b28b5.tar.xz linux-dev-3bb502f83080ad28abdd7404f29aa2fc743b28b5.zip |
drivers: net: xgene: fix statistics counters race condition
This patch fixes the race condition on updating the statistics
counters by moving the counters to the ring structure.
Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Tested-by: Toan Le <toanle@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h index ab163885fd12..9d9cf445148c 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h @@ -121,6 +121,16 @@ struct xgene_enet_desc_ring { struct xgene_enet_raw_desc16 *raw_desc16; }; __le64 *exp_bufs; + u64 tx_packets; + u64 tx_bytes; + u64 rx_packets; + u64 rx_bytes; + u64 rx_dropped; + u64 rx_errors; + u64 rx_length_errors; + u64 rx_crc_errors; + u64 rx_frame_errors; + u64 rx_fifo_errors; }; struct xgene_mac_ops { |