From 28c78e7c2a3474625d130cc47a8442ae451a8216 Mon Sep 17 00:00:00 2001 From: Adit Ranadive Date: Tue, 20 Dec 2016 19:00:26 -0800 Subject: [PATCH] compat-rdma: Build support for VMW_PVRDMA driver in OFED 4.8 Modified the build scripts to compile the VMware PVRDMA driver. I tested this by compiling and installing the compat-rdma stuff in RHEL 7.3. This is updated to reflect the new driver name. Signed-off-by: Adit Ranadive --- compat-rdma.spec | 2 +- configure | 38 +++++++++++++++++++------------------- makefile | 2 +- ofed_scripts/openibd | 6 +++--- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/compat-rdma.spec b/compat-rdma.spec index c65b194..f5d47de 100755 --- a/compat-rdma.spec +++ b/compat-rdma.spec @@ -57,7 +57,7 @@ %define build_ocrdma %(if ( echo %{configure_options} | grep "with-ocrdma-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi) %define build_ibp_server %(if ( echo %{configure_options} | grep "with-ibp-server-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi) %define build_ibscif %(if ( echo %{configure_options} | grep "with-ibscif-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi) -%define build_pvrdma %(if ( echo %{configure_options} | grep "with-pvrdma-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi) +%define build_vmw_pvrdma %(if ( echo %{configure_options} | grep "with-vmw_pvrdma-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi) %{!?LIB_MOD_DIR: %define LIB_MOD_DIR /lib/modules/%{KVERSION}/updates} diff --git a/configure b/configure index d4b694c..a7e863f 100755 --- a/configure +++ b/configure @@ -178,8 +178,8 @@ Usage: `basename $0` [options] --with-nfsrdma-mod make CONFIG_SUNRPC_XPRT_RDMA=m [no] --without-nfsrdma-mod [yes] - --with-pvrdma-mod make CONFIG_INFINIBAND_PVRDMA=m [no] - --without-pvrdma-mod [yes] + --with-vmw_pvrdma-mod make CONFIG_INFINIBAND_VMWARE_PVRDMA=m [no] + --without-vmw_pvrdma-mod [yes] --help - print out options @@ -698,11 +698,11 @@ main() CONFIG_SUNRPC_XPRT_RDMA_CLIENT= CONFIG_SUNRPC_XPRT_RDMA_SERVER= ;; - --with-pvrdma-mod) - CONFIG_INFINIBAND_PVRDMA="m" + --with-vmw_pvrdma-mod) + CONFIG_INFINIBAND_VMWARE_PVRDMA="m" ;; - --without-pvrdma-mod) - CONFIG_INFINIBAND_PVRDMA= + --without-vmw_pvrdma-mod) + CONFIG_INFINIBAND_VMWARE_PVRDMA= ;; -h | --help) usage @@ -760,7 +760,7 @@ if [ $ARCH != "x86_64" ]; then CONFIG_INFINIBAND_QIB= CONFIG_INFINIBAND_RDMAVT= CONFIG_INFINIBAND_RXE= - CONFIG_INFINIBAND_PVRDMA= + CONFIG_INFINIBAND_VMWARE_PVRDMA= fi SKIP_AUTOCONF=${SKIP_AUTOCONF:-0} @@ -819,7 +819,7 @@ CONFIG_SCSI_CXGB4_ISCSI=${CONFIG_SCSI_CXGB4_ISCSI:-''} CONFIG_INFINIBAND_NES=${CONFIG_INFINIBAND_NES:-''} CONFIG_INFINIBAND_OCRDMA=${CONFIG_INFINIBAND_OCRDMA:-''} CONFIG_BE2NET=${CONFIG_BE2NET:-''} -CONFIG_INFINIBAND_PVRDMA=${CONFIG_INFINIBAND_PVRDMA:-''} +CONFIG_INFINIBAND_VMWARE_PVRDMA=${CONFIG_INFINIBAND_VMWARE_PVRDMA:-''} CONFIG_SUNRPC_XPRT_RDMA=${CONFIG_SUNRPC_XPRT_RDMA:-''} CONFIG_SUNRPC_XPRT_RDMA_CLIENT=${CONFIG_SUNRPC_XPRT_RDMA_CLIENT:-''} @@ -868,10 +868,10 @@ if [ "X${CONFIG_INFINIBAND_ADDR_TRANS}" == "Xy" ]; then fi fi - if [[ ! -e .pvrdma_applied && "X$CONFIG_INFINIBAND_PVRDMA" == "Xm" ]]; then - echo ".pvrdma_applied does not exist. running ofed-patch.sh for pvrdma" - ex ${CWD}/ofed_scripts/ofed_patch.sh --without-git --without-quilt --with-patchdir=tech-preview/pvrdma - touch .pvrdma_applied + if [[ ! -e .vmw_pvrdma_applied && "X$CONFIG_INFINIBAND_VMWARE_PVRDMA" == "Xm" ]]; then + echo ".vmw_pvrdma_applied does not exist. running ofed-patch.sh for vmw_pvrdma" + ex ${CWD}/ofed_scripts/ofed_patch.sh --without-git --without-quilt --with-patchdir=tech-preview/vmw_pvrdma + touch .vmw_pvrdma_applied fi # Create configure.mk @@ -946,7 +946,7 @@ CONFIG_SCSI_CXGB4_ISCSI=${CONFIG_SCSI_CXGB4_ISCSI} CONFIG_INFINIBAND_NES=${CONFIG_INFINIBAND_NES} CONFIG_INFINIBAND_OCRDMA=${CONFIG_INFINIBAND_OCRDMA} CONFIG_BE2NET=${CONFIG_BE2NET} -CONFIG_INFINIBAND_PVRDMA=${CONFIG_INFINIBAND_PVRDMA} +CONFIG_INFINIBAND_VMWARE_PVRDMA=${CONFIG_INFINIBAND_VMWARE_PVRDMA} CONFIG_SUNRPC_XPRT_RDMA=${CONFIG_SUNRPC_XPRT_RDMA} CONFIG_SUNRPC_XPRT_RDMA_CLIENT=${CONFIG_SUNRPC_XPRT_RDMA_CLIENT} @@ -1267,10 +1267,10 @@ if [ "X${CONFIG_SUNRPC_XPRT_RDMA_SERVER}" == "Xm" ]; then else DEFINE_SUNRPC_XPRT_RDMA_SERVER="/* CONFIG_SUNRPC_XPRT_RDMA_SERVER is not set */" fi -if [ "X${CONFIG_INFINIBAND_PVRDMA}" == "Xm" ]; then - DEFINE_INFINIBAND_PVRDMA="#undef CONFIG_INFINIBAND_PVRDMA\n#define CONFIG_INFINIBAND_PVRDMA 1" +if [ "X${CONFIG_INFINIBAND_VMWARE_PVRDMA}" == "Xm" ]; then + DEFINE_INFINIBAND_VMWARE_PVRDMA="#undef CONFIG_INFINIBAND_VMWARE_PVRDMA\n#define CONFIG_INFINIBAND_VMWARE_PVRDMA 1" else - DEFINE_INFINIBAND_PVRDMA="#undef CONFIG_INFINIBAND_PVRDMA" + DEFINE_INFINIBAND_VMWARE_PVRDMA="#undef CONFIG_INFINIBAND_VMWARE_PVRDMA" fi cat > ${AUTOCONF_H} << EOFAUTOCONF @@ -1296,7 +1296,7 @@ $(echo -e "${DEFINE_CHELSIO_T4}" | grep -v undef) $(echo -e "${DEFINE_INFINIBAND_NES}" | grep -v undef) $(echo -e "${DEFINE_INFINIBAND_OCRDMA}" | grep -v undef) $(echo -e "${DEFINE_BE2NET}" | grep -v undef) -$(echo -e "${DEFINE_INFINIBAND_PVRDMA}" | grep -v undef) +$(echo -e "${DEFINE_INFINIBAND_VMWARE_PVRDMA}" | grep -v undef) $(echo -e "${DEFINE_SUNRPC_XPRT_RDMA}" | grep -v undef) $(echo -e "${DEFINE_SUNRPC_XPRT_RDMA_CLIENT}" | grep -v undef) @@ -1396,7 +1396,7 @@ $(echo -e "${DEFINE_INFINIBAND_AMSO1100}" | grep -v undef) #undef CONFIG_INFINIBAND_NES_DEBUG #undef CONFIG_INFINIBAND_OCRDMA #undef CONFIG_BE2NET -#undef CONFIG_INFINIBAND_PVRDMA +#undef CONFIG_INFINIBAND_VMWARE_PVRDMA #undef CONFIG_SUNRPC_XPRT_RDMA #undef CONFIG_SUNRPC_XPRT_RDMA_CLIENT @@ -1431,7 +1431,7 @@ $(echo -e "${DEFINE_CHELSIO_T4}") $(echo -e "${DEFINE_INFINIBAND_NES}") $(echo -e "${DEFINE_INFINIBAND_OCRDMA}") $(echo -e "${DEFINE_BE2NET}") -$(echo -e "${DEFINE_INFINIBAND_PVRDMA}") +$(echo -e "${DEFINE_INFINIBAND_VMWARE_PVRDMA}") $(echo -e "${DEFINE_SUNRPC_XPRT_RDMA}") $(echo -e "${DEFINE_SUNRPC_XPRT_RDMA_CLIENT}") diff --git a/makefile b/makefile index 4480102..4f27fcc 100644 --- a/makefile +++ b/makefile @@ -146,7 +146,7 @@ kernel: $(COMPAT_CONFIG) $(COMPAT_AUTOCONF) CONFIG_INFINIBAND_ISERT=$(CONFIG_INFINIBAND_ISERT) \ CONFIG_INFINIBAND_USNIC=$(CONFIG_INFINIBAND_USNIC) \ CONFIG_INFINIBAND_HFI1=$(CONFIG_INFINIBAND_HFI1) \ - CONFIG_INFINIBAND_PVRDMA=$(CONFIG_INFINIBAND_PVRDMA) \ + CONFIG_INFINIBAND_VMWARE_PVRDMA=$(CONFIG_INFINIBAND_VMWARE_PVRDMA) \ LINUXINCLUDE=' \ -D__OFED_BUILD__ \ -D__KERNEL__ \ diff --git a/ofed_scripts/openibd b/ofed_scripts/openibd index 55c55b9..7d731d0 100644 --- a/ofed_scripts/openibd +++ b/ofed_scripts/openibd @@ -270,7 +270,7 @@ UNLOAD_MODULES="$UNLOAD_MODULES rds_rdma rds_tcp rds ib_ucm kdapl ib_srp_target UNLOAD_MODULES="$UNLOAD_MODULES rdma_ucm rdma_cm iw_cm ib_cm ib_local_sa findex" UNLOAD_MODULES="$UNLOAD_MODULES ib_sa ib_uverbs ib_umad ib_mad ib_core ib_addr" -STATUS_MODULES="rdma_ucm ib_rds rds rds_rdma rds_tcp ib_srpt ib_srp qlgc_vnic rdma_cm ib_addr ib_local_sa findex ib_ipoib ib_ehca ib_ipath ipath_core mlx4_core mlx4_ib mlx4_en mlx5_core mlx5_ib ib_mthca ib_uverbs ib_umad ib_ucm ib_sa ib_cm ib_mad ib_core iw_cxgb3 iw_cxgb4 iw_nes pvrdma" +STATUS_MODULES="rdma_ucm ib_rds rds rds_rdma rds_tcp ib_srpt ib_srp qlgc_vnic rdma_cm ib_addr ib_local_sa findex ib_ipoib ib_ehca ib_ipath ipath_core mlx4_core mlx4_ib mlx4_en mlx5_core mlx5_ib ib_mthca ib_uverbs ib_umad ib_ucm ib_sa ib_cm ib_mad ib_core iw_cxgb3 iw_cxgb4 iw_nes vmw_pvrdma" STATUS_MODULES="$STATUS_MODULES ib_qib ocrdma" if (modinfo scsi_transport_srp 2>/dev/null | grep depends: | grep -q compat 2>/dev/null) || @@ -955,8 +955,8 @@ start() fi # Load VMware Paravirtual RDMA driver - if [ "X${PVRDMA_LOAD}" == "Xyes" ]; then - load_module pvrdma + if [ "X${VMW_PVRDMA_LOAD}" == "Xyes" ]; then + load_module vmw_pvrdma my_rc=$? if [ $my_rc -ne 0 ]; then echo_failure $"Loading VMware Paravirtual RDMA driver: " -- 2.41.0