Skip to content

Commit

Permalink
qla2xxx: Export DIF stats via debugfs
Browse files Browse the repository at this point in the history
Signed-off-by: Anil Gurumurthy <[email protected]>
Signed-off-by: Himanshu Madhani <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
  • Loading branch information
Anil Gurumurthy authored and Nicholas Bellinger committed Mar 19, 2017
1 parent be25152 commit 54b9993
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/scsi/qla2xxx/qla_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -3108,6 +3108,16 @@ struct qla_chip_state_84xx {
uint32_t gold_fw_version;
};

struct qla_dif_statistics {
uint64_t dif_input_bytes;
uint64_t dif_output_bytes;
uint64_t dif_input_requests;
uint64_t dif_output_requests;
uint32_t dif_guard_err;
uint32_t dif_ref_tag_err;
uint32_t dif_app_tag_err;
};

struct qla_statistics {
uint32_t total_isp_aborts;
uint64_t input_bytes;
Expand All @@ -3120,6 +3130,8 @@ struct qla_statistics {
uint32_t stat_max_pend_cmds;
uint32_t stat_max_qfull_cmds_alloc;
uint32_t stat_max_qfull_cmds_dropped;

struct qla_dif_statistics qla_dif_stats;
};

struct bidi_statistics {
Expand Down
15 changes: 15 additions & 0 deletions drivers/scsi/qla2xxx/qla_dfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,21 @@ qla_dfs_tgt_counters_show(struct seq_file *s, void *unused)
seq_printf(s, "num Q full sent = %lld\n",
vha->tgt_counters.num_q_full_sent);

/* DIF stats */
seq_printf(s, "DIF Inp Bytes = %lld\n",
vha->qla_stats.qla_dif_stats.dif_input_bytes);
seq_printf(s, "DIF Outp Bytes = %lld\n",
vha->qla_stats.qla_dif_stats.dif_output_bytes);
seq_printf(s, "DIF Inp Req = %lld\n",
vha->qla_stats.qla_dif_stats.dif_input_requests);
seq_printf(s, "DIF Outp Req = %lld\n",
vha->qla_stats.qla_dif_stats.dif_output_requests);
seq_printf(s, "DIF Guard err = %d\n",
vha->qla_stats.qla_dif_stats.dif_guard_err);
seq_printf(s, "DIF Ref tag err = %d\n",
vha->qla_stats.qla_dif_stats.dif_ref_tag_err);
seq_printf(s, "DIF App tag err = %d\n",
vha->qla_stats.qla_dif_stats.dif_app_tag_err);
return 0;
}

Expand Down

0 comments on commit 54b9993

Please sign in to comment.