Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Justin Tee and committed by
Martin K. Petersen
eaf660e4 c44e50f4

+12
+12
drivers/scsi/lpfc/lpfc_sli.c
··· 1848 1848 phba->cmf_link_byte_count); 1849 1849 bwpcent = div64_u64(bw * 100 + slop, 1850 1850 phba->cmf_link_byte_count); 1851 + 1852 + if (phba->cmf_max_bytes_per_interval < bw && 1853 + bwpcent > 95) 1854 + lpfc_printf_log(phba, KERN_INFO, LOG_CGN_MGMT, 1855 + "6208 Congestion bandwidth " 1856 + "limits removed\n"); 1857 + else if ((phba->cmf_max_bytes_per_interval > bw) && 1858 + ((bwpcent + pcent) <= 100) && ((bwpcent + pcent) > 95)) 1859 + lpfc_printf_log(phba, KERN_INFO, LOG_CGN_MGMT, 1860 + "6209 Congestion bandwidth " 1861 + "limits in effect\n"); 1862 + 1851 1863 if (asig) { 1852 1864 lpfc_printf_log(phba, KERN_INFO, LOG_CGN_MGMT, 1853 1865 "6237 BW Threshold %lld%% (%lld): "