diff options
author | Sathya Perla <sathya.perla@emulex.com> | 2011-07-25 23:10:15 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-01 11:12:00 +0400 |
commit | ab1594e92e6765fd4af316f130eea8f5c920823d (patch) | |
tree | 9631e8ef947f2db4635e56387d18730b8b4b7206 /drivers/net/benet/be.h | |
parent | ac124ff973e2780279774a30dd924affef758a51 (diff) | |
download | linux-ab1594e92e6765fd4af316f130eea8f5c920823d.tar.xz |
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 <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be.h')
-rw-r--r-- | drivers/net/benet/be.h | 5 |
1 files changed, 4 insertions, 1 deletions
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 <linux/interrupt.h> #include <linux/firmware.h> #include <linux/slab.h> +#include <linux/u64_stats_sync.h> #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 */ |