diff options
author | James Smart <jsmart2021@gmail.com> | 2018-02-22 17:18:48 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-02-23 02:39:29 +0100 |
commit | 0bc2b7c5317bd51df571e9d1131547901215f6c9 (patch) | |
tree | e33cfe55cf2a5ce43dbbb5d9a88e5ff8b9dcd97e /drivers/scsi/lpfc/lpfc_nvme.c | |
parent | scsi: lpfc: Enable fw download on if_type=6 devices (diff) | |
download | linux-0bc2b7c5317bd51df571e9d1131547901215f6c9.tar.xz linux-0bc2b7c5317bd51df571e9d1131547901215f6c9.zip |
scsi: lpfc: Add embedded data pointers for enhanced performance
The current driver isn't taking advantage of a performance hint whereby
the initial data buffer descriptor can be placed in the WQE as well as
the SGL.
Add the logic to detect support for the feature and to use it when
supported.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_nvme.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nvme.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index 3a103d0895a2..5a1a6e24a27f 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -1170,6 +1170,7 @@ lpfc_nvme_prep_io_dma(struct lpfc_vport *vport, struct sli4_sge *sgl = lpfc_ncmd->nvme_sgl; struct scatterlist *data_sg; struct sli4_sge *first_data_sgl; + struct ulp_bde64 *bde; dma_addr_t physaddr; uint32_t num_bde = 0; uint32_t dma_len; @@ -1237,7 +1238,24 @@ lpfc_nvme_prep_io_dma(struct lpfc_vport *vport, data_sg = sg_next(data_sg); sgl++; } + if (phba->nvme_embed_pbde) { + /* Use PBDE support for first SGL only, offset == 0 */ + /* Words 13-15 */ + bde = (struct ulp_bde64 *) + &wqe->words[13]; + bde->addrLow = first_data_sgl->addr_lo; + bde->addrHigh = first_data_sgl->addr_hi; + bde->tus.f.bdeSize = + le32_to_cpu(first_data_sgl->sge_len); + bde->tus.f.bdeFlags = BUFF_TYPE_BDE_64; + bde->tus.w = cpu_to_le32(bde->tus.w); + bf_set(wqe_pbde, &wqe->generic.wqe_com, 1); + } else + bf_set(wqe_pbde, &wqe->generic.wqe_com, 0); + } else { + bf_set(wqe_pbde, &wqe->generic.wqe_com, 0); + /* For this clause to be valid, the payload_length * and sg_cnt must zero. */ |