aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/apm/xgene/xgene_enet_main.h
diff options
context:
space:
mode:
authorIyappan Subramanian <isubramanian@apm.com>2016-05-13 16:53:00 -0700
committerDavid S. Miller <davem@davemloft.net>2016-05-13 21:12:06 -0400
commit3bb502f83080ad28abdd7404f29aa2fc743b28b5 (patch)
treec779ca4ce0daff518722ee0b0d96210d6c54855c /drivers/net/ethernet/apm/xgene/xgene_enet_main.h
parent1b090a4839f6c74af2dc42872c9e9dc9d7c60a99 (diff)
downloadleg-kernel-3bb502f83080ad28abdd7404f29aa2fc743b28b5.tar.gz
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 'drivers/net/ethernet/apm/xgene/xgene_enet_main.h')
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_main.h10
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 {