]> git.openfabrics.org - ~tnikolova/compat-rdma/.git/commitdiff
add support for nvme
authorRajalaxmi Angadi <rajalaxmi.angadi@intel.com>
Thu, 23 Feb 2017 21:41:51 +0000 (13:41 -0800)
committerJay Sternberg <jay.e.sternberg@intel.com>
Fri, 24 Feb 2017 17:48:20 +0000 (09:48 -0800)
Signed-off-by: Rajalaxmi Angadi <rajalaxmi.angadi@intel.com>
Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Makefile
configure
makefile
ofed_scripts/checkout_files

index a318a5b664ce9dd791afb1dc774e8baa962fbbcc..031ead0de2ee1e13bd9f3b4b0e5afad7b58b38b5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,3 +8,4 @@ obj-$(CONFIG_BE2NET)            += drivers/net/ethernet/emulex/benet/
 obj-$(CONFIG_RDS)               += net/rds/
 obj-$(CONFIG_SUNRPC_XPRT_RDMA)  += net/sunrpc/xprtrdma/
 obj-$(CONFIG_SCSI_SRP_ATTRS)    += drivers/scsi/
+obj-$(CONFIG_NVME_CORE)                += drivers/nvme/
index a7e863f5c3aa64f53e0e220e05695ccc829fcbec..6aaa94cd2cb4ec45281dbab9afe1c3e33ef9578a 100755 (executable)
--- a/configure
+++ b/configure
@@ -181,6 +181,15 @@ Usage:  `basename $0` [options]
     --with-vmw_pvrdma-mod    make CONFIG_INFINIBAND_VMWARE_PVRDMA=m [no]
     --without-vmw_pvrdma-mod    [yes]
 
+    --with-nvme-mod    make CONFIG_NVME_CORE=m [no]
+    --without-nvme-mod    [yes]
+
+    --with-nvme-host-mod    make CONFIG_NVME_CORE=m [no]
+    --without-nvme-host-mod    [yes]
+
+    --with-nvme-target-mod    make CONFIG_NVME_TARGET_RDMA=m [no]
+    --without-nvme-target-mod    [yes]
+
     --help - print out options
 
 
@@ -704,6 +713,30 @@ main()
                         --without-vmw_pvrdma-mod)
                             CONFIG_INFINIBAND_VMWARE_PVRDMA=
                         ;;
+                       --with-nvme-mod)
+                           CONFIG_NVME_CORE="m"
+                           CONFIG_BLK_DEV_NVME="m"
+                       ;;
+                       --without-nvme-mod)
+                           CONFIG_NVME_CORE=
+                           CONFIG_BLK_DEV_NVME=
+                       ;;
+                       --with-nvme-host-mod)
+                           CONFIG_NVME_RDMA="m"
+                           CONFIG_NVME_FABRICS="m"
+                       ;;
+                       --without-nvme-host-mod)
+                           CONFIG_NVME_RDMA=
+                           CONFIG_NVME_FABRICS=
+                       ;;
+                       --with-nvme-target-mod)
+                           CONFIG_NVME_TARGET="m"
+                           CONFIG_NVME_TARGET_RDMA="m"
+                       ;;
+                       --without-nvme-target-mod)
+                           CONFIG_NVME_TARGET=
+                           CONFIG_NVME_TARGET_RDMA=
+                       ;;
                         -h | --help)
                                 usage
                                 exit 0
@@ -835,6 +868,14 @@ CONFIG_INFINIBAND_QLGC_VNIC_STATS=${CONFIG_INFINIBAND_QLGC_VNIC_STATS:-''}
 CONFIG_INFINIBAND_CXGB3_DEBUG=${CONFIG_INFINIBAND_CXGB3_DEBUG:-''}
 CONFIG_INFINIBAND_NES_DEBUG=${CONFIG_INFINIBAND_NES_DEBUG:-''}
 CONFIG_INFINIBAND_AMSO1100=${CONFIG_INFINIBAND_AMSO1100:-''}
+
+CONFIG_NVME_CORE=${CONFIG_NVME_CORE:-''}
+CONFIG_BLK_DEV_NVME=${CONFIG_BLK_DEV_NVME:-''}
+CONFIG_NVME_FABRICS=${CONFIG_NVME_FABRICS:-''}
+CONFIG_NVME_RDMA=${CONFIG_NVME_RDMA:-''}
+CONFIG_NVME_TARGET=${CONFIG_NVME_TARGET:-''}
+CONFIG_NVME_TARGET_RDMA=${CONFIG_NVME_TARGET_RDMA:-''}
+
 CONFIG_MLX4_EN_DCB=''
 if [ "X${CONFIG_MLX4_EN}" == "Xm" ]; then
     check_autofconf CONFIG_DCB
