Skip to contentSkip to conversation

lpfc: Finalize Kconfig options for nvme

PATCH Superseded [email protected] 3 participants 3 messages Mar 7, 2017

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lpfc: Finalize Kconfig options for nvme

From: James Smart <[email protected]>

Reviewing the result of what was just added for Kconfig, we made a poor choice. It worked well for full kernel builds, but not so much for how it would be deployed on a distro.

Here's the final result:
- lpfc will compile in NVME initiator and/or NVME target support based on whether the kernel has the corresponding subsystem support. Kconfig is not used to drive this specifically for lpfc.
- There is a module parameter, lpfc_enable_fc4_type, that indicates whether the ports will do FCP-only or FCP & NVME (NVME-only not yet possible due to dependency on fc transport). As FCP & NVME divvys up exchange resources, and given NVME will not be often initially, the default is changed to FCP only.

-- james

Signed-off-by Dick Kennedy <dick.kennedy at broadcom.com>
Signed-off-by James Smart <james.smart at broadcom.com>
---
 drivers/scsi/Kconfig          | 14 --------------
 drivers/scsi/lpfc/lpfc.h      |  8 ++++++++
 drivers/scsi/lpfc/lpfc_attr.c |  4 ++--
 3 files changed, 10 insertions(+), 16 deletions(-)
drivers/scsi/Kconfig +0 -14
index 4bf55b5..3c52867 100644
@@ -1253,20 +1253,6 @@ config SCSI_LPFC_DEBUG_FS
 	  This makes debugging information from the lpfc driver
 	  available via the debugfs filesystem.
 
-config LPFC_NVME_INITIATOR
-	bool "Emulex LightPulse Fibre Channel NVME Initiator Support"
-	depends on SCSI_LPFC && NVME_FC
-	---help---
-	  This enables NVME Initiator support in the Emulex lpfc driver.
-
-config LPFC_NVME_TARGET
-	bool "Emulex LightPulse Fibre Channel NVME Initiator Support"
-	depends on SCSI_LPFC && NVME_TARGET_FC
-	---help---
-	  This enables NVME Target support in the Emulex lpfc driver.
-	  Target enablement must still be enabled on a per adapter
-	  basis by module parameters.
-
 config SCSI_SIM710
 	tristate "Simple 53c710 SCSI support (Compaq, NCR machines)"
 	depends on (EISA || MCA) && SCSI
drivers/scsi/lpfc/lpfc.h +8 -0
index 257bbdd..ce571ca 100644
@@ -28,6 +28,14 @@
 #define CONFIG_SCSI_LPFC_DEBUG_FS
 #endif
 
+#if defined(CONFIG_NVME_FC)
+#define CONFIG_LPFC_NVME_INITIATOR
+#endif
+
+#if defined(CONFIG_NVME_TARGET_FC)
+#define CONFIG_LPFC_NVME_TARGET
+#endif
+
 struct lpfc_sli2_slim;
 
 #define ELX_MODEL_NAME_SIZE	80
drivers/scsi/lpfc/lpfc_attr.c +2 -2
index fbd3a56..84aa62f 100644
@@ -3315,9 +3315,9 @@ LPFC_ATTR_R(nvmet_mrq_post, LPFC_DEF_MRQ_POST,
  * lpfc_enable_fc4_type: Defines what FC4 types are supported.
  * Supported Values:  1 - register just FCP
  *                    3 - register both FCP and NVME
- * Supported values are [1,3]. Default value is 3
+ * Supported values are [1,3]. Default value is 1
  */
-LPFC_ATTR_R(enable_fc4_type, LPFC_ENABLE_BOTH,
+LPFC_ATTR_R(enable_fc4_type, LPFC_ENABLE_FCP,
 	    LPFC_ENABLE_FCP, LPFC_ENABLE_BOTH,
 	    "Define fc4 type to register with fabric.");
 
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 lpfc: Finalize Kconfig options for nvme

drivers/scsi/lpfc/lpfc.h line 37

Quoted 7 lines
drivers/scsi/lpfc/lpfc.h +7 -0
+#if defined(CONFIG_NVME_FC)
+#define CONFIG_LPFC_NVME_INITIATOR
+#endif
+
+#if defined(CONFIG_NVME_TARGET_FC)
+#define CONFIG_LPFC_NVME_TARGET
+#endif

The CONFIG_* namespace is reserved for Kconfig defined symbols.

Also I think the above is wrong if the nvme fc core code is built modular. I think you want to replace all occurances of

#ifdef CONFIG_LPFC_NVME_INITIATOR

with

if (IS_ENABLED(CONFIG_NVME_FC))

and vice versa for the taget.

#2 lore raw

PATCH 1/1 lpfc: Finalize Kconfig options for nvme

Quoted 12 lines · Christoph Hellwig

drivers/scsi/lpfc/lpfc.h line 37

Quoted 7 lines
drivers/scsi/lpfc/lpfc.h +7 -0
+#if defined(CONFIG_NVME_FC)
+#define CONFIG_LPFC_NVME_INITIATOR
+#endif
+
+#if defined(CONFIG_NVME_TARGET_FC)
+#define CONFIG_LPFC_NVME_TARGET
+#endif

The CONFIG_* namespace is reserved for Kconfig defined symbols.

Also I think the above is wrong if the nvme fc core code is built modular. I think you want to replace all occurances of

Quoted 7 lines

#ifdef CONFIG_LPFC_NVME_INITIATOR

with

if (IS_ENABLED(CONFIG_NVME_FC))

and vice versa for the taget.

make sense

-- james