mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
scsi: lpfc: Reduce memory footprint for lpfc_queue
Currently the driver maintains a sideband structure which has a pointer for each queue element. However, at 8 bytes per pointer, and up to 4k elements per queue, and 100s of queues, this can take up a lot of memory. Convert the driver to using an access routine that calculates the element address based on its index rather than using the pointer table. 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>
This commit is contained in:
committed by
Martin K. Petersen
parent
9a66d990c7
commit
9afbee3d62
@@ -4135,7 +4135,7 @@ lpfc_idiag_queacc_read_qe(char *pbuffer, int len, struct lpfc_queue *pque,
|
||||
"QE-INDEX[%04d]:\n", index);
|
||||
|
||||
offset = 0;
|
||||
pentry = pque->qe[index].address;
|
||||
pentry = lpfc_sli4_qe(pque, index);
|
||||
while (esize > 0) {
|
||||
len += snprintf(pbuffer+len, LPFC_QUE_ACC_BUF_SIZE-len,
|
||||
"%08x ", *pentry);
|
||||
@@ -4485,7 +4485,7 @@ pass_check:
|
||||
pque = (struct lpfc_queue *)idiag.ptr_private;
|
||||
if (offset > pque->entry_size/sizeof(uint32_t) - 1)
|
||||
goto error_out;
|
||||
pentry = pque->qe[index].address;
|
||||
pentry = lpfc_sli4_qe(pque, index);
|
||||
pentry += offset;
|
||||
if (idiag.cmd.opcode == LPFC_IDIAG_CMD_QUEACC_WR)
|
||||
*pentry = value;
|
||||
|
||||
Reference in New Issue
Block a user