aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_fcpim.h
diff options
context:
space:
mode:
authorKrishna Gudipati <kgudipat@brocade.com>2011-07-20 20:01:52 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-07-27 06:47:45 -0400
commit42a8e6e298f39518445785c53a16357267db37ef (patch)
tree11e02e5579c5eef3cb5226b881f83808f2e862ca /drivers/scsi/bfa/bfa_fcpim.h
parentf2ee76017b30c84f128dfbf716950ffc0e4d949a (diff)
[SCSI] bfa: Add support for IO profiling.
- Made changes to support IO profiling. - Added support to configure and query IO profiling info. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfa_fcpim.h')
-rw-r--r--drivers/scsi/bfa/bfa_fcpim.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/drivers/scsi/bfa/bfa_fcpim.h b/drivers/scsi/bfa/bfa_fcpim.h
index 57b695ad4ee5..c224987b9c30 100644
--- a/drivers/scsi/bfa/bfa_fcpim.h
+++ b/drivers/scsi/bfa/bfa_fcpim.h
@@ -79,14 +79,22 @@ bfa_ioim_get_index(u32 n) {
79 if (n >= (1UL)<<22) 79 if (n >= (1UL)<<22)
80 return BFA_IOBUCKET_MAX - 1; 80 return BFA_IOBUCKET_MAX - 1;
81 n >>= 8; 81 n >>= 8;
82 if (n >= (1UL)<<16) 82 if (n >= (1UL)<<16) {
83 n >>= 16; pos += 16; 83 n >>= 16;
84 if (n >= 1 << 8) 84 pos += 16;
85 n >>= 8; pos += 8; 85 }
86 if (n >= 1 << 4) 86 if (n >= 1 << 8) {
87 n >>= 4; pos += 4; 87 n >>= 8;
88 if (n >= 1 << 2) 88 pos += 8;
89 n >>= 2; pos += 2; 89 }
90 if (n >= 1 << 4) {
91 n >>= 4;
92 pos += 4;
93 }
94 if (n >= 1 << 2) {
95 n >>= 2;
96 pos += 2;
97 }
90 if (n >= 1 << 1) 98 if (n >= 1 << 1)
91 pos += 1; 99 pos += 1;
92 100
@@ -297,6 +305,8 @@ bfa_status_t bfa_fcpim_port_iostats(struct bfa_s *bfa,
297 struct bfa_itnim_iostats_s *stats, u8 lp_tag); 305 struct bfa_itnim_iostats_s *stats, u8 lp_tag);
298void bfa_fcpim_add_stats(struct bfa_itnim_iostats_s *fcpim_stats, 306void bfa_fcpim_add_stats(struct bfa_itnim_iostats_s *fcpim_stats,
299 struct bfa_itnim_iostats_s *itnim_stats); 307 struct bfa_itnim_iostats_s *itnim_stats);
308bfa_status_t bfa_fcpim_profile_on(struct bfa_s *bfa, u32 time);
309bfa_status_t bfa_fcpim_profile_off(struct bfa_s *bfa);
300 310
301#define bfa_fcpim_ioredirect_enabled(__bfa) \ 311#define bfa_fcpim_ioredirect_enabled(__bfa) \
302 (((struct bfa_fcpim_s *)(BFA_FCPIM(__bfa)))->ioredirect) 312 (((struct bfa_fcpim_s *)(BFA_FCPIM(__bfa)))->ioredirect)