scsi: lpfc: Fix MDS Latency Diagnostics Err-drop rates
authorJames Smart <jsmart2021@gmail.com>
Wed, 18 Dec 2019 23:58:06 +0000 (15:58 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 21 Dec 2019 18:42:42 +0000 (13:42 -0500)
commit999fbbceb8312a764b318cf19510273291ec3575
tree20b33b907b6d0dca74f48a11f7e680e4b0272ef8
parent0b4391946da872e825efa3edfa932e44ae6e9cf9
scsi: lpfc: Fix MDS Latency Diagnostics Err-drop rates

When running Cisco-MDS diagnostics which perform driver-level frame loop
back, the switch is reporting errors. Diagnostic has a limit on latency
that is not being met by the driver.

The requirement of Latency frames is that they should be responded back by
the host with a maximum delay of few hundreds of microseconds. If the
switch doesn't get response frames within this time frame, it fails the
test.

Test is failing as the lpfc-wq workqueue was overwhelmed by the packet rate
and in some cases, the work element yielded to other kernel elements.

To resolve, reduce the outstanding load allowed by the adapter. This
ensures the driver spends a reasonable amount of time doing loopback and
can do so such that latency values can be met.  Load is managed by reducing
the number of receive buffers posted such that the link can be
backpressured to reduce load.

Link: https://lore.kernel.org/r/20191218235808.31922-9-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c