summaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorShyam Sundar <ssundar@marvell.com>2020-10-21 11:27:12 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2020-10-26 23:06:45 +0100
commit547aab51a914e1f18394d8238ef9fb4f76d5b491 (patch)
tree36b4507443f7a00eab561ca366cfc5a774137efa /include/scsi
parentscsi: fc: Update formal FPIN descriptor definitions (diff)
downloadlinux-547aab51a914e1f18394d8238ef9fb4f76d5b491.tar.xz
linux-547aab51a914e1f18394d8238ef9fb4f76d5b491.zip
scsi: fc: Add FPIN statistics to fc_host and fc_rport objects
Add a structure for holding FPIN statistics, for host & rport respectively, and add associated sysfs nodes: /sys/class/fc_host/hostXX/statistics/ /sys/class/fc_remote_ports/rport-XX\:Y-Z/statistics/ Link: https://lore.kernel.org/r/20201021092715.22669-3-njavali@marvell.com Reviewed-by: James Smart <james.smart@broadcom.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Shyam Sundar <ssundar@marvell.com> Signed-off-by: Nilesh Javali <njavali@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_transport_fc.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
index 1c7dd35cb7a0..487a403ee51e 100644
--- a/include/scsi/scsi_transport_fc.h
+++ b/include/scsi/scsi_transport_fc.h
@@ -285,6 +285,36 @@ struct fc_rport_identifiers {
u32 roles;
};
+/*
+ * Fabric Performance Impact Notification Statistics
+ */
+struct fc_fpin_stats {
+ /* Delivery */
+ u64 dn;
+ u64 dn_unknown;
+ u64 dn_timeout;
+ u64 dn_unable_to_route;
+ u64 dn_device_specific;
+
+ /* Link Integrity */
+ u64 li;
+ u64 li_failure_unknown;
+ u64 li_link_failure_count;
+ u64 li_loss_of_sync_count;
+ u64 li_loss_of_signals_count;
+ u64 li_prim_seq_err_count;
+ u64 li_invalid_tx_word_count;
+ u64 li_invalid_crc_count;
+ u64 li_device_specific;
+
+ /* Congestion/Peer Congestion */
+ u64 cn;
+ u64 cn_clear;
+ u64 cn_lost_credit;
+ u64 cn_credit_stall;
+ u64 cn_oversubscription;
+ u64 cn_device_specific;
+};
/* Macro for use in defining Remote Port attributes */
#define FC_RPORT_ATTR(_name,_mode,_show,_store) \
@@ -326,6 +356,7 @@ struct fc_rport { /* aka fc_starget_attrs */
/* Dynamic Attributes */
u32 dev_loss_tmo; /* Remote Port loss timeout in seconds. */
+ struct fc_fpin_stats fpin_stats;
/* Private (Transport-managed) Attributes */
u64 node_name;
@@ -516,6 +547,7 @@ struct fc_host_attrs {
char symbolic_name[FC_SYMBOLIC_NAME_SIZE];
char system_hostname[FC_SYMBOLIC_NAME_SIZE];
u32 dev_loss_tmo;
+ struct fc_fpin_stats fpin_stats;
/* Private (Transport-managed) Attributes */
enum fc_tgtid_binding_type tgtid_bind_type;