@@ -963,6 +1004,14 @@ CONFIG_INFINIBAND_QLGC_VNIC_STATS=${CONFIG_INFINIBAND_QLGC_VNIC_STATS}
 CONFIG_INFINIBAND_CXGB3_DEBUG=${CONFIG_INFINIBAND_CXGB3_DEBUG}
 CONFIG_INFINIBAND_NES_DEBUG=${CONFIG_INFINIBAND_NES_DEBUG}
 CONFIG_INFINIBAND_AMSO1100=${CONFIG_INFINIBAND_AMSO1100}
+
+CONFIG_NVME_CORE=${CONFIG_NVME_CORE}
+CONFIG_BLK_DEV_NVME=${CONFIG_BLK_DEV_NVME}
+CONFIG_NVME_FABRICS=${CONFIG_NVME_FABRICS}
+CONFIG_NVME_RDMA=${CONFIG_NVME_RDMA}
+CONFIG_NVME_TARGET=${CONFIG_NVME_TARGET}
+CONFIG_NVME_TARGET_RDMA=${CONFIG_NVME_TARGET_RDMA}
+
 CONFIG_MLX4_EN_DCB=${CONFIG_MLX4_EN_DCB}
 
 EOFCONFIG
@@ -1273,6 +1322,26 @@ else
         DEFINE_INFINIBAND_VMWARE_PVRDMA="#undef CONFIG_INFINIBAND_VMWARE_PVRDMA"
 fi
 
+DEFINE_NVME_CORE="#undef CONFIG_NVME_CORE"
+DEFINE_BLK_DEV_NVME="#undef CONFIG_BLK_DEV_NVME"
+DEFINE_NVME_FABRICS="#undef CONFIG_NVME_FABRICS"
+DEFINE_NVME_RDMA="#undef CONFIG_NVME_RDMA"
+DEFINE_NVME_TARGET="#undef CONFIG_NVME_TARGET"
+DEFINE_NVME_TARGET_RDMA="#undef CONFIG_NVME_TARGET_RDMA"
+
+if [ "X${CONFIG_NVME_CORE}" == "Xm" ]; then
+       DEFINE_NVME_CORE="#undef CONFIG_NVME_CORE\n#define CONFIG_NVME_CORE 1"
+       DEFINE_BLK_DEV_NVME="#undef CONFIG_BLK_DEV_NVME\n#define CONFIG_BLK_DEV_NVME 1"
+fi
+if [ "X${CONFIG_NVME_RDMA}" == "Xm" ]; then
+       DEFINE_NVME_FABRICS="#undef CONFIG_NVME_FABRICS\n#define CONFIG_NVME_FABRICS 1"
+       DEFINE_NVME_RDMA="#undef CONFIG_NVME_RDMA\n#define CONFIG_NVME_RDMA 1"
+fi
+if [ "X${CONFIG_NVME_TARGET_RDMA}" == "Xm" ]; then
+       DEFINE_NVME_TARGET="#undef CONFIG_NVME_TARGET\n#define CONFIG_NVME_TARGET 1"
+       DEFINE_NVME_TARGET_RDMA="#undef CONFIG_NVME_TARGET_RDMA\n#define CONFIG_NVME_TARGET_RDMA 1"
+fi
+
 cat > ${AUTOCONF_H} << EOFAUTOCONF
 #ifndef __OFED_BUILD__
 #include_next <$AUTOCONF_PREFIX/autoconf.h>
@@ -1340,6 +1409,12 @@ $(echo -e "${DEFINE_INFINIBAND_RXE}" | grep -v undef)
 $(echo -e "${DEFINE_INFINIBAND_MTHCA_DEBUG}" | grep -v undef)
 $(echo -e "${DEFINE_INFINIBAND_MADEYE}" | grep -v undef)
 $(echo -e "${DEFINE_INFINIBAND_AMSO1100}" | grep -v undef)
