diff options
author | Sathya Perla <sathyap@serverengines.com> | 2009-03-24 19:40:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-24 19:40:13 -0400 |
commit | 4097f663cbe9e58de7ebed222f8af33267f297a8 (patch) | |
tree | 9cc5c70cba6e95405dbc1ae11a1bd79f96ee110c /drivers/net/benet/be.h | |
parent | 38938bfe3489394e2eed5e40c9bb8f66a2ce1405 (diff) |
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.h | 12 |
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 { | |||
100 | u32 be_tx_wrbs; /* number of tx WRBs used */ | 100 | u32 be_tx_wrbs; /* number of tx WRBs used */ |
101 | u32 be_tx_events; /* number of tx completion events */ | 101 | u32 be_tx_events; /* number of tx completion events */ |
102 | u32 be_tx_compl; /* number of tx completion entries processed */ | 102 | u32 be_tx_compl; /* number of tx completion entries processed */ |
103 | u64 be_tx_jiffies; | 103 | ulong be_tx_jiffies; |
104 | ulong be_tx_bytes; | 104 | u64 be_tx_bytes; |
105 | ulong be_tx_bytes_prev; | 105 | u64 be_tx_bytes_prev; |
106 | u32 be_tx_rate; | 106 | u32 be_tx_rate; |
107 | 107 | ||
108 | u32 cache_barrier[16]; | 108 | u32 cache_barrier[16]; |
@@ -113,9 +113,9 @@ struct be_drvr_stats { | |||
113 | u32 be_rx_compl; /* number of rx completion entries processed */ | 113 | u32 be_rx_compl; /* number of rx completion entries processed */ |
114 | u32 be_lro_hgram_data[8]; /* histogram of LRO data packets */ | 114 | u32 be_lro_hgram_data[8]; /* histogram of LRO data packets */ |
115 | u32 be_lro_hgram_ack[8]; /* histogram of LRO ACKs */ | 115 | u32 be_lro_hgram_ack[8]; /* histogram of LRO ACKs */ |
116 | u64 be_rx_jiffies; | 116 | ulong be_rx_jiffies; |
117 | ulong be_rx_bytes; | 117 | u64 be_rx_bytes; |
118 | ulong be_rx_bytes_prev; | 118 | u64 be_rx_bytes_prev; |
119 | u32 be_rx_rate; | 119 | u32 be_rx_rate; |
120 | /* number of non ether type II frames dropped where | 120 | /* number of non ether type II frames dropped where |
121 | * frame len > length field of Mac Hdr */ | 121 | * frame len > length field of Mac Hdr */ |