[rdma: 1/2] Lots of minor fixes, add support for ocrdma
Doug Ledford
dledford at fedoraproject.org
Mon Mar 25 22:43:22 UTC 2013
commit 1cfb1e8e1f0f3ac7f4be5c00a2b2fdcab5dfd37b
Author: Doug Ledford <dledford at redhat.com>
Date: Mon Mar 25 18:41:04 2013 -0400
Lots of minor fixes, add support for ocrdma
Signed-off-by: Doug Ledford <dledford at redhat.com>
rdma.conf | 2 +
rdma.init | 474 -------------------------------------------------------
rdma.sbin | 18 ++-
rdma.spec | 26 +---
rdma.udev-rules | 1 +
5 files changed, 23 insertions(+), 498 deletions(-)
---
diff --git a/rdma.conf b/rdma.conf
index 7bed63d..67b4ddc 100644
--- a/rdma.conf
+++ b/rdma.conf
@@ -2,6 +2,8 @@
IPOIB_LOAD=yes
# Load SRP module
SRP_LOAD=no
+# Load SRPT module
+SRPT_LOAD=no
# Load iSER module
ISER_LOAD=no
# Load RDS network protocol
diff --git a/rdma.sbin b/rdma.sbin
index 1b81cd2..b960200 100644
--- a/rdma.sbin
+++ b/rdma.sbin
@@ -6,6 +6,8 @@
# event in udev has triggered a start of the rdma.service unit
#
+shopt -s nullglob
+
CONFIG=/etc/rdma/rdma.conf
MTRR_SCRIPT=/usr/sbin/rdma-fixup-mtrr.awk
@@ -33,6 +35,10 @@ if [ -f $CONFIG ]; then
LOAD_ULP_MODULES="$LOAD_ULP_MODULES ib_srp"
fi
+ if [ "${SRPT_LOAD}" == "yes" ]; then
+ LOAD_ULP_MODULES="$LOAD_ULP_MODULES ib_srpt"
+ fi
+
if [ "${ISER_LOAD}" == "yes" ]; then
LOAD_ULP_MODULES="$LOAD_ULP_MODULES ib_iser"
fi
@@ -118,6 +124,10 @@ load_hardware_modules()
load_modules mlx4_ib
RC+=$?
fi
+ if is_module be2net -a ! is_module ocrdma; then
+ load_modules ocrdma
+ RC+=$?
+ fi
return $RC
}
@@ -198,14 +208,14 @@ RC=$[ $RC + $? ]
# Add node description to sysfs
IBSYSDIR="/sys/class/infiniband"
if [ -d ${IBSYSDIR} ]; then
- declare -i hca_id=1
- for hca in ${IBSYSDIR}/*
+ pushd $IBSYSDIR
+ for hca in *
do
if [ -w ${hca}/node_desc ]; then
- echo -n "$(hostname | cut -f 1 -d .) HCA-${hca_id}" >> ${hca}/node_desc 2> /dev/null
+ echo -n "$(hostname -s) ${hca}" >> ${hca}/node_desc 2> /dev/null
fi
- let hca_id++
done
+ popd
fi
errata_58
diff --git a/rdma.spec b/rdma.spec
index 6c444de..b308637 100644
--- a/rdma.spec
+++ b/rdma.spec
@@ -6,11 +6,10 @@
Summary: Infiniband/iWARP Kernel Module Initializer
Name: rdma
Version: 2.0
-Release: 6%{?dist}
+Release: 7%{?dist}
License: GPLv2+
Group: System Environment/Base
Source0: rdma.conf
-Source1: rdma.init
Source2: rdma.fixup-mtrr.awk
Source4: rdma.ifup-ib
Source5: rdma.ifdown-ib
@@ -46,7 +45,6 @@ be used to start the RDMA subsystem in the kernel.
%install
rm -rf %{buildroot}
-install -d %{buildroot}%{_initrddir}
install -d %{buildroot}%{_sysconfdir}/%{name}
install -d %{buildroot}%{_sysconfdir}/sysconfig/network-scripts
install -d %{buildroot}%{_sbindir}
@@ -62,9 +60,6 @@ install -m 0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/
install -m 0755 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifdown-ib
install -m 0644 %{SOURCE8} %{buildroot}/lib/udev/rules.d/98-rdma.rules
-#Stuff for the SysV package
-install -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
-
%clean
rm -rf %{buildroot}
@@ -77,16 +72,6 @@ rm -rf %{buildroot}
%postun
%systemd_postun
-%post sysv
-if [ $1 = 1 ]; then
- /sbin/chkconfig --add %{name}
-fi
-
-%preun sysv
-if [ $1 = 0 ]; then
- /sbin/chkconfig --del %{name}
-fi
-
%files
%defattr(-,root,root,-)
%dir %{_sysconfdir}/%{name}
@@ -97,11 +82,12 @@ fi
%{_sysconfdir}/sysconfig/network-scripts/*
/lib/udev/rules.d/*
-%files sysv
-%defattr(-,root,root,-)
-%{_initrddir}/%{name}
-
%changelog
+* Mon Mar 25 2013 Doug Ledford <dledford at redhat.com> - 2.0-7
+- Drop the sysv package
+- Add the SRPT module to the conf file and startup script
+- Add support for the new ocrdma driver from Emulex
+
* Wed Dec 05 2012 Doug Ledford <dledford at redhat.com> - 2.0-6
- Add some proper systemd scriptlets
- Resolves: bz820154, bz816073, bz816389
diff --git a/rdma.udev-rules b/rdma.udev-rules
index d9cf5ba..64dcd80 100644
--- a/rdma.udev-rules
+++ b/rdma.udev-rules
@@ -12,3 +12,4 @@ SUBSYSTEM=="module", KERNEL=="ib_ipath", ACTION=="add", TAG+="systemd", ENV{SYST
SUBSYSTEM=="module", KERNEL=="ib_qib", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
SUBSYSTEM=="module", KERNEL=="iw_c2", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
SUBSYSTEM=="module", KERNEL=="iw_nes", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
+SUBSYSTEM=="module", KERNEL=="be2net", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}="rdma.service"
More information about the scm-commits
mailing list