summaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be.h
diff options
context:
space:
mode:
authorSathya Perla <sathyap@serverengines.com>2009-03-24 16:40:13 -0700
committerDavid S. Miller <davem@davemloft.net>2009-03-24 16:40:13 -0700
commit4097f663cbe9e58de7ebed222f8af33267f297a8 (patch)
tree9cc5c70cba6e95405dbc1ae11a1bd79f96ee110c /drivers/net/benet/be.h
parent38938bfe3489394e2eed5e40c9bb8f66a2ce1405 (diff)
downloadlinux-4097f663cbe9e58de7ebed222f8af33267f297a8.tar.bz2
be2net: cleanup rx/tx rate calculations
Hi, Pls accept this patch to cleanup rx/tx rate calculations as follows: - check for jiffies wraparound - remove typecast of a denominator - do rate calculation only in workqueue context periodically Signed-off-by: Sathya Perla <sathyap@serverengines.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.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index f327be57ca96..c49ddd08b2aa 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -100,9 +100,9 @@ struct be_drvr_stats {
u32 be_tx_wrbs; /* number of tx WRBs used */
u32 be_tx_events; /* number of tx completion events */
u32 be_tx_compl; /* number of tx completion entries processed */
- u64 be_tx_jiffies;
- ulong be_tx_bytes;
- ulong be_tx_bytes_prev;
+ ulong be_tx_jiffies;
+ u64 be_tx_bytes;
+ u64 be_tx_bytes_prev;
u32 be_tx_rate;
u32 cache_barrier[16];
@@ -113,9 +113,9 @@ struct be_drvr_stats {
u32 be_rx_compl; /* number of rx completion entries processed */
u32 be_lro_hgram_data[8]; /* histogram of LRO data packets */
u32 be_lro_hgram_ack[8]; /* histogram of LRO ACKs */
- u64 be_rx_jiffies;
- ulong be_rx_bytes;
- ulong be_rx_bytes_prev;
+ ulong be_rx_jiffies;
+ u64 be_rx_bytes;
+ u64 be_rx_bytes_prev;
u32 be_rx_rate;
/* number of non ether type II frames dropped where
* frame len > length field of Mac Hdr */