Skip to content

Commit

Permalink
[SCSI] fc: add some more FC specific stats to fc_host
Browse files Browse the repository at this point in the history
The libfc provides more flexibility and with that
we can monitor some more FC specific stats for
FC exches or FCP error cases, this patch add
such new FC stats.

The patch adds *only* FC specific new stats to
existing fc_host attribute container.

Added stats names are self explanatory as
existing FC stats already has, however anyway
still added commentary along their definition
to describe them.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Acked-by : Robert Love <robert.w.love@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Vasu Dev authored and James Bottomley committed Jul 20, 2012
1 parent 85efc72 commit e58abb0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
18 changes: 18 additions & 0 deletions drivers/scsi/scsi_transport_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1744,6 +1744,15 @@ fc_host_statistic(fcp_output_requests);
fc_host_statistic(fcp_control_requests);
fc_host_statistic(fcp_input_megabytes);
fc_host_statistic(fcp_output_megabytes);
fc_host_statistic(fcp_packet_alloc_failures);
fc_host_statistic(fcp_packet_aborts);
fc_host_statistic(fcp_frame_alloc_failures);
fc_host_statistic(fc_no_free_exch);
fc_host_statistic(fc_no_free_exch_xid);
fc_host_statistic(fc_xid_not_found);
fc_host_statistic(fc_xid_busy);
fc_host_statistic(fc_seq_not_found);
fc_host_statistic(fc_non_bls_resp);

static ssize_t
fc_reset_statistics(struct device *dev, struct device_attribute *attr,
Expand Down Expand Up @@ -1784,6 +1793,15 @@ static struct attribute *fc_statistics_attrs[] = {
&device_attr_host_fcp_control_requests.attr,
&device_attr_host_fcp_input_megabytes.attr,
&device_attr_host_fcp_output_megabytes.attr,
&device_attr_host_fcp_packet_alloc_failures.attr,
&device_attr_host_fcp_packet_aborts.attr,
&device_attr_host_fcp_frame_alloc_failures.attr,
&device_attr_host_fc_no_free_exch.attr,
&device_attr_host_fc_no_free_exch_xid.attr,
&device_attr_host_fc_xid_not_found.attr,
&device_attr_host_fc_xid_busy.attr,
&device_attr_host_fc_seq_not_found.attr,
&device_attr_host_fc_non_bls_resp.attr,
&device_attr_host_reset_statistics.attr,
NULL
};
Expand Down
12 changes: 12 additions & 0 deletions include/scsi/scsi_transport_fc.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,18 @@ struct fc_host_statistics {
u64 fcp_control_requests;
u64 fcp_input_megabytes;
u64 fcp_output_megabytes;
u64 fcp_packet_alloc_failures; /* fcp packet allocation failures */
u64 fcp_packet_aborts; /* fcp packet aborted */
u64 fcp_frame_alloc_failures; /* fcp frame allocation failures */

/* fc exches statistics */
u64 fc_no_free_exch; /* no free exch memory */
u64 fc_no_free_exch_xid; /* no free exch id */
u64 fc_xid_not_found; /* exch not found for a response */
u64 fc_xid_busy; /* exch exist for new a request */
u64 fc_seq_not_found; /* seq is not found for exchange */
u64 fc_non_bls_resp; /* a non BLS response frame with
a sequence responder in new exch */
};


Expand Down

0 comments on commit e58abb0

Please sign in to comment.