summaryrefslogtreecommitdiff
path: root/drivers/scsi/lpfc/lpfc_sli.c
diff options
context:
space:
mode:
authorJustin Tee <justin.tee@broadcom.com>2022-10-17 09:43:21 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2022-10-22 03:19:15 +0000
commiteaf660e4282ba11239704b2b89ae94feae2010e0 (patch)
treef583e1117243bc693a99b942d4aa8ecc71cf11b0 /drivers/scsi/lpfc/lpfc_sli.c
parentc44e50f4a0ec00c2298f31f91bc2c3e9bbd81c7e (diff)
scsi: lpfc: Log when congestion management limits are in effect
When bandwidth reduces from or recovers back to 100% due to congestion management, log the event. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20221017164323.14536-3-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 86ba45ac91c8..d25afc9dde14 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -1848,6 +1848,18 @@ lpfc_cmf_sync_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
phba->cmf_link_byte_count);
bwpcent = div64_u64(bw * 100 + slop,
phba->cmf_link_byte_count);
+
+ if (phba->cmf_max_bytes_per_interval < bw &&
+ bwpcent > 95)
+ lpfc_printf_log(phba, KERN_INFO, LOG_CGN_MGMT,
+ "6208 Congestion bandwidth "
+ "limits removed\n");
+ else if ((phba->cmf_max_bytes_per_interval > bw) &&
+ ((bwpcent + pcent) <= 100) && ((bwpcent + pcent) > 95))
+ lpfc_printf_log(phba, KERN_INFO, LOG_CGN_MGMT,
+ "6209 Congestion bandwidth "
+ "limits in effect\n");
+
if (asig) {
lpfc_printf_log(phba, KERN_INFO, LOG_CGN_MGMT,
"6237 BW Threshold %lld%% (%lld): "