From ab1594e92e6765fd4af316f130eea8f5c920823d Mon Sep 17 00:00:00 2001 From: Sathya Perla Date: Mon, 25 Jul 2011 19:10:15 +0000 Subject: be2net: use stats-sync to read/write 64-bit stats 64-bit stats in be2net are written/read as follows using the stats-sync interface for safe access in 32-bit archs: 64-bit sync writer reader stats ------------------------------------------------------------------------------ tx_stats tx_stats->sync be_xmit be_get_stats64, ethtool tx-compl tx_stats->sync_compl tx-compl-processing ethtool rx-stats rx_stats->sync rx-compl-processing be_get_stats64, ethtool, eqd-update This patch is based on Stephen Hemminger's earlier patch on the same issue... Signed-off-by: Sathya Perla Signed-off-by: David S. Miller --- drivers/net/benet/be.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/net/benet/be.h') diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h index 68227fdef550..af57b51b2787 100644 --- a/drivers/net/benet/be.h +++ b/drivers/net/benet/be.h @@ -29,6 +29,7 @@ #include #include #include +#include #include "be_hw.h" @@ -174,6 +175,8 @@ struct be_tx_stats { u64 tx_compl; ulong tx_jiffies; u32 tx_stops; + struct u64_stats_sync sync; + struct u64_stats_sync sync_compl; }; struct be_tx_obj { @@ -206,6 +209,7 @@ struct be_rx_stats { u32 rx_mcast_pkts; u32 rx_compl_err; /* completions with err set */ u32 rx_pps; /* pkts per second */ + struct u64_stats_sync sync; }; struct be_rx_compl_info { @@ -518,7 +522,6 @@ static inline bool be_multi_rxq(const struct be_adapter *adapter) extern void be_cq_notify(struct be_adapter *adapter, u16 qid, bool arm, u16 num_popped); extern void be_link_status_update(struct be_adapter *adapter, bool link_up); -extern void netdev_stats_update(struct be_adapter *adapter); extern void be_parse_stats(struct be_adapter *adapter); extern int be_load_fw(struct be_adapter *adapter, u8 *func); #endif /* BE_H */ -- cgit v1.2.3