From fefd80b06a3f4d0b910c8d383f34b76813966c36 Mon Sep 17 00:00:00 2001 From: Doug Ledford Date: Feb 29 2012 03:11:33 +0000 Subject: Update to 3.3.13, fix init script LSB headers, add subnet_prefix support Signed-off-by: Doug Ledford --- diff --git a/.gitignore b/.gitignore index 2278e2f..96bf36e 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,5 @@ opensm-3.3.9/ /opensm-3.3.12.tar.gz /opensm-3.3.12.conf opensm-3.3.12/ - +/opensm-3.3.13.tar.gz +/opensm-3.3.13/ diff --git a/opensm-3.3.13-prefix.patch b/opensm-3.3.13-prefix.patch new file mode 100644 index 0000000..cd1ea5c --- /dev/null +++ b/opensm-3.3.13-prefix.patch @@ -0,0 +1,58 @@ +diff -up opensm-3.3.13/man/opensm.8.in.prefix opensm-3.3.13/man/opensm.8.in +--- opensm-3.3.13/man/opensm.8.in.prefix 2012-02-28 18:27:33.297714661 -0500 ++++ opensm-3.3.13/man/opensm.8.in 2012-02-28 18:31:00.957696942 -0500 +@@ -11,6 +11,7 @@ opensm \- InfiniBand subnet manager and + [\-g(uid) ] + [\-l(mc) ] + [\-p(riority) ] ++[\-\-subnet_prefix ] + [\-smkey ] + [\-\-sm_sl ] + [\-r(eassign_lids)] +@@ -130,6 +131,13 @@ This will effect the handover cases, whe + is chosen by priority and GUID. Range goes from 0 + (default and lowest priority) to 15 (highest). + .TP ++\fB\-\-subnet_prefix\fR ++This option specifies the subnet prefix to use in ++on the fabric. The default prefix is ++0xfe80000000000000. OpenMPI in particular requires ++separate fabrics plugged into different ports to ++have different prefixes or else it won't run. ++.TP + \fB\-smkey\fR + This option specifies the SM\'s SM_Key (64 bits). + This will effect SM authentication. +diff -up opensm-3.3.13/opensm/main.c.prefix opensm-3.3.13/opensm/main.c +--- opensm-3.3.13/opensm/main.c.prefix 2012-01-17 08:22:40.000000000 -0500 ++++ opensm-3.3.13/opensm/main.c 2012-02-28 18:31:34.224694111 -0500 +@@ -156,6 +156,9 @@ static void show_usage(void) + " This will effect the handover cases, where master\n" + " is chosen by priority and GUID. Range goes\n" + " from 0 (lowest priority) to 15 (highest).\n\n"); ++ printf("--subnet_prefix \n" ++ " Set the subnet prefix to something other than the\n" ++ " default value of 0xfe80000000000000\n\n"); + printf("--smkey, -k \n" + " This option specifies the SM's SM_Key (64 bits).\n" + " This will effect SM authentication.\n" +@@ -607,6 +610,7 @@ int main(int argc, char *argv[]) + {"once", 0, NULL, 'o'}, + {"reassign_lids", 0, NULL, 'r'}, + {"priority", 1, NULL, 'p'}, ++ {"subnet_prefix", 1, NULL, 13}, + {"smkey", 1, NULL, 'k'}, + {"routing_engine", 1, NULL, 'R'}, + {"ucast_cache", 0, NULL, 'A'}, +@@ -911,6 +915,11 @@ int main(int argc, char *argv[]) + printf(" Priority = %d\n", temp); + break; + ++ case 13: ++ opt.subnet_prefix = cl_hton64(strtoull(optarg, NULL, 16)); ++ printf(" Subnet_Prefix = <0x%" PRIx64 ">\n", cl_hton64(opt.subnet_prefix)); ++ break; ++ + case 'k': + sm_key = cl_hton64(strtoull(optarg, NULL, 16)); + printf(" SM Key <0x%" PRIx64 ">\n", cl_hton64(sm_key)); diff --git a/opensm.initd b/opensm.initd index 3ae4b8b..2d8a0ba 100644 --- a/opensm.initd +++ b/opensm.initd @@ -9,7 +9,8 @@ ### BEGIN INIT INFO # Provides: opensm # Default-Stop: 0 1 2 3 4 5 6 -# Required-Start: $openib +# Required-Start: rdma +# Required-Stop: rdma # Short-Description: Starts/Stops the InfiniBand Subnet Manager # Description: Starts/Stops the InfiniBand Subnet Manager ### END INIT INFO @@ -47,8 +48,11 @@ start() [ -n "$GUIDS" ] && echo -n "$GUID_CNT guids " [ -n "$CONFIGS" ] && echo -n "$CONFIG_CNT instances " if [ -n "$GUIDS" ]; then + SUBNET_COUNT=0 for guid in $GUIDS; do - $prog -B $prio -g $guid >/dev/null 2>&1 + SUBNET_PREFIX=`printf "0xfe800000000000%02d" $SUBNET_COUNT` + $prog -B $prio -g $guid --subnet_prefix $SUBNET_PREFIX >/dev/null 2>&1 + let SUBNET_COUNT++ done elif [ -n "$CONFIGS" ]; then for config in $CONFIGS; do diff --git a/opensm.spec b/opensm.spec index 6b34d7d..e3cca37 100644 --- a/opensm.spec +++ b/opensm.spec @@ -1,5 +1,5 @@ Name: opensm -Version: 3.3.12 +Version: 3.3.13 Release: 1%{?dist} Summary: OpenIB InfiniBand Subnet Manager and management utilities Group: System Environment/Daemons @@ -10,6 +10,7 @@ Source1: opensm.conf Source2: opensm.logrotate Source3: opensm.initd Source4: opensm.sysconfig +Patch0: opensm-3.3.13-prefix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libibmad-devel = 1.3.8, libtool, bison, flex, byacc Requires: %{name}-libs = %{version}-%{release}, logrotate, rdma @@ -47,6 +48,7 @@ Static version of opensm libraries %prep %setup -q +%patch0 -p1 -b .prefix %build %configure --with-opensm-conf-sub-dir=rdma @@ -112,6 +114,12 @@ fi %{_libdir}/lib*.a %changelog +* Tue Feb 28 2012 Doug Ledford - 3.3.13-1 +- Update to latest upstream version +- Fix a minor issue in init scripts that would cause systemd to try and + start/stop things in the wrong order +- Add a patch to allow us to specify the subnet prefix on the command line + * Tue Jan 03 2012 Doug Ledford - 3.3.12-1 - Update to latest upstream version diff --git a/sources b/sources index e27513f..d69ac4b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -66beeccf6b16550609b37d588c0589ee opensm-3.3.12.tar.gz +6e667badb126a5e21ea2ab90cd950226 opensm-3.3.13.tar.gz