scsi: ibmvfc: Implement channel queue depth and event buffer accounting
authorTyrel Datwyler <tyreld@linux.ibm.com>
Thu, 21 Sep 2023 22:54:26 +0000 (17:54 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 22 Sep 2023 02:14:20 +0000 (22:14 -0400)
commite1a4e0d3ce3b24421c25b7c335f0b7b948fd0c7f
treebae45b828c678891c9725b64c415517a20d9097b
parentb39f2d10b86d0af353ea339e5815820026bca48f
scsi: ibmvfc: Implement channel queue depth and event buffer accounting

Extend ibmvfc_queue, ibmvfc_event, and ibmvfc_event_pool to provide queue
depths for general I/O commands and reserved commands as well as proper
accounting of the free events of each type from the general event
pool. Further, calculate the negotiated max command limit with the VIOS at
NPIV login time as a function of the number of queues times their total
queue depth (general and reserved depths combined).

This does away with the legacy max_request value, and allows the driver to
better manage and track it resources.

Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Link: https://lore.kernel.org/r/20230921225435.3537728-3-tyreld@linux.ibm.com
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ibmvscsi/ibmvfc.c
drivers/scsi/ibmvscsi/ibmvfc.h