]> git.openfabrics.org - ~emulex/for-vlad/compat-rdma.git/commitdiff
compat-rdma.spec/openibd: Added OCRDMA support
authorVladimir Sokolovsky <vlad@mellanox.com>
Mon, 11 Nov 2013 16:17:26 +0000 (18:17 +0200)
committerVladimir Sokolovsky <vlad@mellanox.com>
Mon, 11 Nov 2013 16:17:26 +0000 (18:17 +0200)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
compat-rdma.spec
ofed_scripts/openibd

index 87aa53ed5f60611cadafa42fefb9669936cbdac0..12b8f421bd35c5c8c5f6b39f1b29d98fb5c51598 100755 (executable)
 %define build_cxgb4 %(if ( echo %{configure_options} | grep "with-cxgb4-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
 %define build_nes %(if ( echo %{configure_options} | grep "with-nes-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
 %define build_mlx4 %(if ( echo %{configure_options} | grep "with-mlx4-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
+%define build_mlx5 %(if ( echo %{configure_options} | grep "with-mlx5-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
 %define build_mlx4_en %(if ( echo %{configure_options} | grep "with-mlx4_en-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
 %define build_qlgc_vnic %(if ( echo %{configure_options} | grep "with-qlgc_vnic-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
 %define build_nfsrdma %(if ( echo %{configure_options} | grep "with-nfsrdma-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
+%define build_ocrdma %(if ( echo %{configure_options} | grep "with-ocrdma-mod" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)
 
 %{!?LIB_MOD_DIR: %define LIB_MOD_DIR /lib/modules/%{KVERSION}/updates}
 
@@ -212,7 +214,7 @@ install -m 0755 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/openibd $RPM_BU
 install -d $RPM_BUILD_ROOT/sbin
 install -m 0755 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/sysctl_perf_tuning $RPM_BUILD_ROOT/sbin
 
-%if %{build_mlx4}
+%if %{build_mlx4} || %{build_mlx5}
 install -d $RPM_BUILD_ROOT/%{_bindir}
 install -m 0755 $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/ibdev2netdev $RPM_BUILD_ROOT/%{_bindir}
 %endif
@@ -450,6 +452,12 @@ fi
        echo "MLX4_LOAD=yes" >> %{RDMA_CONF_DIR}/openib.conf
 %endif
 
+%if %{build_mlx5}
+       echo >> %{IB_CONF_DIR}/openib.conf
+       echo "# Load MLX5 modules" >> %{IB_CONF_DIR}/openib.conf
+       echo "MLX5_LOAD=yes" >> %{IB_CONF_DIR}/openib.conf
+%endif
+
 %if %{build_mlx4_en}
        echo >> %{RDMA_CONF_DIR}/openib.conf
        echo "# Load MLX4_EN module" >> %{RDMA_CONF_DIR}/openib.conf
@@ -519,6 +527,12 @@ fi
        echo "QLGC_VNIC_LOAD=yes" >> %{RDMA_CONF_DIR}/openib.conf
 %endif
 
+%if %{build_ocrdma}
+       echo >> %{RDMA_CONF_DIR}/openib.conf                                                
+       echo "# Load OCRDMA modules" >> %{RDMA_CONF_DIR}/openib.conf
+       echo "OCRDMA_LOAD=yes" >> %{RDMA_CONF_DIR}/openib.conf
+%endif
+
 fi # 1 : closed
 # END of post
 
@@ -589,7 +603,7 @@ fi
 /etc/modprobe.d/ib_sdp.conf
 %endif
 %endif
-%if %{build_mlx4}
+%if %{build_mlx4} || %{build_mlx5}
 %{_bindir}/ibdev2netdev
 %endif
 %if %{build_mlx4_en}
index a969efb28e4e078139a60318429cf3247af1ef02..9965656205b2f104b4f0826dcef12f48fe5355eb 100644 (file)
@@ -290,7 +290,7 @@ fi
 
 GEN1_UNLOAD_MODULES="ib_srp_target scsi_target ib_srp kdapltest_module ib_kdapl ib_sdp ib_useraccess ib_useraccess_cm ib_cm ib_dapl_srv ib_ip2pr ib_ipoib ib_tavor mod_thh mod_rhh ib_dm_client ib_sa_client ib_client_query ib_poll ib_mad ib_core ib_services"
 
-UNLOAD_MODULES="ib_mthca mlx5_ib mlx5_core mlx4_ib ib_ipath ipath_core ib_ehca iw_nes cxgb3i iw_cxgb3 cxgb3 iw_cxgb4 cxgb4"
+UNLOAD_MODULES="ib_mthca mlx5_ib mlx5_core mlx4_ib ib_ipath ipath_core ib_ehca iw_nes cxgb3i iw_cxgb3 cxgb3 iw_cxgb4 cxgb4 ocrdma"
 UNLOAD_MODULES="$UNLOAD_MODULES ib_qib"
 UNLOAD_MODULES="$UNLOAD_MODULES ib_ipoib ib_madeye ib_rds"
 UNLOAD_MODULES="$UNLOAD_MODULES rds_rdma rds_tcp rds ib_ucm kdapl ib_srp_target scsi_target ib_srpt ib_srp ib_iser ib_sdp"
@@ -298,7 +298,7 @@ UNLOAD_MODULES="$UNLOAD_MODULES rdma_ucm rdma_cm ib_addr iw_cm ib_cm ib_local_sa
 UNLOAD_MODULES="$UNLOAD_MODULES ib_sa ib_uverbs ib_umad ib_mad ib_core"
 
 STATUS_MODULES="rdma_ucm ib_rds rds rds_rdma rds_tcp ib_srpt ib_srp qlgc_vnic ib_sdp 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"
-STATUS_MODULES="$STATUS_MODULES ib_qib"
+STATUS_MODULES="$STATUS_MODULES ib_qib ocrdma"
 
 ipoib_ha_pidfile=/var/run/ipoib_ha.pid
 srp_daemon_pidfile=/var/run/srp_daemon.pid
@@ -851,6 +851,18 @@ start()
         RC=$[ $RC + $my_rc ]
     fi
 
+    # Load Emulex One Connect driver
+    if [ "X${OCRDMA_LOAD}" == "Xyes" ]; then
+        load_module ocrdma
+        my_rc=$?
+        if [ $my_rc -ne 0 ]; then
+                echo_failure $"Loading Emulex One Connect driver: "
+       elif [ -s ${_truescale} ]; then
+                . ${_truescale} start
+        fi
+        RC=$[ $RC + $my_rc ]
+    fi
+
     ib_set_node_desc > /dev/null 2>&1 &
 
     load_module ib_umad