Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] fc: add some more FC specific stats to fc_host

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>

authored by

Vasu Dev and committed by
James Bottomley
e58abb0c 85efc72a

+30
+18
drivers/scsi/scsi_transport_fc.c
··· 1744 1744 fc_host_statistic(fcp_control_requests); 1745 1745 fc_host_statistic(fcp_input_megabytes); 1746 1746 fc_host_statistic(fcp_output_megabytes); 1747 + fc_host_statistic(fcp_packet_alloc_failures); 1748 + fc_host_statistic(fcp_packet_aborts); 1749 + fc_host_statistic(fcp_frame_alloc_failures); 1750 + fc_host_statistic(fc_no_free_exch); 1751 + fc_host_statistic(fc_no_free_exch_xid); 1752 + fc_host_statistic(fc_xid_not_found); 1753 + fc_host_statistic(fc_xid_busy); 1754 + fc_host_statistic(fc_seq_not_found); 1755 + fc_host_statistic(fc_non_bls_resp); 1747 1756 1748 1757 static ssize_t 1749 1758 fc_reset_statistics(struct device *dev, struct device_attribute *attr, ··· 1793 1784 &device_attr_host_fcp_control_requests.attr, 1794 1785 &device_attr_host_fcp_input_megabytes.attr, 1795 1786 &device_attr_host_fcp_output_megabytes.attr, 1787 + &device_attr_host_fcp_packet_alloc_failures.attr, 1788 + &device_attr_host_fcp_packet_aborts.attr, 1789 + &device_attr_host_fcp_frame_alloc_failures.attr, 1790 + &device_attr_host_fc_no_free_exch.attr, 1791 + &device_attr_host_fc_no_free_exch_xid.attr, 1792 + &device_attr_host_fc_xid_not_found.attr, 1793 + &device_attr_host_fc_xid_busy.attr, 1794 + &device_attr_host_fc_seq_not_found.attr, 1795 + &device_attr_host_fc_non_bls_resp.attr, 1796 1796 &device_attr_host_reset_statistics.attr, 1797 1797 NULL 1798 1798 };
+12
include/scsi/scsi_transport_fc.h
··· 426 426 u64 fcp_control_requests; 427 427 u64 fcp_input_megabytes; 428 428 u64 fcp_output_megabytes; 429 + u64 fcp_packet_alloc_failures; /* fcp packet allocation failures */ 430 + u64 fcp_packet_aborts; /* fcp packet aborted */ 431 + u64 fcp_frame_alloc_failures; /* fcp frame allocation failures */ 432 + 433 + /* fc exches statistics */ 434 + u64 fc_no_free_exch; /* no free exch memory */ 435 + u64 fc_no_free_exch_xid; /* no free exch id */ 436 + u64 fc_xid_not_found; /* exch not found for a response */ 437 + u64 fc_xid_busy; /* exch exist for new a request */ 438 + u64 fc_seq_not_found; /* seq is not found for exchange */ 439 + u64 fc_non_bls_resp; /* a non BLS response frame with 440 + a sequence responder in new exch */ 429 441 }; 430 442 431 443