+$(echo -e "${DEFINE_NVME_CORE}" | grep -v undef)
+$(echo -e "${DEFINE_NVME_RDMA}" | grep -v undef)
+$(echo -e "${DEFINE_BLK_DEV_NVME}" | grep -v undef)
+$(echo -e "${DEFINE_NVME_TARGET}" | grep -v undef)
+$(echo -e "${DEFINE_NVME_TARGET_RDMA}" | grep -v undef)
+$(echo -e "${DEFINE_NVME_FABRICS}" | grep -v undef)
 #else
 #undef CONFIG_MEMTRACK
 #undef CONFIG_DEBUG_INFO
@@ -1412,6 +1487,13 @@ $(echo -e "${DEFINE_INFINIBAND_AMSO1100}" | grep -v undef)
 #undef CONFIG_INFINIBAND_AMSO1100
 #undef CONFIG_MLX4_EN_DCB
 
+#undef CONFIG_NVME_CORE
+#undef CONFIG_BLK_DEV_NVME
+#undef CONFIG_NVME_FABRICS
+#undef CONFIG_NVME_RDMA
+#undef CONFIG_NVME_TARGET
+#undef CONFIG_NVME_TARGET_RDMA
+
 $(echo -e "${DEFINE_INFINIBAND}")
 $(echo -e "${DEFINE_INFINIBAND_IPOIB}")
 $(echo -e "${DEFINE_INFINIBAND_IPOIB_CM}")
@@ -1476,6 +1558,12 @@ $(echo -e "${DEFINE_INFINIBAND_MTHCA_DEBUG}")
 $(echo -e "${DEFINE_INFINIBAND_MADEYE}")
 $(echo -e "${DEFINE_INFINIBAND_AMSO1100}")
 $(echo -e "${DEFINE_MLX4_EN_DCB}")
+$(echo -e "${DEFINE_NVME_CORE}")
+$(echo -e "${DEFINE_NVME_RDMA}")
+$(echo -e "${DEFINE_BLK_DEV_NVME}")
+$(echo -e "${DEFINE_NVME_TARGET}")
+$(echo -e "${DEFINE_NVME_TARGET_RDMA}")
+$(echo -e "${DEFINE_NVME_TARGET_FABRICS}")
 #endif
 
 EOFAUTOCONF
index 15c225c0020bfe61338fc68f105fdee86d9d4325..6de18632cd8305018835aced13baed2d51b63001 100644 (file)
--- a/makefile
+++ b/makefile
@@ -147,6 +147,12 @@ kernel: $(COMPAT_CONFIG) $(COMPAT_AUTOCONF)
                CONFIG_INFINIBAND_USNIC=$(CONFIG_INFINIBAND_USNIC) \
                CONFIG_INFINIBAND_HFI1=$(CONFIG_INFINIBAND_HFI1) \
                CONFIG_INFINIBAND_VMWARE_PVRDMA=$(CONFIG_INFINIBAND_VMWARE_PVRDMA) \
+               CONFIG_NVME_CORE=$(CONFIG_NVME_CORE) \
+               CONFIG_BLK_DEV_NVME=$(CONFIG_BLK_DEV_NVME) \
+               CONFIG_NVME_RDMA=$(CONFIG_NVME_RDMA) \
+               CONFIG_NVME_FABRICS=$(CONFIG_NVME_FABRICS) \
+               CONFIG_NVME_TARGET=$(CONFIG_NVME_TARGET) \
+               CONFIG_NVME_TARGET_RDMA=$(CONFIG_NVME_TARGET_RDMA) \
                LINUXINCLUDE=' \
                -D__OFED_BUILD__ \
                -D__KERNEL__ \
@@ -175,6 +181,8 @@ kernel: $(COMPAT_CONFIG) $(COMPAT_AUTOCONF)
                $$(if $$(KBUILD_SRC),-Iinclude2 -I$$(srctree)/include) \
                -I$$(srctree)/arch/$$(SRCARCH)/include \
                -Iarch/$$(SRCARCH)/include/generated \
+               -I$(CWD)/drivers/nvme/host \
+               -I$(CWD)/drivers/nvme/target \
                ' \
                modules
 
index f8cfdbc989a325b659143e8f5cdbcac26a0cf4fc..acdba580df2a09bb4105996080d110cfe9f0c35e 100644 (file)
@@ -18,3 +18,7 @@ drivers/scsi/scsi_priv.h
 drivers/scsi/scsi_transport_srp.c
 drivers/scsi/cxgbi/
 include/scsi/scsi_transport_srp.h
+drivers/nvme/
+include/linux/nvme.h
+include/linux/nvme-rdma.h
+include/uapi/linux/nvme_ioctl.h