Skip to content

Commit

Permalink
scsi: lpfc: Log when congestion management limits are in effect
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Justin Tee authored and Martin K. Petersen committed Oct 22, 2022
1 parent c44e50f commit eaf660e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/scsi/lpfc/lpfc_sli.c
Original file line number Diff line number Diff line change
Expand Up @@ -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): "
Expand Down

0 comments on commit eaf660e

Please sign in to comment.