diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-fabric/ofed |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-fabric/ofed')
-rw-r--r-- | sys-fabric/ofed/Manifest | 9 | ||||
-rw-r--r-- | sys-fabric/ofed/files/90-ib.rules | 5 | ||||
-rw-r--r-- | sys-fabric/ofed/files/openib | 242 | ||||
-rw-r--r-- | sys-fabric/ofed/files/openib.conf | 27 | ||||
-rw-r--r-- | sys-fabric/ofed/files/openib.env | 1 | ||||
-rw-r--r-- | sys-fabric/ofed/files/openib.modprobe | 12 | ||||
-rw-r--r-- | sys-fabric/ofed/metadata.xml | 19 | ||||
-rw-r--r-- | sys-fabric/ofed/ofed-3.12_rc1.ebuild | 149 |
8 files changed, 464 insertions, 0 deletions
diff --git a/sys-fabric/ofed/Manifest b/sys-fabric/ofed/Manifest new file mode 100644 index 000000000000..8aec64212e53 --- /dev/null +++ b/sys-fabric/ofed/Manifest @@ -0,0 +1,9 @@ +AUX 90-ib.rules 232 SHA256 c44d4937d60bb5b02d2b73d0a0e59a6b094555b060e31f2193c546dfe146f5d3 SHA512 2d2662e9b7dbc3b8d9f08467890f0a154144d6ecd0a72e7e5de44d2b2a5a4858cc27d6d626576251ba657754b226237b6a5d7f9daf6721566bf1b837d746630f WHIRLPOOL 2fd2df383a9eb27500e819f810dce9a3224d08ce15875462bfc3665ff76a4fe3df6f3a5010de11d3eea79a6bf50b520ee91c15626ec0c0d1e7ec48fefd835ccb +AUX openib 6850 SHA256 b6e696a6b4b5d492aa9df32ce858d660754a270bbd63ca11cead44ea91a75708 SHA512 46b86e88fc2b7392f55a5e2eeb89d223114babc5a56f9dd834f2b43ba019162db4f0a26fcd0846b9c3bbf99763c4a857da7b93dbcc93fbb843360a6286918a74 WHIRLPOOL 64b6381864e744072db49b7fab02e884160b269d32615236b30069f0a986c43150c271047764eb527181e2b2c7ab9394bd45d4802f8961c3a06efa062260113e +AUX openib.conf 498 SHA256 8c12ebe735d32f75c1bd4b66077e2642fa26a015cfc7992594066d7feb9fa962 SHA512 3db825396e2530da6d978ca46eb4dfd6298dbb797158db6fc9831e8fdcf3eb6b5801804fef3aa8919dae45578fd86267167341cd2f8bc9caaaa874c6613ea336 WHIRLPOOL d3fb7a349ce6c273ba2109b338a441915363f88b587a178050e010f5263bd458bb7cc6c45c1894dfc4863c3c6ae53ffdb067fb249d75203a5b80ddd02f94d398 +AUX openib.env 19 SHA256 5f30d772b77fa4a5aaa1a4ff4188c0f38c0cf6c4138cb6597082c6d20598a467 SHA512 016e4f49809d696f63ecd376d31f9f588cd12afde9bc7d42582219a1ce2bbb53851aa0e340c5def498a5013570cd2f1cf7502df85fa998c978ce9d5bcf41f064 WHIRLPOOL f22d92c532224a2a40b1754205b93ec3c31c652951c1016a87c534e10a2fb4a38c1f243149e00b54d141afda3bd48ad7e690bf987086eb32153a4016e113f8af +AUX openib.modprobe 350 SHA256 32054c7ee7caffc21ed320a9be5d0c2cd85e51295c0515521373d658f55ee68e SHA512 580fd9f53ecf4661181c3d423770e9db75bd767d2efc26115d418b032663f7397637fae5f736d3acc803152af76946b1851b1444da1c4472ca42ca32c84b5d1c WHIRLPOOL e35f1a9c809dbc4f608376a9d4508093c099213f59b34e00100732c2f84782016cf763df75bc8032fa5f1af37647ea38be6e92a1ee9ae3e2958812be42b9d1fe +DIST OFED-3.12-rc1.tgz 22055476 SHA256 14ca8a2b0d68e3ee9a37f475fa9eecd9a5ffd6055135f9d4d9db8319843a94dc SHA512 9f834d6982ab7e8ab47a8b5c958ab2e4c238ef983e47798e7f06655f69672ea1e996297939b381f26ed8c39552f6e62156173d5ddd2f0a7b6cad6aecdd973944 WHIRLPOOL 5a64b1d952890ea0e72e0ca93654a0fabc8f871475b05fcbe3b214ddfe4836f6b92d4fbc9e0f0d79acfe69d8c8d219b2c467c23654021e23eaf85ae6825ea4a9 +EBUILD ofed-3.12_rc1.ebuild 5015 SHA256 ec4e58266673c0eb612d7cb1a189d2411c9eef87c48fc66b209211f5c9d7b7ee SHA512 8324eab3c67106183b1cbf9765f0591106d5f4cbe2b699d6750717c3222a49a0be66dd7e0f60fe66e329092ced5c126aadc57d5ff673250a1122d850efca5fd9 WHIRLPOOL 4d3904cc1ae229f58bca406cd17e63428e95d5f899bcd9cf8a67f5f2d82384c9ff06b08208a7d30faa4966a7890bcb9025a8dfa47aa260eb794c22c4b0a0b392 +MISC ChangeLog 783 SHA256 9d72610b02062bd30bdd285957c832433c76b739daab9bcab11765fef8a6ae47 SHA512 43535432ad1e1c214f00a50f5cfb33ba04d35b5c0cab34fcf60e9a8a5d19334d4e21a2e3d34611aff4d1578dcaccf477822e24cad5383be6c34361611376d104 WHIRLPOOL 29e9a3407429900b4994916df025c13252f8c0b232c125173f9e829e9de031db1b37cda45bd5d23e1dd3c611cc7163002513824a528f8defdfc0f38d3e29b50a +MISC metadata.xml 841 SHA256 c325271e5cf593aa1963cd2c140296498aee58b54076e063ee7caedd8d25b875 SHA512 9bd4684d88eeca4cc85206ab561a70b8280d795c88afac1a8b9140307e5d8f94a46020d6f8c767ac23013d05c9e395f86b7d39d83bfff3189a981d7640c7c300 WHIRLPOOL 3732730991fd578f24146f76574fb7363409b1472d4ee28a4ad64964d3d2aff51e3a3f62ebdf63fde51acd9c55e1e9f13ab9bdada7b13a6961157928feb0ff89 diff --git a/sys-fabric/ofed/files/90-ib.rules b/sys-fabric/ofed/files/90-ib.rules new file mode 100644 index 000000000000..789668486c8c --- /dev/null +++ b/sys-fabric/ofed/files/90-ib.rules @@ -0,0 +1,5 @@ +KERNEL=="umad*", NAME="infiniband/%k" +KERNEL=="issm*", NAME="infiniband/%k" +KERNEL=="uverbs*", NAME="infiniband/%k", MODE="0666" +KERNEL=="ucm*", NAME="infiniband/%k", MODE="0666" +KERNEL=="rdma_cm", NAME="infiniband/%k", MODE="0666" diff --git a/sys-fabric/ofed/files/openib b/sys-fabric/ofed/files/openib new file mode 100644 index 000000000000..b4a7083b070b --- /dev/null +++ b/sys-fabric/ofed/files/openib @@ -0,0 +1,242 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Based on openibd script from openfabrics.org, +# Copyright (c) 2006 Mellanox Technologies. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +depend() { + after hotplug + before net # init openib before starting any ipoib interfaces +} + +OPENIB_CONFDIR=${OPENIB_CONFDIR:-/etc/infiniband} + +if [[ -r ${OPENIB_CONFDIR}/openib.conf ]] ; then + . ${OPENIB_CONFDIR}/openib.conf +fi + +# Setting OpenIB start parameters +POST_LOAD_MODULES="" + +if [ "X${SDP_LOAD}" == "Xyes" ]; then + POST_LOAD_MODULES="$POST_LOAD_MODULES ib_sdp" + IPOIB_LOAD="yes" +fi + +IPOIB=0 +if [ "X${IPOIB_LOAD}" == "Xyes" ]; then + IPOIB=1 +fi + +if [ "X${SRP_LOAD}" == "Xyes" ]; then + POST_LOAD_MODULES="$POST_LOAD_MODULES ib_srp" +fi + +if [ "X${SRP_TARGET_LOAD}" == "Xyes" ]; then + POST_LOAD_MODULES="$POST_LOAD_MODULES ib_srp_target" +fi + +if [ "X${RDMA_CM_LOAD}" == "Xyes" ]; then + POST_LOAD_MODULES="$POST_LOAD_MODULES rdma_cm" +fi + +if [ "X${UCM_LOAD}" == "Xyes" ]; then + POST_LOAD_MODULES="$POST_LOAD_MODULES ib_ucm" +fi + +if [ "X${RDS_LOAD}" == "Xyes" ]; then + POST_LOAD_MODULES="$POST_LOAD_MODULES ib_rds" +fi + +if [ "X${ISER_LOAD}" == "Xyes" ]; then + POST_LOAD_MODULES="$POST_LOAD_MODULES ib_iser" +fi + +if [ "X${RDMA_UCM_LOAD}" == "Xyes" ]; then + POST_LOAD_MODULES="$POST_LOAD_MODULES rdma_ucm" +fi + +PRE_UNLOAD_MODULES="ib_rds ib_ucm kdapl ib_srp_target scsi_target ib_srp ib_iser ib_sdp rdma_ucm rdma_cm ib_addr ib_cm ib_local_sa findex" + +# W/A for unloading modules +POST_UNLOAD_MODULES="$PRE_UNLOAD_MODULES ib_ipoib ib_sa ib_uverbs ib_umad" +# ib_mthca ib_ipath - don't unload unless they are in openib.conf +[[ "${MTHCA_LOAD}" == "yes" ]] && \ + POST_UNLOAD_MODULES="$POST_UNLOAD_MODULES ib_mthca" +[[ "${IPATH_LOAD}" == "yes" ]] && \ + POST_UNLOAD_MODULES="$POST_UNLOAD_MODULES ib_ipath ipath_core" + +[[ "${MTHCA_LOAD}" == "yes" || "${IPATH_LOAD}" == "yes" ]] && \ + POST_UNLOAD_MODULES="$POST_UNLOAD_MODULES ib_mad ib_core" + +#STATUS_MODULES="rdma_ucm ib_rds ib_srp ib_sdp rdma_cm ib_addr ib_local_sa findex ib_ipoib ib_ipath ipath_core ib_mthca ib_uverbs ib_umad ib_ucm ib_sa ib_cm ib_mad ib_core" + + +# If module $1 is loaded return - 0 else - 1 +is_module() +{ + local RC + + /bin/lsmod | grep -w "$1" > /dev/null 2>&1 + RC=$? + + return $RC +} + +unload() +{ + # Unload module $1 + if is_module $mod; then + /sbin/modprobe -r $mod > /dev/null 2>&1 + if [ $? -ne 0 ]; then + # Try rmmod if modprobe failed: case that previous installation included more IB modules. + /sbin/rmmod $mod > /dev/null 2>&1 + if [ $? -ne 0 ]; then + ewarn "Failed to unload $mod" + return 1 + fi + fi + fi +} + +start() { + local RC=0 + ebegin "Initializing Infiniband" + eindent + + # Load Mellanox HCA driver if explicitly requested + # (however, it should be loaded automatically by udev) + + einfo "Loading HCA and Access Layer drivers" + + if [[ "${MTHCA_LOAD}" == "yes" ]]; then + /sbin/modprobe ib_mthca > /dev/null 2>&1 + RC=$[ $RC + $? ] + fi + if [[ "${IPATH_LOAD}" == "yes" ]]; then + /sbin/modprobe ib_ipath > /dev/null 2>&1 + RC=$[ $RC + $? ] + fi + + # Add node description to sysfs + IBSYSDIR="/sys/class/infiniband" + if [ -d ${IBSYSDIR} ]; then + declare -i hca_id=1 + for hca in ${IBSYSDIR}/*; do + if [ -e ${hca}/node_desc ]; then + echo -n "$(hostname -s) HCA-${hca_id}" >> ${hca}/node_desc + fi + let hca_id++ + done + fi + /sbin/modprobe ib_umad > /dev/null 2>&1 + RC=$[ $RC + $? ] + /sbin/modprobe ib_uverbs > /dev/null 2>&1 + RC=$[ $RC + $? ] + + if [ $IPOIB -eq 1 ]; then + # this section is not necessary if all ib-over-ib devices are + # aliased properly in /etc/modules.d/openib + einfo "loading ib_ipoib module" + /sbin/modprobe ib_ipoib > /dev/null 2>&1 + RC=$[ $RC + $? ] + if (( ! RC )); then + # start the ipoib devices automatically... + # this is probably a bad idea (the concept is taken from the + # original SUSE/Redhat-based initscript), and should be removed. + # But it works, and is not enabled by default. So I leave it here + # for second opinions. + local ibdevs=`rc-status -u -nc |egrep 'net\.ib[0-9a-zA-Z]+.*stopped' | awk '{print $1}'` + if [ -n "$ibdevs" ] ; then + einfo "starting ipoib devices" + for ibdev in $ibdevs; do + /etc/init.d/$ibdev start + done + fi + fi + fi + + # Devices for ib_umad and ib_uverbs should now have been created. + if [ ! -d /dev/infiniband/ ]; then + eerror "udev failed to create '/dev/infiniband/' devices" + RC=1 + fi + + # Load configured modules + if [ "$POST_LOAD_MODULES" != "" ]; then + for mod in $POST_LOAD_MODULES + do + case $mod in + ib_iser) + # Voltaire requirement + /sbin/modprobe --force-modversion $mod > /dev/null 2>&1 + ;; + *) + /sbin/modprobe $mod > /dev/null 2>&1 + ;; + esac + RC=$? + [ $RC -ne 0 ] && eerror "Failed to load $mod" + done + fi + + eoutdent + eend $RC +} + +stop() { + ebegin "Stopping Infiniband" + local RC=0 + + # Check if applications which use infiniband are running + local apps="opensm osmtest ibbs ibns" + local pid + + for app in $apps + do + if ( ps -ef | grep $app | grep -v grep > /dev/null 2>&1 ); then + eerror "Please stop $app and all applications running over InfiniBand" + eend 1 + return + fi + done + + if ! is_module ib_core; then + einfo "HCA driver is not loaded" + eend 0 + return + fi + + # Unload ULPs modules + + if [ "$PRE_UNLOAD_MODULES" != "" ]; then + for mod in $PRE_UNLOAD_MODULES + do + unload $mod || { eend 1; return; } + done + fi + + # Remove srp_presistant_bind.sh before removing ib_srp module + PID_SCRPT_TO_KILL=`ps -efww | grep srp_persistent | grep -v grep | awk '{print $2}'` + if ! [ "$PID_SCRPT_TO_KILL" == "" ]; then + PID_SLEEP_TO_KILL=`ps -efww | grep $PID_SCRPT_TO_KILL | grep sleep | awk '{print $2}'` + kill -9 $PID_SCRPT_TO_KILL + fi + if ! [ "$PID_SLEEP_TO_KILL" == "" ]; then + kill -9 $PID_SLEEP_TO_KILL + fi + + # Unload OpenIB modules + + if [ "$POST_UNLOAD_MODULES" != "" ]; then + for mod in $POST_UNLOAD_MODULES + do + unload $mod || RC=1 + done + fi + + eend $RC +} + diff --git a/sys-fabric/ofed/files/openib.conf b/sys-fabric/ofed/files/openib.conf new file mode 100644 index 000000000000..9b4eb292857c --- /dev/null +++ b/sys-fabric/ofed/files/openib.conf @@ -0,0 +1,27 @@ +# uncomment to load ib_ipoib module +#IPOIB_LOAD=yes + +# uncomment to load ib_sdp module (implies IPOIB_LOAD=yes) +#SDP_LOAD=yes + +# uncomment to load ib_srp module +#SRP_LOAD=yes + +# uncomment to load ib_srp_target module +#SRP_TARGET_LOAD=yes + +# uncomment to load rdma_cm module +#RDMA_CM_LOAD=yes + +# uncomment to load ib_ucm module +#UCM_LOAD=yes + +# uncomment to load ib_rds module +#RDS_LOAD=yes + +# uncomment to load ib_iser module +#ISER_LOAD=yes + +# uncomment to load rdma_ucm module +#RDMA_UCM_LOAD=yes + diff --git a/sys-fabric/ofed/files/openib.env b/sys-fabric/ofed/files/openib.env new file mode 100644 index 000000000000..2e34cf22f96b --- /dev/null +++ b/sys-fabric/ofed/files/openib.env @@ -0,0 +1 @@ +IBPATH="/usr/sbin" diff --git a/sys-fabric/ofed/files/openib.modprobe b/sys-fabric/ofed/files/openib.modprobe new file mode 100644 index 000000000000..52828fb3bf65 --- /dev/null +++ b/sys-fabric/ofed/files/openib.modprobe @@ -0,0 +1,12 @@ +# Setup aliases from ip-over-ib devices to the ip-over-ib kernel module. +# Add to this list if you have more infiniband ports. Or you can set +# IPOIB_LOAD=yes to have the ip-over-ib interfaces brought up by init.d/openib +alias ib0 ib_ipoib +alias ib1 ib_ipoib +alias ib2 ib_ipoib +alias ib3 ib_ipoib + +alias net-pf-27 ib_sdp + +#options ib_mthca msi_x=1 + diff --git a/sys-fabric/ofed/metadata.xml b/sys-fabric/ofed/metadata.xml new file mode 100644 index 000000000000..993d84db31f4 --- /dev/null +++ b/sys-fabric/ofed/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>cluster@gentoo.org</email> + <name>Gentoo Cluster Project</name> + </maintainer> + <use> + <flag name="dapl">Add support for DAPL abstraction layer</flag> + <flag name="diags">Add dignostic tools for infiniband</flag> + <flag name="ibacm">Add support for userspace pre-connection services</flag> + <flag name="mstflint">Tools to burn Mellanox firmware</flag> + <flag name="opensm">Add OpenSM - Subnet manager for infiniband</flag> + <flag name="perftest">Add perftest utils</flag> + <flag name="qperf">Add rdma tests</flag> + <flag name="srp">Suport for userspace part for srp initiator</flag> + <flag name="rds">Tools to manage rds sockets</flag> + </use> +</pkgmetadata> diff --git a/sys-fabric/ofed/ofed-3.12_rc1.ebuild b/sys-fabric/ofed/ofed-3.12_rc1.ebuild new file mode 100644 index 000000000000..59cbf9fbb9e1 --- /dev/null +++ b/sys-fabric/ofed/ofed-3.12_rc1.ebuild @@ -0,0 +1,149 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +OFED_VER="3.12" +OFED_RC="1" +OFED_RC_VER="1" +OFED_SUFFIX="1.g8336567" + +IUSE_OFED_DRIVERS=" + ofed_drivers_cxgb3 + ofed_drivers_cxgb4 + ofed_drivers_ehca + ofed_drivers_ipath + ofed_drivers_mlx4 + ofed_drivers_mlx5 + ofed_drivers_mthca + ofed_drivers_nes + ofed_drivers_ocrdma + ofed_drivers_psm" + +inherit openib udev toolchain-funcs + +DESCRIPTION="OpenIB system files" +KEYWORDS="~amd64 ~x86 ~amd64-linux" +IUSE="dapl +diags ibacm mstflint +opensm perftest qperf rds srp ${IUSE_OFED_DRIVERS}" + +RDEPEND="!sys-fabric/openib + !sys-fabric/openib-files + sys-fabric/libibcm:${SLOT} + sys-fabric/libibmad:${SLOT} + sys-fabric/libibumad:${SLOT} + sys-fabric/librdmacm:${SLOT} + dapl? ( sys-fabric/dapl:${SLOT} ) + diags? ( sys-fabric/infiniband-diags:${SLOT} ) + ibacm? ( sys-fabric/ibacm:${SLOT} ) + mstflint? ( sys-fabric/mstflint:${SLOT} ) + opensm? ( sys-fabric/opensm:${SLOT} ) + perftest? ( sys-fabric/perftest:${SLOT} ) + qperf? ( sys-fabric/qperf:${SLOT} ) + srp? ( sys-fabric/srptools:${SLOT} ) + rds? ( sys-fabric/rds-tools:${SLOT} ) + ofed_drivers_cxgb3? ( sys-fabric/libcxgb3:${SLOT} ) + ofed_drivers_cxgb4? ( sys-fabric/libcxgb4:${SLOT} ) + ofed_drivers_ehca? ( sys-fabric/libehca:${SLOT} ) + ofed_drivers_ipath? ( sys-fabric/libipathverbs:${SLOT} ) + ofed_drivers_mlx4? ( sys-fabric/libmlx4:${SLOT} ) + ofed_drivers_mlx5? ( sys-fabric/libmlx5:${SLOT} ) + ofed_drivers_mthca? ( sys-fabric/libmthca:${SLOT} ) + ofed_drivers_nes? ( sys-fabric/libnes:${SLOT} ) + ofed_drivers_ocrdma? ( sys-fabric/libocrdma:${SLOT} ) + ofed_drivers_psm? ( sys-fabric/infinipath-psm:${SLOT} ) + " +DEPEND="${RDEPEND} + virtual/pkgconfig + " +block_other_ofed_versions + +S="${WORKDIR}/${MY_PN}-${OFED_VER}" +SCRIPTDIR="${S}/ofed_scripts" + +src_configure() { :; } +src_compile() { :; } + +src_install() { + udev_newrules "${SCRIPTDIR}/90-ib.rules" 40-ib.rules + insinto /etc/modprobe.d + newins "${FILESDIR}/openib.modprobe" openib.conf + newenvd "${FILESDIR}/openib.env" 02openib + insinto /etc/infiniband + + doinitd "${FILESDIR}/openib" + + # build openib.conf based on ofed_scripts/ofa_kernel.spec + build_ipoib=1 + cp "${SCRIPTDIR}/openib.conf" "${T}" + IB_CONF_DIR=${T} + echo >> ${IB_CONF_DIR}/openib.conf + echo "# Load UCM module" >> ${IB_CONF_DIR}/openib.conf + echo "UCM_LOAD=no" >> ${IB_CONF_DIR}/openib.conf + echo >> ${IB_CONF_DIR}/openib.conf + echo "# Load RDMA_CM module" >> ${IB_CONF_DIR}/openib.conf + echo "RDMA_CM_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf + echo >> ${IB_CONF_DIR}/openib.conf + echo "# Load RDMA_UCM module" >> ${IB_CONF_DIR}/openib.conf + echo "RDMA_UCM_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf + echo >> ${IB_CONF_DIR}/openib.conf + echo "# Increase ib_mad thread priority" >> ${IB_CONF_DIR}/openib.conf + echo "RENICE_IB_MAD=no" >> ${IB_CONF_DIR}/openib.conf + + echo >> ${IB_CONF_DIR}/openib.conf + echo "# Load MTHCA" >> ${IB_CONF_DIR}/openib.conf + echo "MTHCA_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf + if use ofed_drivers_ipath; then + echo >> ${IB_CONF_DIR}/openib.conf + echo "# Load IPATH" >> ${IB_CONF_DIR}/openib.conf + echo "IPATH_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf + fi + if use ofed_drivers_ehca; then + echo >> ${IB_CONF_DIR}/openib.conf + echo "# Load eHCA" >> ${IB_CONF_DIR}/openib.conf + echo "EHCA_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf + fi + if use ofed_drivers_mlx4; then + echo >> ${IB_CONF_DIR}/openib.conf + echo "# Load MLX4 modules" >> ${IB_CONF_DIR}/openib.conf + echo "MLX4_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf + fi + if (( build_ipoib )); then + echo >> ${IB_CONF_DIR}/openib.conf + echo "# Load IPoIB" >> ${IB_CONF_DIR}/openib.conf + echo "#IPOIB_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf + echo >> ${IB_CONF_DIR}/openib.conf + echo "# Enable IPoIB Connected Mode" >> ${IB_CONF_DIR}/openib.conf + echo "#SET_IPOIB_CM=yes" >> ${IB_CONF_DIR}/openib.conf + # from ofa_user.spec: + echo >> ${IB_CONF_DIR}/openib.conf + echo "# Enable IPoIB High Availability daemon" >> ${IB_CONF_DIR}/openib.conf + echo "#IPOIBHA_ENABLE=no" >> ${IB_CONF_DIR}/openib.conf + echo "# PRIMARY_IPOIB_DEV=ib0" >> ${IB_CONF_DIR}/openib.conf + echo "# SECONDARY_IPOIB_DEV=ib1" >> ${IB_CONF_DIR}/openib.conf + fi + if use srp; then + echo >> ${IB_CONF_DIR}/openib.conf + echo "# Load SRP module" >> ${IB_CONF_DIR}/openib.conf + echo "#SRP_LOAD=no" >> ${IB_CONF_DIR}/openib.conf + # from ofa_user.spec: + echo >> ${IB_CONF_DIR}/openib.conf + echo "# Enable SRP High Availability daemon" >> ${IB_CONF_DIR}/openib.conf + echo "#SRPHA_ENABLE=no" >> ${IB_CONF_DIR}/openib.conf + + fi + if use rds; then + echo >> ${IB_CONF_DIR}/openib.conf + echo "# Load RDS module" >> ${IB_CONF_DIR}/openib.conf + echo "#RDS_LOAD=no" >> ${IB_CONF_DIR}/openib.conf + fi + + doins "${T}/openib.conf" +} + +pkg_postinst() { + einfo "Configuration file installed in /etc/infiniband/openib.conf" + einfo "To automatically initialize infiniband on boot, add openib to your" + einfo "start-up scripts, like so:" + einfo "\`rc-update add openib default\`" + +} |