All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Smart <jsmart2021@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: James Smart <jsmart2021@gmail.com>, Justin Tee <justin.tee@broadcom.com>
Subject: [PATCH 12/14] lpfc: Zero CGN stats only during initial driver load and stat reset
Date: Fri, 10 Sep 2021 16:31:57 -0700	[thread overview]
Message-ID: <20210910233159.115896-13-jsmart2021@gmail.com> (raw)
In-Reply-To: <20210910233159.115896-1-jsmart2021@gmail.com>

Currently congestion management framework results are cleared whenever
the framework settings changed (such as it being turned off then back
on). This unfortunately means prior stats, rolled up to higher time
windows lose meaning.

Change such that stats are not cleared. Thus they pause and resume with
prior values still being considered.

Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
---
 drivers/scsi/lpfc/lpfc_init.c | 2 --
 drivers/scsi/lpfc/lpfc_sli.c  | 6 ++++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 4637531f3b02..d0e64233d273 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -13394,8 +13394,6 @@ lpfc_init_congestion_buf(struct lpfc_hba *phba)
 	atomic_set(&phba->cgn_sync_alarm_cnt, 0);
 	atomic_set(&phba->cgn_sync_warn_cnt, 0);
 
-	atomic64_set(&phba->cgn_acqe_stat.alarm, 0);
-	atomic64_set(&phba->cgn_acqe_stat.warn, 0);
 	atomic_set(&phba->cgn_driver_evt_cnt, 0);
 	atomic_set(&phba->cgn_latency_evt_cnt, 0);
 	atomic64_set(&phba->cgn_latency_evt, 0);
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 651e6ee64e88..34cf2bfcce07 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -7764,8 +7764,6 @@ lpfc_mbx_cmpl_cgn_set_ftrs(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
 
 	/* Zero out Congestion Signal ACQE counter */
 	phba->cgn_acqe_cnt = 0;
-	atomic64_set(&phba->cgn_acqe_stat.warn, 0);
-	atomic64_set(&phba->cgn_acqe_stat.alarm, 0);
 
 	acqe = bf_get(lpfc_mbx_set_feature_CGN_acqe_freq,
 		      &pmb->u.mqe.un.set_feature);
@@ -8017,6 +8015,10 @@ lpfc_cmf_setup(struct lpfc_hba *phba)
 			/* initialize congestion buffer info */
 			lpfc_init_congestion_buf(phba);
 			lpfc_init_congestion_stat(phba);
+
+			/* Zero out Congestion Signal counters */
+			atomic64_set(&phba->cgn_acqe_stat.alarm, 0);
+			atomic64_set(&phba->cgn_acqe_stat.warn, 0);
 		}
 
 		rc = lpfc_sli4_cgn_params_read(phba);
-- 
2.26.2


  parent reply	other threads:[~2021-09-10 23:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 23:31 [PATCH 00/14] lpfc: Update lpfc to revision 14.0.0.2 James Smart
2021-09-10 23:31 ` [PATCH 01/14] lpfc: Fix list_add corruption in lpfc_drain_txq James Smart
2021-09-10 23:31 ` [PATCH 02/14] lpfc: Don't release final kref on Fport node while ABTS outstanding James Smart
2021-09-10 23:31 ` [PATCH 03/14] lpfc: Fix premature rpi release for unsolicited TPLS and LS_RJT James Smart
2021-09-10 23:31 ` [PATCH 04/14] lpfc: Fix hang on unload due to stuck fport node James Smart
2021-09-10 23:31 ` [PATCH 05/14] lpfc: Fix rediscovery of tape device after issue lip James Smart
2021-09-10 23:31 ` [PATCH 06/14] lpfc: Don't remove ndlp on PRLI errors in P2P mode James Smart
2021-09-10 23:31 ` [PATCH 07/14] lpfc: Fix NVME I/O failover to non-optimized path James Smart
2021-09-10 23:31 ` [PATCH 08/14] lpfc: Fix FCP I/O flush functionality for TMF routines James Smart
2021-09-10 23:31 ` [PATCH 09/14] lpfc: Fix EEH support for NVME I/O James Smart
2021-09-10 23:31 ` [PATCH 10/14] lpfc: Adjust bytes received vales during cmf timer interval James Smart
2021-09-10 23:31 ` [PATCH 11/14] lpfc: Fix I/O block after enabling managed congestion mode James Smart
2021-09-10 23:31 ` James Smart [this message]
2021-09-10 23:31 ` [PATCH 13/14] lpfc: Improve PBDE checks during SGL processing James Smart
2021-09-10 23:31 ` [PATCH 14/14] lpfc: Update lpfc version to 14.0.0.2 James Smart
2021-09-15  3:16 ` [PATCH 00/14] lpfc: Update lpfc to revision 14.0.0.2 Martin K. Petersen
2021-09-22  4:45 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210910233159.115896-13-jsmart2021@gmail.com \
    --to=jsmart2021@gmail.com \
    --cc=justin.tee@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.