diff mbox series

[v2,4/5] scsi: fc: Add mechanism to update FPIN signal statistics

Message ID 20201006061615.28674-5-njavali@marvell.com (mailing list archive)
State Superseded
Headers show
Series SAN Congestion Management (SCM) statistics | expand

Commit Message

Nilesh Javali Oct. 6, 2020, 6:16 a.m. UTC
From: Shyam Sundar <ssundar@marvell.com>

Add statistics for Congestion Signals that are delivered to the host as
interrupt signals, under fc_host_statistics.

Signed-off-by: Shyam Sundar <ssundar@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/scsi_transport_fc.c | 5 +++++
 include/scsi/scsi_transport_fc.h | 3 +++
 2 files changed, 8 insertions(+)

Comments

James Smart Oct. 12, 2020, 6:37 p.m. UTC | #1
On 10/5/2020 11:16 PM, Nilesh Javali wrote:
> From: Shyam Sundar <ssundar@marvell.com>
>
> Add statistics for Congestion Signals that are delivered to the host as
> interrupt signals, under fc_host_statistics.
>
> Signed-off-by: Shyam Sundar <ssundar@marvell.com>
> Signed-off-by: Nilesh Javali <njavali@marvell.com>
> ---
>

Reviewed-by:  James Smart <james.smart@broadcom.com>

-- james
diff mbox series

Patch

diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 3db7eb674cda..f3296b23d193 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -2129,6 +2129,9 @@  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);
+fc_host_statistic(cn_sig_warn);
+fc_host_statistic(cn_sig_alarm);
+
 
 #define fc_host_fpin_statistic(name)					\
 static ssize_t fc_host_fpinstat_##name(struct device *cd,		\
@@ -2211,6 +2214,8 @@  static struct attribute *fc_statistics_attrs[] = {
 	&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_cn_sig_warn.attr,
+	&device_attr_host_cn_sig_alarm.attr,
 	&device_attr_host_reset_statistics.attr,
 	&device_attr_host_fpin_dn.attr,
 	&device_attr_host_fpin_dn_unknown.attr,
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
index a636c1986e22..c759b29e46c7 100644
--- a/include/scsi/scsi_transport_fc.h
+++ b/include/scsi/scsi_transport_fc.h
@@ -468,6 +468,9 @@  struct fc_host_statistics {
 	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 */
+	/* Host Congestion Signals */
+	u64 cn_sig_warn;
+	u64 cn_sig_alarm;
 };