Standardize nvme SGL segment count
authorJames Smart <jsmart2021@gmail.com>
Fri, 21 Apr 2017 23:04:45 +0000 (16:04 -0700)
committerChristoph Hellwig <hch@lst.de>
Mon, 24 Apr 2017 07:25:48 +0000 (09:25 +0200)
Standardize default SGL segment count for nvme target and initiator

The driver needs to make them the same for clarity.

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>
drivers/scsi/lpfc/lpfc_nvme.h
drivers/scsi/lpfc/lpfc_nvmet.c
drivers/scsi/lpfc/lpfc_nvmet.h

index 1347deb8dd6cbd3e56db9f615cbc55e8290fc443..62777965f92f6a638d33771dd409ef4159fee97b 100644 (file)
@@ -21,9 +21,7 @@
  * included with this package.                                     *
  ********************************************************************/
 
-#define LPFC_NVME_MIN_SEGS             16
-#define LPFC_NVME_DEFAULT_SEGS         66      /* 256K IOs - 64 + 2 */
-#define LPFC_NVME_MAX_SEGS             510
+#define LPFC_NVME_DEFAULT_SEGS         (64 + 1)        /* 256K IOs */
 #define LPFC_NVMET_MIN_POSTBUF         16
 #define LPFC_NVMET_DEFAULT_POSTBUF     1024
 #define LPFC_NVMET_MAX_POSTBUF         4096
index d488c3318d4bd5ebf1de0bdeec7725105f2f0b21..c8a49418b735886af8ceb30a7c054bb6a3a17fd1 100644 (file)
@@ -709,7 +709,7 @@ lpfc_nvmet_create_targetport(struct lpfc_hba *phba)
        pinfo.port_id = vport->fc_myDID;
 
        lpfc_tgttemplate.max_hw_queues = phba->cfg_nvme_io_channel;
-       lpfc_tgttemplate.max_sgl_segments = phba->cfg_sg_seg_cnt;
+       lpfc_tgttemplate.max_sgl_segments = phba->cfg_sg_seg_cnt + 1;
        lpfc_tgttemplate.target_features = NVMET_FCTGTFEAT_READDATA_RSP |
                                           NVMET_FCTGTFEAT_NEEDS_CMD_CPUSCHED |
                                           NVMET_FCTGTFEAT_CMD_IN_ISR |
index 02735fc6fd411eff05a8b71aa60a2291b54a4e2d..d8bac4c61541b8ebbe7122b41010b822e3cfccd4 100644 (file)
@@ -21,9 +21,7 @@
  * included with this package.                                     *
  ********************************************************************/
 
-#define LPFC_NVMET_MIN_SEGS            16
-#define LPFC_NVMET_DEFAULT_SEGS                64      /* 256K IOs */
-#define LPFC_NVMET_MAX_SEGS            510
+#define LPFC_NVMET_DEFAULT_SEGS                (64 + 1)        /* 256K IOs */
 #define LPFC_NVMET_SUCCESS_LEN 12
 
 /* Used for NVME Target */