aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2010-11-30 19:20:18 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:24:34 -0500
commit5f0e385fdafb7d6c8ded6464fa6421c735d96caf (patch)
treef589124e9cf33dc10deb6084456e68245f6dbea5 /include
parentba9cd5d095b42271588c20ccd6ddd561d0e4cc1e (diff)
[SCSI] libfc: fix statistics for FCP input/output megabytes
The statistics for InputMegabytes and OutputMegabytes are misnamed. They're accumulating bytes, not megabytes. The statistic returned via /sys must be in megabytes, however, which is what the HBA-API wants. The FCP code needs to accumulate it in bytes and then divide by 1,000,000 (not 2^20) before it presented via sysfs. This affects fcoe.ko only, not fnic. The fnic driver correctly by accumulating bytes and then converts to megabytes. I checked that libhbalinux is using the /sys file directly without conversion. BTW, qla2xxx does divide by 2^20, which I'm not fixing here. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/scsi/libfc.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 3eb3915eb557..f53c8e31d5fb 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -221,8 +221,8 @@ struct fc_rport_priv {
221 * @InputRequests: Number of input requests 221 * @InputRequests: Number of input requests
222 * @OutputRequests: Number of output requests 222 * @OutputRequests: Number of output requests
223 * @ControlRequests: Number of control requests 223 * @ControlRequests: Number of control requests
224 * @InputMegabytes: Number of received megabytes 224 * @InputBytes: Number of received bytes
225 * @OutputMegabytes: Number of transmitted megabytes 225 * @OutputBytes: Number of transmitted bytes
226 * @VLinkFailureCount: Number of virtual link failures 226 * @VLinkFailureCount: Number of virtual link failures
227 * @MissDiscAdvCount: Number of missing FIP discovery advertisement 227 * @MissDiscAdvCount: Number of missing FIP discovery advertisement
228 */ 228 */
@@ -241,8 +241,8 @@ struct fcoe_dev_stats {
241 u64 InputRequests; 241 u64 InputRequests;
242 u64 OutputRequests; 242 u64 OutputRequests;
243 u64 ControlRequests; 243 u64 ControlRequests;
244 u64 InputMegabytes; 244 u64 InputBytes;
245 u64 OutputMegabytes; 245 u64 OutputBytes;
246 u64 VLinkFailureCount; 246 u64 VLinkFailureCount;
247 u64 MissDiscAdvCount; 247 u64 MissDiscAdvCount;
248}; 248};