From: Sean Hefty Date: Fri, 30 Mar 2012 23:31:08 +0000 (-0700) Subject: squash X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=acdcc1ca9889a59c7401608524bed85adfd2b53e;p=~shefty%2Fibacm.git squash --- diff --git a/meta b/meta index 733f8a5..bdf46f2 100644 --- a/meta +++ b/meta @@ -1,13 +1,10 @@ Version: 1 -Previous: 8efe6d97d542c7cff21bbff9694f7669a6dc3f53 -Head: 671da1790a0bc0557d41eea2ecae65e7864c2f4f +Previous: 74f7886d5ae857032323110534a5c770a672507b +Head: bedee4ca29356061a94609eef2ccb3e17d685ef6 Applied: af_ib: fb683ba55480ada43c09aa48b3cb18bde139f72c - rename-ibacm: 671da1790a0bc0557d41eea2ecae65e7864c2f4f + daemonize: bedee4ca29356061a94609eef2ccb3e17d685ef6 Unapplied: - file-loc: 7b9046cc7c36bd011db1af281d2a65e97ee5e159 - init-script: 6f4b68987f24611b3f7e351617b027e188e202db - fixup-man: f93f3f442320c63fcb8440d3e7da5a5c7c3241a1 rel-1.0.6: fd63c4b8b84033117793407c193000cdafefa9c6 dev-name2ip: 8e00708e882239292492e13aa51c82042255933c dev-addrsize: 8de02c47fbf595132105a7050ad6f755f49f9a7a diff --git a/patches/daemonize b/patches/daemonize new file mode 100644 index 0000000..c30ccd8 --- /dev/null +++ b/patches/daemonize @@ -0,0 +1,608 @@ +Bottom: 163f50499aea8749e94a5c93c4939e5f74ae1906 +Top: f64639c8ee9ade3de867ad095b9aca1b824c125e +Author: Sean Hefty +Date: 2012-03-30 16:31:08 -0700 + +Fix ibacm daemon installation + +Set of changes to fixup the ibacm package for inclusion into RedHat 6. +Changes are based on feedback from Doug Ledford . + +Name the service executable the same as the package name. + +Move location of ACM lock and configuration files and ibacm.pid +files. They are currently in non-standard locations. + +Add init script as part of install. + +Fixup man pages based on changes. + +Signed-off-by: Doug Ledford +Signed-off-by: Sean Hefty + +--- + +diff --git a/Makefile.am b/Makefile.am +index 503ad72..ccd48a1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -3,10 +3,10 @@ INCLUDES = -I$(srcdir)/include -I$(srcdir)/linux + AM_CFLAGS = -g -Wall -D_GNU_SOURCE + + bin_PROGRAMS = util/ib_acme +-sbin_PROGRAMS = svc/ib_acm +-svc_ib_acm_SOURCES = src/acm.c ++sbin_PROGRAMS = svc/ibacm ++svc_ibacm_SOURCES = src/acm.c + util_ib_acme_SOURCES = src/acme.c linux/acme_linux.c src/libacm.c linux/libacm_linux.c src/parse.c +-svc_ib_acm_CFLAGS = $(AM_CFLAGS) ++svc_ibacm_CFLAGS = $(AM_CFLAGS) + util_ib_acme_CFLAGS = $(AM_CFLAGS) + + ibacmincludedir = $(includedir)/infiniband +@@ -15,12 +15,19 @@ ibacminclude_HEADERS = include/infiniband/acm.h + + man_MANS = \ + man/ib_acme.1 \ +- man/ib_acm.1 \ +- man/ib_acm.7 ++ man/ibacm.1 \ ++ man/ibacm.7 + +-EXTRA_DIST = src/acm_mad.h src/libacm.h \ +- linux/osd.h linux/dlist.h ibacm.spec.in $(man_MANS) acm_opts.cfg \ +- acm_addr.cfg ++EXTRA_DIST = src/acm_mad.h src/libacm.h ibacm.init \ ++ linux/osd.h linux/dlist.h ibacm.spec.in $(man_MANS) ibacm_opts.cfg \ ++ ibacm_addr.cfg ++ ++install-exec-hook: ++ if ! test -d $(DESTDIR)$(sysconfdir); then \ ++ mkdir -p $(DESTDIR)$(sysconfdir); \ ++ fi; \ ++ install -m 644 ibacm_opts.cfg $(DESTDIR)$(sysconfdir)/ibacm_opts.cfg; \ ++ install -m 644 ibacm_addr.cfg $(DESTDIR)$(sysconfdir)/ibacm_addr.cfg; + + dist-hook: ibacm.spec + cp ibacm.spec $(distdir) +diff --git a/ibacm.init b/ibacm.init +new file mode 100644 +index 0000000..8f863eb +--- /dev/null ++++ b/ibacm.init +@@ -0,0 +1,100 @@ ++#!/bin/bash ++# ++# Bring up/down the ibacm daemon ++# ++# chkconfig: 2345 25 75 ++# description: Starts/Stops InfiniBand ACM service ++# ++### BEGIN INIT INFO ++# Provides: ibacm ++# Default-Start: 2 3 4 5 ++# Default-Stop: 0 1 6 ++# Required-Start: rdma $network ++# Required-Stop: rdma $network ++# Should-Start: ++# Should-Stop: ++# Short-Description: Starts and stops the InfiniBand ACM service ++# Description: The InfiniBand ACM service provides a user space implementation ++# of someting resembling an ARP cache for InfiniBand SA queries and ++# host route lookups. ++### END INIT INFO ++ ++pidfile=/var/run/ibacm.pid ++subsys=/var/lock/subsys/ibacm ++prog=/usr/sbin/ibacm ++ ++. /etc/rc.d/init.d/functions ++ ++start() ++{ ++ echo -n "Starting ibacm daemon:" ++ ++ daemon $prog ++ RC=$? ++ [ $RC -eq 0 ] && touch $subsys ++ echo ++ return $RC ++} ++ ++stop() ++{ ++ echo -n "Stopping ibacm daemon:" ++ ++ killproc -p $pidfile $prog ++ RC=$? ++ rm -f $subsys ++ echo ++ return $RC ++} ++ ++status() ++{ ++ if [ ! -f $subsys -a ! -f $pidfile ]; then ++ return 3 ++ fi ++ if [ -f $pidfile ]; then ++ checkpid `cat $pidfile` ++ return $? ++ fi ++ if [ -f $subsys ]; then ++ return 2 ++ fi ++} ++ ++restart () ++{ ++ stop ++ start ++} ++ ++condrestart () ++{ ++ [ -e $subsys ] && restart || return 0 ++} ++ ++usage () ++{ ++ echo ++ echo "Usage: `basename $0` {start|stop|restart|condrestart|try-restart|force-reload|status}" ++ echo ++ return 2 ++} ++ ++case $1 in ++ start|stop|restart|condrestart|try-restart|force-reload) ++ [ `id -u` != "0" ] && exit 4 ;; ++esac ++ ++case $1 in ++ start) start; RC=$? ;; ++ stop) stop; RC=$? ;; ++ restart) restart; RC=$? ;; ++ reload) RC=3 ;; ++ condrestart) condrestart; RC=$? ;; ++ try-restart) condrestart; RC=$? ;; ++ force-reload) condrestart; RC=$? ;; ++ status) status; RC=$? ;; ++ *) usage; RC=$? ;; ++esac ++ ++exit $RC +diff --git a/ibacm.spec.in b/ibacm.spec.in +index a926fea..31d5a07 100644 +--- a/ibacm.spec.in ++++ b/ibacm.spec.in +@@ -1,53 +1,89 @@ +-%define ver @VERSION@ +- + Name: ibacm + Version: 1.0.5 + Release: 1%{?dist} + Summary: InfiniBand Communication Manager Assistant + +-Group: System Environment/Libraries ++Group: System Environment/Daemons + License: GPLv2 or BSD + Url: http://www.openfabrics.org/ + Source: http://www.openfabrics.org/downloads/rdmacm/%{name}-%{version}.tar.gz ++Source1: ibacm.init + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +-BuildRequires: libibverbs-devel >= 1.1-1 ++BuildRequires: libibverbs-devel >= 1.1-1, autoconf, libtool, libibumad-devel ++Requires(post): chkconfig ++Requires(preun): chkconfig ++ExcludeArch: s390, s390x + + %description +-ibacm assists with establishing communication over Infiniband. ++The ib_acm daemon helps reduce the load of managing path record lookups on ++large InfiniBand fabrics by providing a user space implementation of what ++is functionally similar to an ARP cache. The use of ib_acm, when properly ++configured, can reduce the SA packet load of a large IB cluster from O(n^2) ++to O(n). The ib_acm daemon is started and normally runs in the background, ++user applications need not know about this daemon as long as their app ++uses librdmacm to handle connection bring up/tear down. The librdmacm ++library knows how to talk directly to the ib_acm daemon to retrieve data. + +-%package svc +-Summary: IB CM pre-connection service application +-Group: System Environment/Libraries +-Requires: %{name} = %{version}-%{release} %{_includedir}/infiniband/verbs.h ++%package devel ++Summary: Headers file needed when building apps to talk directly to ibacm. ++Requires: %{name} = %{version}-%{release} + +-%description svc +-Application daemon for IB CM pre-connection services. ++%description devel ++Most applications do not need to know how to talk directly to the ibacm ++daemon, but it does have a socket that it listens on, and it has a ++specific protocol for incoming/outgoing data. So if you wish to build ++the ability to communicate directly with ib_acm into your own application, ++the protocol used to communicate with it, and the data structures ++involved, are in this header file. Please note that this is an unsupported ++method of using this daemon. The only supported means of using this is ++via librdmacm. As such, even though this header file is provided, no ++further documentation is available. One must read the source if they ++wish to make use of this header file. + + %prep +-%setup -q -n %{name}-%{ver} ++%setup -q -n %{name}-%{version} + + %build +-%configure ++aclocal -I config && libtoolize --force --copy && autoheader && \ ++ automake --foreign --add-missing --copy && autoconf ++%configure --sysconfdir=/etc/rdma CFLAGS="$CXXFLAGS -fno-strict-aliasing" LDFLAGS=-lpthread + make %{?_smp_mflags} + + %install + rm -rf $RPM_BUILD_ROOT ++make DESTDIR=%{buildroot} install ++install -D -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/ibacm + %makeinstall + + %clean + rm -rf $RPM_BUILD_ROOT + +-%post -p /sbin/ldconfig +-%postun -p /sbin/ldconfig ++%post ++if [ $1 = 1 ]; then ++ chkconfig --add ibacm ++fi ++%preun ++if [ $1 = 1 ]; then ++ chkconfig --del ibacm ++fi + + %files + %defattr(-,root,root,-) + %doc AUTHORS COPYING README + %{_bindir}/ib_acme +-%{_sbindir}/ib_acm ++%{_sbindir}/ibacm + %{_mandir}/man1/* + %{_mandir}/man7/* ++%config(noreplace) %{_sysconfdir}/rdma/* ++%{_initrddir}/ibacm ++ ++%files devel ++%defattr(-,root,root,-) + %{_includedir}/infiniband/acm.h + + %changelog ++* Tue Feb 28 2012 Doug Ledford - 1.0.5-1 ++- Ininital version for rhel6 ++- Related: bz700285 ++ +diff --git a/acm_addr.cfg b/ibacm_addr.cfg +similarity index 100% +rename from acm_addr.cfg +rename to ibacm_addr.cfg +diff --git a/acm_opts.cfg b/ibacm_opts.cfg +similarity index 100% +rename from acm_opts.cfg +rename to ibacm_opts.cfg +diff --git a/linux/osd.h b/linux/osd.h +index 33ea842..f085a58 100644 +--- a/linux/osd.h ++++ b/linux/osd.h +@@ -45,9 +45,9 @@ + #include + #include + +-#define ACM_DEST_DIR "/etc/ibacm" +-#define ACM_ADDR_FILE "acm_addr.cfg" +-#define ACM_OPTS_FILE "acm_opts.cfg" ++#define ACM_DEST_DIR "/etc/rdma" ++#define ACM_ADDR_FILE "ibacm_addr.cfg" ++#define ACM_OPTS_FILE "ibacm_opts.cfg" + + #define LIB_DESTRUCTOR __attribute__((destructor)) + #define CDECL_FUNC +diff --git a/man/ib_acme.1 b/man/ib_acme.1 +index 9e44822..a00e64e 100644 +--- a/man/ib_acme.1 ++++ b/man/ib_acme.1 +@@ -10,10 +10,10 @@ ib_acme \- test and configuration utility for the IB ACM + \fIib_acme\fR [-G] [-O] + .fi + .SH "DESCRIPTION" +-ib_acme provides assistance configuring and testing the ib_acm service. +-The first usage of the service will test that the ib_acm is running ++ib_acme provides assistance configuring and testing the ibacm service. ++The first usage of the service will test that the ibacm is running + and operating correctly. The second usage model will automatically +-create address and configuration files for the ib_acm service. ++create address and configuration files for the ibacm service. + .SH "OPTIONS" + .TP + \-f addr_format +@@ -64,13 +64,13 @@ generated files are text based and may be edited. These options are intended + to provide a simple way to configure address and option information on all + nodes on a cluster. + .P +-The other function of the ib_acme utility is to test the ib_acm service, ++The other function of the ib_acme utility is to test the ibacm service, + including helping to verify that the service is usable given the current + cluster configuration. The ib_acme utility can resolve IP addresses, + network names, or IB LIDs into a path record. It can then compare that + path record against one obtained by the SA. When used to test the +-ib_acm service, the ib_acme utility has the side effect of loading the +-ib_acm caches. ++ibacm service, the ib_acme utility has the side effect of loading the ++ibacm caches. + .P + Multiple, numerical destinations can be specified by adding brackets [] to + the end of a base destination name or address. Users may specify a list of +@@ -78,4 +78,4 @@ numerical ranges inside the brackets using the following example as a + guide: node[1-3,5,7-8]. This will result in testing node1, node2, node3, + node5, node7, and node8. + .SH "SEE ALSO" +-ib_acm(7) ib_acm(1) ++ib_acm(7) ibacm(1) +diff --git a/man/ib_acm.1 b/man/ibacm.1 +similarity index 73% +rename from man/ib_acm.1 +rename to man/ibacm.1 +index af57d0b..ed4b7a5 100644 +--- a/man/ib_acm.1 ++++ b/man/ibacm.1 +@@ -1,10 +1,10 @@ +-.TH "ib_acm" 1 "2010-12-08" "ib_acm" "ib_acm" ib_acm ++.TH "ibacm" 1 "2012-03-01" "ibacm" "ibacm" ibacm + .SH NAME +-ib_acm \- address and route resolution services for InfiniBand. ++ibacm \- address and route resolution services for InfiniBand. + .SH SYNOPSIS + .sp + .nf +-\fIib_acm\fR ++\fIibacm\fR + .fi + .SH "DESCRIPTION" + The IB ACM implements and provides a framework for name, +@@ -13,8 +13,8 @@ It is intended to address connection setup scalability issues running + MPI applications on large clusters. The IB ACM provides information + needed to establish a connection, but does not implement the CM protocol. + .P +-A primary user of the ib_acm service is the librdmacm library. This +-enables applications to make use of the ib_acm service without code ++A primary user of the ibacm service is the librdmacm library. This ++enables applications to make use of the ibacm service without code + changes or needing to be aware that the service is in use. + The librdmacm can invoke IB ACM services when built using the --with-ib_acm + option. The IB ACM services tie in under the rdma_resolve_addr, +@@ -28,7 +28,7 @@ implementation limits network traffic, SA interactions, and centralized + services. ACM supports multiple resolution protocols in order to handle + different fabric topologies. + .P +-The IB ACM package is comprised of two components: the ib_acm service ++The IB ACM package is comprised of two components: the ibacm service + and a test/configuration utility - ib_acme. Both are userspace components + and are available for Linux and Windows. Additional details are given below. + .SH "QUICK START GUIDE" +@@ -36,71 +36,71 @@ and are available for Linux and Windows. Additional details are given below. + The IB stack should be running with IPoIB configured. + These steps assume that the user has administrative privileges. + .P +-2. Install the IB ACM package. This installs ib_acm, and ib_acme. ++2. Install the IB ACM package. This installs ibacm, and ib_acme. + .P +-3. Run 'ib_acm' as administrator to start the ib_acm daemon. ++3. Run 'ibacm' as administrator to start the ibacm daemon. + .P + 4. Optionally, run 'ib_acme -d -v' to verify that +-the ib_acm service is running. ++the ibacm service is running. + .P + 5. Install librdmacm using the build option --with-ib_acm. +-The librdmacm will automatically use the ib_acm service. ++The librdmacm will automatically use the ibacm service. + On failures, the librdmacm will fall back to normal resolution. + .SH "NOTES" + ib_acme: + .P + The ib_acme program serves a dual role. It acts as a utility to test +-ib_acm operation and help verify if the ib_acm service and selected ++ibacm operation and help verify if the ibacm service and selected + protocol is usable for a given cluster configuration. Additionally, +-it automatically generates ib_acm configuration files to assist with ++it automatically generates ibacm configuration files to assist with + or eliminate manual setup. + .P + acm configuration files: + .P +-The ib_acm service relies on two configuration files. ++The ibacm service relies on two configuration files. + .P + The acm_addr.cfg file contains name and address mappings for each IB + endpoint. Although the names in the acm_addr.cfg + file can be anything, ib_acme maps the host name and IP addresses to +-the IB endpoints. If the address file cannot be found, the ib_acm ++the IB endpoints. If the address file cannot be found, the ibacm + service will attempt to create one using default values. + .P + The acm_opts.cfg file provides a set of configurable options for the +-ib_acm service, such as timeout, number of retries, logging level, etc. ++ibacm service, such as timeout, number of retries, logging level, etc. + ib_acme generates the acm_opts.cfg file using static information. If +-an option file cannot be found, ib_acm will use default values. ++an option file cannot be found, ibacm will use default values. + .P +-ib_acm: ++ibacm: + .P +-The ib_acm service is responsible for resolving names and addresses to ++The ibacm service is responsible for resolving names and addresses to + InfiniBand path information and caching such data. It + should execute with administrative privileges. + .P +-The ib_acm implements a client interface over TCP sockets, which is ++The ibacm implements a client interface over TCP sockets, which is + abstracted by the librdmacm library. One or more back-end protocols are +-used by the ib_acm service to satisfy user requests. Although the +-ib_acm supports standard SA path record queries on the back-end, it ++used by the ibacm service to satisfy user requests. Although the ++ibacm supports standard SA path record queries on the back-end, it + also supports a resolution protocol based on multicast traffic. + The latter is not usable on all fabric topologies, specifically + ones that may not have reversible paths or fabrics using torus routing. + Users should use the ib_acme utility to verify that multicast protocol + is usable before running other applications. + .P +-Conceptually, the ib_acm service implements an ARP like protocol and either ++Conceptually, the ibacm service implements an ARP like protocol and either + uses IB multicast records to construct path record data or queries the + SA directly, depending on the selected route protocol. By default, the +-ib_acm services uses and caches SA path record queries. ++ibacm services uses and caches SA path record queries. + .P + Specifically, all IB endpoints join a number of multicast groups. + Multicast groups differ based on rates, mtu, sl, etc., and are prioritized. + All participating endpoints must be able to communicate on the lowest +-priority multicast group. The ib_acm assigns one or more names/addresses ++priority multicast group. The ibacm assigns one or more names/addresses + to each IB endpoint using the acm_addr.cfg file. Clients provide source + and destination names or addresses as input to the service, and receive + as output path record data. + .P + The service maps a client's source name/address to a local IB endpoint. +-If a client does not provide a source address, then the ib_acm service ++If a client does not provide a source address, then the ibacm service + will select one based on the destination and local routing tables. If the + destination name/address is not cached locally, it sends a multicast + request out on the lowest priority multicast group on the local endpoint. +@@ -114,8 +114,8 @@ data, which is returned to the client. + .P + The current implementation of the IB ACM has several additional restrictions: + .P +-- The ib_acm is limited in its handling of dynamic changes. +-ib_acm must be stopped and restarted if a cluster is reconfigured. ++- The ibacm is limited in its handling of dynamic changes. ++ibacm must be stopped and restarted if a cluster is reconfigured. + .P + - Cached data does not timed out and is only updated if a new resolution + request is received from a different QPN than a cached request. +@@ -127,4 +127,4 @@ limited to 4. + .P + - The number of multicast groups that an endpoint can support is limited to 2. + .SH "SEE ALSO" +-ib_acm(7) ib_acme(1), rdma_cm(7) ++ibacm(7) ib_acme(1), rdma_cm(7) +diff --git a/man/ib_acm.7 b/man/ibacm.7 +similarity index 64% +rename from man/ib_acm.7 +rename to man/ibacm.7 +index f26ffb8..c0c63fc 100644 +--- a/man/ib_acm.7 ++++ b/man/ibacm.7 +@@ -1,6 +1,6 @@ +-.TH "IB_ACM" 7 "2009-09-09" "IB_ACM" "IB ACM User Guide" IB_ACM ++.TH "IBACM" 7 "2012-03-01" "IBACM" "IB ACM User Guide" IBACM + .SH NAME +-ib_acm \- InfiniBand communication management assistant ++ibacm \- InfiniBand communication management assistant + .SH SYNOPSIS + .B "#include " + .SH "DESCRIPTION" +@@ -17,11 +17,10 @@ similar to rdma_getaddrinfo, rdma_resolve_addr, and rdma_resolve_route using + IB multicast. + The IB ACM does not require IPoIB or use standard naming services, such as + DNS, and limits network communication, especially with the IB SA. +-Because it uses multicast traffic and limits SA interaction, it may +-not support all cluster configurations. The ib_acme utility assists in +-verifying what options of the ib_acm service may be usable. ++The ib_acme utility assists in verifying what options of the ibacm service ++may be usable for the current fabric topology. + .P +-Client interactions with the ib_acm service are done over sockets through ++Client interactions with the ibacm service are done over sockets through + a standard TCP connection. The librdmacm abstracts this interaction. + .SH "RETURN CODES" + .IP "== 0" +@@ -29,5 +28,4 @@ success + .IP "!= 0" + error + .SH "SEE ALSO" +-ib_acm_resolve_name(3), ib_acm_resolve_ip(3), ib_acm_resolve_path(3) +-ib_acme(1), ib_acm(1) ++ib_acme(1), ibacm(1) +diff --git a/src/acm.c b/src/acm.c +index 906c926..2a718b2 100644 +--- a/src/acm.c ++++ b/src/acm.c +@@ -205,11 +205,11 @@ static atomic_t counter[ACM_MAX_COUNTER]; + /* + * Service options - may be set through acm_opts file. + */ +-static char *opts_file = "/etc/ibacm/acm_opts.cfg"; +-static char *addr_file = "/etc/ibacm/acm_addr.cfg"; ++static char *opts_file = ACM_DEST_DIR "/" ACM_OPTS_FILE; ++static char *addr_file = ACM_DEST_DIR "/" ACM_ADDR_FILE; + static char log_file[128] = "/var/log/ibacm.log"; + static int log_level = 0; +-static char lock_file[128] = "/var/lock/ibacm.pid"; ++static char lock_file[128] = "/var/run/ibacm.pid"; + static enum acm_addr_prot addr_prot = ACM_ADDR_PROT_ACM; + static enum acm_route_prot route_prot = ACM_ROUTE_PROT_ACM; + static enum acm_loopback_prot loopback_prot = ACM_LOOPBACK_PROT_LOCAL; +diff --git a/src/acme.c b/src/acme.c +index 3d7461b..43e6dd9 100644 +--- a/src/acme.c ++++ b/src/acme.c +@@ -69,7 +69,7 @@ extern char **parse(char *args, int *count); + static void show_usage(char *program) + { + printf("usage 1: %s\n", program); +- printf("Query specified ib_acm service for data\n"); ++ printf("Query specified ibacm service for data\n"); + printf(" [-f addr_format] - i(p), n(ame), l(id), g(gid), or u(nspecified)\n"); + printf(" address format for -s and -d options, default: 'u'\n"); + printf(" [-s src_addr] - source address for path queries\n"); +@@ -79,10 +79,10 @@ static void show_usage(char *program) + printf(" [-P] - query performance data from destination service\n"); + printf(" [-S svc_addr] - address of ACM service, default: local service\n"); + printf("usage 2: %s\n", program); +- printf("Generate default ib_acm service configuration and option files\n"); ++ printf("Generate default ibacm service configuration and option files\n"); + printf(" -A [addr_file] - generate local address configuration file\n"); + printf(" (default is %s)\n", ACM_ADDR_FILE); +- printf(" -O [opt_file] - generate local acm_opts.cfg options file\n"); ++ printf(" -O [opt_file] - generate local ibacm_opts.cfg options file\n"); + printf(" (default is %s)\n", ACM_OPTS_FILE); + printf(" -D dest_dir - specify destination directory for output files\n"); + printf(" (default is %s)\n", ACM_DEST_DIR); +@@ -94,7 +94,7 @@ static void gen_opts_temp(FILE *f) + fprintf(f, "# InfiniBand Multicast Communication Manager for clusters configuration file\n"); + fprintf(f, "#\n"); + fprintf(f, "# Use ib_acme utility with -O option to automatically generate a sample\n"); +- fprintf(f, "# acm_opts.cfg file for the current system.\n"); ++ fprintf(f, "# ibacm_opts.cfg file for the current system.\n"); + fprintf(f, "#\n"); + fprintf(f, "# Entry format is:\n"); + fprintf(f, "# name value\n"); +@@ -123,7 +123,7 @@ static void gen_opts_temp(FILE *f) + fprintf(f, "# Specifies the location of the ACM lock file used to ensure that only a\n"); + fprintf(f, "# single instance of ACM is running.\n"); + fprintf(f, "\n"); +- fprintf(f, "lock_file /var/lock/ibacm.pid\n"); ++ fprintf(f, "lock_file /var/run/ibacm.pid\n"); + fprintf(f, "\n"); + fprintf(f, "# addr_prot:\n"); + fprintf(f, "# Default resolution protocol to resolve IP addresses into IB GIDs.\n"); +@@ -253,7 +253,7 @@ static void gen_addr_temp(FILE *f) + fprintf(f, "# InfiniBand Communication Management Assistant for clusters address file\n"); + fprintf(f, "#\n"); + fprintf(f, "# Use ib_acme utility with -G option to automatically generate a sample\n"); +- fprintf(f, "# acm_addr.cfg file for the current system.\n"); ++ fprintf(f, "# ibacm_addr.cfg file for the current system.\n"); + fprintf(f, "#\n"); + fprintf(f, "# Entry format is:\n"); + fprintf(f, "# address device port pkey\n"); diff --git a/patches/file-loc b/patches/file-loc deleted file mode 100644 index 6ff3b31..0000000 --- a/patches/file-loc +++ /dev/null @@ -1,51 +0,0 @@ -Bottom: 020de55b0b3d1ad214fe74cfc5ad3e404261d5c3 -Top: fe35ebd01a7e33bd5ae2054b404df7fd6e29a418 -Author: Sean Hefty -Date: 2012-03-22 10:29:46 -0700 - -Move location of ACM lock and configuration files - -Move ibacm.pid and configuration files based on feedback from Doug -Ledford from RedHat. They are currently in non-standard locations. - -Signed-off-by: Sean Hefty - - ---- - -diff --git a/linux/osd.h b/linux/osd.h -index 33ea842..f085a58 100644 ---- a/linux/osd.h -+++ b/linux/osd.h -@@ -45,9 +45,9 @@ - #include - #include - --#define ACM_DEST_DIR "/etc/ibacm" --#define ACM_ADDR_FILE "acm_addr.cfg" --#define ACM_OPTS_FILE "acm_opts.cfg" -+#define ACM_DEST_DIR "/etc/rdma" -+#define ACM_ADDR_FILE "ibacm_addr.cfg" -+#define ACM_OPTS_FILE "ibacm_opts.cfg" - - #define LIB_DESTRUCTOR __attribute__((destructor)) - #define CDECL_FUNC -diff --git a/src/acm.c b/src/acm.c -index 906c926..2a718b2 100644 ---- a/src/acm.c -+++ b/src/acm.c -@@ -205,11 +205,11 @@ static atomic_t counter[ACM_MAX_COUNTER]; - /* - * Service options - may be set through acm_opts file. - */ --static char *opts_file = "/etc/ibacm/acm_opts.cfg"; --static char *addr_file = "/etc/ibacm/acm_addr.cfg"; -+static char *opts_file = ACM_DEST_DIR "/" ACM_OPTS_FILE; -+static char *addr_file = ACM_DEST_DIR "/" ACM_ADDR_FILE; - static char log_file[128] = "/var/log/ibacm.log"; - static int log_level = 0; --static char lock_file[128] = "/var/lock/ibacm.pid"; -+static char lock_file[128] = "/var/run/ibacm.pid"; - static enum acm_addr_prot addr_prot = ACM_ADDR_PROT_ACM; - static enum acm_route_prot route_prot = ACM_ROUTE_PROT_ACM; - static enum acm_loopback_prot loopback_prot = ACM_LOOPBACK_PROT_LOCAL; diff --git a/patches/fixup-man b/patches/fixup-man deleted file mode 100644 index 672e31b..0000000 --- a/patches/fixup-man +++ /dev/null @@ -1,34 +0,0 @@ -Bottom: 206f4a26e822f79f12e85dfb5bde7c2a9f83413b -Top: f64639c8ee9ade3de867ad095b9aca1b824c125e -Author: Sean Hefty -Date: 2012-03-01 16:54:16 -0800 - -Cleanup man pages to reflect current functionality - -Signed-off-by: Sean Hefty - - ---- - -diff --git a/man/ibacm.7 b/man/ibacm.7 -index 22c28a3..c0c63fc 100644 ---- a/man/ibacm.7 -+++ b/man/ibacm.7 -@@ -17,9 +17,8 @@ similar to rdma_getaddrinfo, rdma_resolve_addr, and rdma_resolve_route using - IB multicast. - The IB ACM does not require IPoIB or use standard naming services, such as - DNS, and limits network communication, especially with the IB SA. --Because it uses multicast traffic and limits SA interaction, it may --not support all cluster configurations. The ib_acme utility assists in --verifying what options of the ibacm service may be usable. -+The ib_acme utility assists in verifying what options of the ibacm service -+may be usable for the current fabric topology. - .P - Client interactions with the ibacm service are done over sockets through - a standard TCP connection. The librdmacm abstracts this interaction. -@@ -29,5 +28,4 @@ success - .IP "!= 0" - error - .SH "SEE ALSO" --ib_acm_resolve_name(3), ib_acm_resolve_ip(3), ib_acm_resolve_path(3) - ib_acme(1), ibacm(1) diff --git a/patches/init-script b/patches/init-script deleted file mode 100644 index 158ce75..0000000 --- a/patches/init-script +++ /dev/null @@ -1,200 +0,0 @@ -Bottom: fe35ebd01a7e33bd5ae2054b404df7fd6e29a418 -Top: 206f4a26e822f79f12e85dfb5bde7c2a9f83413b -Author: Sean Hefty -Date: 2012-03-22 10:26:25 -0700 - -Add init script as part of install - -Include an init script provided by Doug Ledford as part of the install. - -Signed-off-by: Doug Ledford -Signed-off-by: Sean Hefty - - ---- - -diff --git a/Makefile.am b/Makefile.am -index 2e71faa..ccd48a1 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -18,16 +18,16 @@ man_MANS = \ - man/ibacm.1 \ - man/ibacm.7 - --EXTRA_DIST = src/acm_mad.h src/libacm.h \ -- linux/osd.h linux/dlist.h ibacm.spec.in $(man_MANS) acm_opts.cfg \ -- acm_addr.cfg -+EXTRA_DIST = src/acm_mad.h src/libacm.h ibacm.init \ -+ linux/osd.h linux/dlist.h ibacm.spec.in $(man_MANS) ibacm_opts.cfg \ -+ ibacm_addr.cfg - - install-exec-hook: - if ! test -d $(DESTDIR)$(sysconfdir); then \ - mkdir -p $(DESTDIR)$(sysconfdir); \ - fi; \ -- install -m 644 acm_opts.cfg $(DESTDIR)$(sysconfdir)/acm_opts.cfg; \ -- install -m 644 acm_addr.cfg $(DESTDIR)$(sysconfdir)/acm_addr.cfg; -+ install -m 644 ibacm_opts.cfg $(DESTDIR)$(sysconfdir)/ibacm_opts.cfg; \ -+ install -m 644 ibacm_addr.cfg $(DESTDIR)$(sysconfdir)/ibacm_addr.cfg; - - dist-hook: ibacm.spec - cp ibacm.spec $(distdir) -diff --git a/ibacm.init b/ibacm.init -new file mode 100644 -index 0000000..8f863eb ---- /dev/null -+++ b/ibacm.init -@@ -0,0 +1,100 @@ -+#!/bin/bash -+# -+# Bring up/down the ibacm daemon -+# -+# chkconfig: 2345 25 75 -+# description: Starts/Stops InfiniBand ACM service -+# -+### BEGIN INIT INFO -+# Provides: ibacm -+# Default-Start: 2 3 4 5 -+# Default-Stop: 0 1 6 -+# Required-Start: rdma $network -+# Required-Stop: rdma $network -+# Should-Start: -+# Should-Stop: -+# Short-Description: Starts and stops the InfiniBand ACM service -+# Description: The InfiniBand ACM service provides a user space implementation -+# of someting resembling an ARP cache for InfiniBand SA queries and -+# host route lookups. -+### END INIT INFO -+ -+pidfile=/var/run/ibacm.pid -+subsys=/var/lock/subsys/ibacm -+prog=/usr/sbin/ibacm -+ -+. /etc/rc.d/init.d/functions -+ -+start() -+{ -+ echo -n "Starting ibacm daemon:" -+ -+ daemon $prog -+ RC=$? -+ [ $RC -eq 0 ] && touch $subsys -+ echo -+ return $RC -+} -+ -+stop() -+{ -+ echo -n "Stopping ibacm daemon:" -+ -+ killproc -p $pidfile $prog -+ RC=$? -+ rm -f $subsys -+ echo -+ return $RC -+} -+ -+status() -+{ -+ if [ ! -f $subsys -a ! -f $pidfile ]; then -+ return 3 -+ fi -+ if [ -f $pidfile ]; then -+ checkpid `cat $pidfile` -+ return $? -+ fi -+ if [ -f $subsys ]; then -+ return 2 -+ fi -+} -+ -+restart () -+{ -+ stop -+ start -+} -+ -+condrestart () -+{ -+ [ -e $subsys ] && restart || return 0 -+} -+ -+usage () -+{ -+ echo -+ echo "Usage: `basename $0` {start|stop|restart|condrestart|try-restart|force-reload|status}" -+ echo -+ return 2 -+} -+ -+case $1 in -+ start|stop|restart|condrestart|try-restart|force-reload) -+ [ `id -u` != "0" ] && exit 4 ;; -+esac -+ -+case $1 in -+ start) start; RC=$? ;; -+ stop) stop; RC=$? ;; -+ restart) restart; RC=$? ;; -+ reload) RC=3 ;; -+ condrestart) condrestart; RC=$? ;; -+ try-restart) condrestart; RC=$? ;; -+ force-reload) condrestart; RC=$? ;; -+ status) status; RC=$? ;; -+ *) usage; RC=$? ;; -+esac -+ -+exit $RC -diff --git a/ibacm.spec.in b/ibacm.spec.in -index ac7f06f..31d5a07 100644 ---- a/ibacm.spec.in -+++ b/ibacm.spec.in -@@ -1,19 +1,18 @@ --%define ver @VERSION@ -- - Name: ibacm - Version: 1.0.5 - Release: 1%{?dist} - Summary: InfiniBand Communication Manager Assistant - --Group: System Environment/Libraries -+Group: System Environment/Daemons - License: GPLv2 or BSD - Url: http://www.openfabrics.org/ - Source: http://www.openfabrics.org/downloads/rdmacm/%{name}-%{version}.tar.gz -+Source1: ibacm.init - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - - BuildRequires: libibverbs-devel >= 1.1-1, autoconf, libtool, libibumad-devel - Requires(post): chkconfig --Requiers(preun): chkconfig -+Requires(preun): chkconfig - ExcludeArch: s390, s390x - - %description -@@ -31,7 +30,7 @@ Summary: Headers file needed when building apps to talk directly to ibacm. - Requires: %{name} = %{version}-%{release} - - %description devel --Most applications do not need to know how to talk directly to the ib_acm -+Most applications do not need to know how to talk directly to the ibacm - daemon, but it does have a socket that it listens on, and it has a - specific protocol for incoming/outgoing data. So if you wish to build - the ability to communicate directly with ib_acm into your own application, -@@ -43,7 +42,7 @@ further documentation is available. One must read the source if they - wish to make use of this header file. - - %prep --%setup -q -n %{name}-%{ver} -+%setup -q -n %{name}-%{version} - - %build - aclocal -I config && libtoolize --force --copy && autoheader && \ -diff --git a/acm_addr.cfg b/ibacm_addr.cfg -similarity index 100% -rename from acm_addr.cfg -rename to ibacm_addr.cfg -diff --git a/acm_opts.cfg b/ibacm_opts.cfg -similarity index 100% -rename from acm_opts.cfg -rename to ibacm_opts.cfg diff --git a/patches/rename-ibacm b/patches/rename-ibacm deleted file mode 100644 index 1c2bdb1..0000000 --- a/patches/rename-ibacm +++ /dev/null @@ -1,431 +0,0 @@ -Bottom: 163f50499aea8749e94a5c93c4939e5f74ae1906 -Top: 020de55b0b3d1ad214fe74cfc5ad3e404261d5c3 -Author: Doug Ledford -Date: 2012-03-01 16:40:08 -0800 - -ibacm: Rename service executable to ibacm - -Name the service executable the same as the package name. This -is based on a request from Doug Ledford to -integrate ibacm with RedHat releases. - -Signed-off-by: Doug Ledford -Signed-off-by: Sean Hefty - - ---- - -diff --git a/Makefile.am b/Makefile.am -index 503ad72..2e71faa 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -3,10 +3,10 @@ INCLUDES = -I$(srcdir)/include -I$(srcdir)/linux - AM_CFLAGS = -g -Wall -D_GNU_SOURCE - - bin_PROGRAMS = util/ib_acme --sbin_PROGRAMS = svc/ib_acm --svc_ib_acm_SOURCES = src/acm.c -+sbin_PROGRAMS = svc/ibacm -+svc_ibacm_SOURCES = src/acm.c - util_ib_acme_SOURCES = src/acme.c linux/acme_linux.c src/libacm.c linux/libacm_linux.c src/parse.c --svc_ib_acm_CFLAGS = $(AM_CFLAGS) -+svc_ibacm_CFLAGS = $(AM_CFLAGS) - util_ib_acme_CFLAGS = $(AM_CFLAGS) - - ibacmincludedir = $(includedir)/infiniband -@@ -15,12 +15,19 @@ ibacminclude_HEADERS = include/infiniband/acm.h - - man_MANS = \ - man/ib_acme.1 \ -- man/ib_acm.1 \ -- man/ib_acm.7 -+ man/ibacm.1 \ -+ man/ibacm.7 - - EXTRA_DIST = src/acm_mad.h src/libacm.h \ - linux/osd.h linux/dlist.h ibacm.spec.in $(man_MANS) acm_opts.cfg \ - acm_addr.cfg - -+install-exec-hook: -+ if ! test -d $(DESTDIR)$(sysconfdir); then \ -+ mkdir -p $(DESTDIR)$(sysconfdir); \ -+ fi; \ -+ install -m 644 acm_opts.cfg $(DESTDIR)$(sysconfdir)/acm_opts.cfg; \ -+ install -m 644 acm_addr.cfg $(DESTDIR)$(sysconfdir)/acm_addr.cfg; -+ - dist-hook: ibacm.spec - cp ibacm.spec $(distdir) -diff --git a/ibacm.spec.in b/ibacm.spec.in -index a926fea..ac7f06f 100644 ---- a/ibacm.spec.in -+++ b/ibacm.spec.in -@@ -11,43 +11,80 @@ Url: http://www.openfabrics.org/ - Source: http://www.openfabrics.org/downloads/rdmacm/%{name}-%{version}.tar.gz - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - --BuildRequires: libibverbs-devel >= 1.1-1 -+BuildRequires: libibverbs-devel >= 1.1-1, autoconf, libtool, libibumad-devel -+Requires(post): chkconfig -+Requiers(preun): chkconfig -+ExcludeArch: s390, s390x - - %description --ibacm assists with establishing communication over Infiniband. -+The ib_acm daemon helps reduce the load of managing path record lookups on -+large InfiniBand fabrics by providing a user space implementation of what -+is functionally similar to an ARP cache. The use of ib_acm, when properly -+configured, can reduce the SA packet load of a large IB cluster from O(n^2) -+to O(n). The ib_acm daemon is started and normally runs in the background, -+user applications need not know about this daemon as long as their app -+uses librdmacm to handle connection bring up/tear down. The librdmacm -+library knows how to talk directly to the ib_acm daemon to retrieve data. - --%package svc --Summary: IB CM pre-connection service application --Group: System Environment/Libraries --Requires: %{name} = %{version}-%{release} %{_includedir}/infiniband/verbs.h -+%package devel -+Summary: Headers file needed when building apps to talk directly to ibacm. -+Requires: %{name} = %{version}-%{release} - --%description svc --Application daemon for IB CM pre-connection services. -+%description devel -+Most applications do not need to know how to talk directly to the ib_acm -+daemon, but it does have a socket that it listens on, and it has a -+specific protocol for incoming/outgoing data. So if you wish to build -+the ability to communicate directly with ib_acm into your own application, -+the protocol used to communicate with it, and the data structures -+involved, are in this header file. Please note that this is an unsupported -+method of using this daemon. The only supported means of using this is -+via librdmacm. As such, even though this header file is provided, no -+further documentation is available. One must read the source if they -+wish to make use of this header file. - - %prep - %setup -q -n %{name}-%{ver} - - %build --%configure -+aclocal -I config && libtoolize --force --copy && autoheader && \ -+ automake --foreign --add-missing --copy && autoconf -+%configure --sysconfdir=/etc/rdma CFLAGS="$CXXFLAGS -fno-strict-aliasing" LDFLAGS=-lpthread - make %{?_smp_mflags} - - %install - rm -rf $RPM_BUILD_ROOT -+make DESTDIR=%{buildroot} install -+install -D -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/ibacm - %makeinstall - - %clean - rm -rf $RPM_BUILD_ROOT - --%post -p /sbin/ldconfig --%postun -p /sbin/ldconfig -+%post -+if [ $1 = 1 ]; then -+ chkconfig --add ibacm -+fi -+%preun -+if [ $1 = 1 ]; then -+ chkconfig --del ibacm -+fi - - %files - %defattr(-,root,root,-) - %doc AUTHORS COPYING README - %{_bindir}/ib_acme --%{_sbindir}/ib_acm -+%{_sbindir}/ibacm - %{_mandir}/man1/* - %{_mandir}/man7/* -+%config(noreplace) %{_sysconfdir}/rdma/* -+%{_initrddir}/ibacm -+ -+%files devel -+%defattr(-,root,root,-) - %{_includedir}/infiniband/acm.h - - %changelog -+* Tue Feb 28 2012 Doug Ledford - 1.0.5-1 -+- Ininital version for rhel6 -+- Related: bz700285 -+ -diff --git a/man/ib_acme.1 b/man/ib_acme.1 -index 9e44822..a00e64e 100644 ---- a/man/ib_acme.1 -+++ b/man/ib_acme.1 -@@ -10,10 +10,10 @@ ib_acme \- test and configuration utility for the IB ACM - \fIib_acme\fR [-G] [-O] - .fi - .SH "DESCRIPTION" --ib_acme provides assistance configuring and testing the ib_acm service. --The first usage of the service will test that the ib_acm is running -+ib_acme provides assistance configuring and testing the ibacm service. -+The first usage of the service will test that the ibacm is running - and operating correctly. The second usage model will automatically --create address and configuration files for the ib_acm service. -+create address and configuration files for the ibacm service. - .SH "OPTIONS" - .TP - \-f addr_format -@@ -64,13 +64,13 @@ generated files are text based and may be edited. These options are intended - to provide a simple way to configure address and option information on all - nodes on a cluster. - .P --The other function of the ib_acme utility is to test the ib_acm service, -+The other function of the ib_acme utility is to test the ibacm service, - including helping to verify that the service is usable given the current - cluster configuration. The ib_acme utility can resolve IP addresses, - network names, or IB LIDs into a path record. It can then compare that - path record against one obtained by the SA. When used to test the --ib_acm service, the ib_acme utility has the side effect of loading the --ib_acm caches. -+ibacm service, the ib_acme utility has the side effect of loading the -+ibacm caches. - .P - Multiple, numerical destinations can be specified by adding brackets [] to - the end of a base destination name or address. Users may specify a list of -@@ -78,4 +78,4 @@ numerical ranges inside the brackets using the following example as a - guide: node[1-3,5,7-8]. This will result in testing node1, node2, node3, - node5, node7, and node8. - .SH "SEE ALSO" --ib_acm(7) ib_acm(1) -+ib_acm(7) ibacm(1) -diff --git a/man/ib_acm.1 b/man/ibacm.1 -similarity index 73% -rename from man/ib_acm.1 -rename to man/ibacm.1 -index af57d0b..ed4b7a5 100644 ---- a/man/ib_acm.1 -+++ b/man/ibacm.1 -@@ -1,10 +1,10 @@ --.TH "ib_acm" 1 "2010-12-08" "ib_acm" "ib_acm" ib_acm -+.TH "ibacm" 1 "2012-03-01" "ibacm" "ibacm" ibacm - .SH NAME --ib_acm \- address and route resolution services for InfiniBand. -+ibacm \- address and route resolution services for InfiniBand. - .SH SYNOPSIS - .sp - .nf --\fIib_acm\fR -+\fIibacm\fR - .fi - .SH "DESCRIPTION" - The IB ACM implements and provides a framework for name, -@@ -13,8 +13,8 @@ It is intended to address connection setup scalability issues running - MPI applications on large clusters. The IB ACM provides information - needed to establish a connection, but does not implement the CM protocol. - .P --A primary user of the ib_acm service is the librdmacm library. This --enables applications to make use of the ib_acm service without code -+A primary user of the ibacm service is the librdmacm library. This -+enables applications to make use of the ibacm service without code - changes or needing to be aware that the service is in use. - The librdmacm can invoke IB ACM services when built using the --with-ib_acm - option. The IB ACM services tie in under the rdma_resolve_addr, -@@ -28,7 +28,7 @@ implementation limits network traffic, SA interactions, and centralized - services. ACM supports multiple resolution protocols in order to handle - different fabric topologies. - .P --The IB ACM package is comprised of two components: the ib_acm service -+The IB ACM package is comprised of two components: the ibacm service - and a test/configuration utility - ib_acme. Both are userspace components - and are available for Linux and Windows. Additional details are given below. - .SH "QUICK START GUIDE" -@@ -36,71 +36,71 @@ and are available for Linux and Windows. Additional details are given below. - The IB stack should be running with IPoIB configured. - These steps assume that the user has administrative privileges. - .P --2. Install the IB ACM package. This installs ib_acm, and ib_acme. -+2. Install the IB ACM package. This installs ibacm, and ib_acme. - .P --3. Run 'ib_acm' as administrator to start the ib_acm daemon. -+3. Run 'ibacm' as administrator to start the ibacm daemon. - .P - 4. Optionally, run 'ib_acme -d -v' to verify that --the ib_acm service is running. -+the ibacm service is running. - .P - 5. Install librdmacm using the build option --with-ib_acm. --The librdmacm will automatically use the ib_acm service. -+The librdmacm will automatically use the ibacm service. - On failures, the librdmacm will fall back to normal resolution. - .SH "NOTES" - ib_acme: - .P - The ib_acme program serves a dual role. It acts as a utility to test --ib_acm operation and help verify if the ib_acm service and selected -+ibacm operation and help verify if the ibacm service and selected - protocol is usable for a given cluster configuration. Additionally, --it automatically generates ib_acm configuration files to assist with -+it automatically generates ibacm configuration files to assist with - or eliminate manual setup. - .P - acm configuration files: - .P --The ib_acm service relies on two configuration files. -+The ibacm service relies on two configuration files. - .P - The acm_addr.cfg file contains name and address mappings for each IB - endpoint. Although the names in the acm_addr.cfg - file can be anything, ib_acme maps the host name and IP addresses to --the IB endpoints. If the address file cannot be found, the ib_acm -+the IB endpoints. If the address file cannot be found, the ibacm - service will attempt to create one using default values. - .P - The acm_opts.cfg file provides a set of configurable options for the --ib_acm service, such as timeout, number of retries, logging level, etc. -+ibacm service, such as timeout, number of retries, logging level, etc. - ib_acme generates the acm_opts.cfg file using static information. If --an option file cannot be found, ib_acm will use default values. -+an option file cannot be found, ibacm will use default values. - .P --ib_acm: -+ibacm: - .P --The ib_acm service is responsible for resolving names and addresses to -+The ibacm service is responsible for resolving names and addresses to - InfiniBand path information and caching such data. It - should execute with administrative privileges. - .P --The ib_acm implements a client interface over TCP sockets, which is -+The ibacm implements a client interface over TCP sockets, which is - abstracted by the librdmacm library. One or more back-end protocols are --used by the ib_acm service to satisfy user requests. Although the --ib_acm supports standard SA path record queries on the back-end, it -+used by the ibacm service to satisfy user requests. Although the -+ibacm supports standard SA path record queries on the back-end, it - also supports a resolution protocol based on multicast traffic. - The latter is not usable on all fabric topologies, specifically - ones that may not have reversible paths or fabrics using torus routing. - Users should use the ib_acme utility to verify that multicast protocol - is usable before running other applications. - .P --Conceptually, the ib_acm service implements an ARP like protocol and either -+Conceptually, the ibacm service implements an ARP like protocol and either - uses IB multicast records to construct path record data or queries the - SA directly, depending on the selected route protocol. By default, the --ib_acm services uses and caches SA path record queries. -+ibacm services uses and caches SA path record queries. - .P - Specifically, all IB endpoints join a number of multicast groups. - Multicast groups differ based on rates, mtu, sl, etc., and are prioritized. - All participating endpoints must be able to communicate on the lowest --priority multicast group. The ib_acm assigns one or more names/addresses -+priority multicast group. The ibacm assigns one or more names/addresses - to each IB endpoint using the acm_addr.cfg file. Clients provide source - and destination names or addresses as input to the service, and receive - as output path record data. - .P - The service maps a client's source name/address to a local IB endpoint. --If a client does not provide a source address, then the ib_acm service -+If a client does not provide a source address, then the ibacm service - will select one based on the destination and local routing tables. If the - destination name/address is not cached locally, it sends a multicast - request out on the lowest priority multicast group on the local endpoint. -@@ -114,8 +114,8 @@ data, which is returned to the client. - .P - The current implementation of the IB ACM has several additional restrictions: - .P --- The ib_acm is limited in its handling of dynamic changes. --ib_acm must be stopped and restarted if a cluster is reconfigured. -+- The ibacm is limited in its handling of dynamic changes. -+ibacm must be stopped and restarted if a cluster is reconfigured. - .P - - Cached data does not timed out and is only updated if a new resolution - request is received from a different QPN than a cached request. -@@ -127,4 +127,4 @@ limited to 4. - .P - - The number of multicast groups that an endpoint can support is limited to 2. - .SH "SEE ALSO" --ib_acm(7) ib_acme(1), rdma_cm(7) -+ibacm(7) ib_acme(1), rdma_cm(7) -diff --git a/man/ib_acm.7 b/man/ibacm.7 -similarity index 78% -rename from man/ib_acm.7 -rename to man/ibacm.7 -index f26ffb8..22c28a3 100644 ---- a/man/ib_acm.7 -+++ b/man/ibacm.7 -@@ -1,6 +1,6 @@ --.TH "IB_ACM" 7 "2009-09-09" "IB_ACM" "IB ACM User Guide" IB_ACM -+.TH "IBACM" 7 "2012-03-01" "IBACM" "IB ACM User Guide" IBACM - .SH NAME --ib_acm \- InfiniBand communication management assistant -+ibacm \- InfiniBand communication management assistant - .SH SYNOPSIS - .B "#include " - .SH "DESCRIPTION" -@@ -19,9 +19,9 @@ The IB ACM does not require IPoIB or use standard naming services, such as - DNS, and limits network communication, especially with the IB SA. - Because it uses multicast traffic and limits SA interaction, it may - not support all cluster configurations. The ib_acme utility assists in --verifying what options of the ib_acm service may be usable. -+verifying what options of the ibacm service may be usable. - .P --Client interactions with the ib_acm service are done over sockets through -+Client interactions with the ibacm service are done over sockets through - a standard TCP connection. The librdmacm abstracts this interaction. - .SH "RETURN CODES" - .IP "== 0" -@@ -30,4 +30,4 @@ success - error - .SH "SEE ALSO" - ib_acm_resolve_name(3), ib_acm_resolve_ip(3), ib_acm_resolve_path(3) --ib_acme(1), ib_acm(1) -+ib_acme(1), ibacm(1) -diff --git a/src/acme.c b/src/acme.c -index 3d7461b..43e6dd9 100644 ---- a/src/acme.c -+++ b/src/acme.c -@@ -69,7 +69,7 @@ extern char **parse(char *args, int *count); - static void show_usage(char *program) - { - printf("usage 1: %s\n", program); -- printf("Query specified ib_acm service for data\n"); -+ printf("Query specified ibacm service for data\n"); - printf(" [-f addr_format] - i(p), n(ame), l(id), g(gid), or u(nspecified)\n"); - printf(" address format for -s and -d options, default: 'u'\n"); - printf(" [-s src_addr] - source address for path queries\n"); -@@ -79,10 +79,10 @@ static void show_usage(char *program) - printf(" [-P] - query performance data from destination service\n"); - printf(" [-S svc_addr] - address of ACM service, default: local service\n"); - printf("usage 2: %s\n", program); -- printf("Generate default ib_acm service configuration and option files\n"); -+ printf("Generate default ibacm service configuration and option files\n"); - printf(" -A [addr_file] - generate local address configuration file\n"); - printf(" (default is %s)\n", ACM_ADDR_FILE); -- printf(" -O [opt_file] - generate local acm_opts.cfg options file\n"); -+ printf(" -O [opt_file] - generate local ibacm_opts.cfg options file\n"); - printf(" (default is %s)\n", ACM_OPTS_FILE); - printf(" -D dest_dir - specify destination directory for output files\n"); - printf(" (default is %s)\n", ACM_DEST_DIR); -@@ -94,7 +94,7 @@ static void gen_opts_temp(FILE *f) - fprintf(f, "# InfiniBand Multicast Communication Manager for clusters configuration file\n"); - fprintf(f, "#\n"); - fprintf(f, "# Use ib_acme utility with -O option to automatically generate a sample\n"); -- fprintf(f, "# acm_opts.cfg file for the current system.\n"); -+ fprintf(f, "# ibacm_opts.cfg file for the current system.\n"); - fprintf(f, "#\n"); - fprintf(f, "# Entry format is:\n"); - fprintf(f, "# name value\n"); -@@ -123,7 +123,7 @@ static void gen_opts_temp(FILE *f) - fprintf(f, "# Specifies the location of the ACM lock file used to ensure that only a\n"); - fprintf(f, "# single instance of ACM is running.\n"); - fprintf(f, "\n"); -- fprintf(f, "lock_file /var/lock/ibacm.pid\n"); -+ fprintf(f, "lock_file /var/run/ibacm.pid\n"); - fprintf(f, "\n"); - fprintf(f, "# addr_prot:\n"); - fprintf(f, "# Default resolution protocol to resolve IP addresses into IB GIDs.\n"); -@@ -253,7 +253,7 @@ static void gen_addr_temp(FILE *f) - fprintf(f, "# InfiniBand Communication Management Assistant for clusters address file\n"); - fprintf(f, "#\n"); - fprintf(f, "# Use ib_acme utility with -G option to automatically generate a sample\n"); -- fprintf(f, "# acm_addr.cfg file for the current system.\n"); -+ fprintf(f, "# ibacm_addr.cfg file for the current system.\n"); - fprintf(f, "#\n"); - fprintf(f, "# Entry format is:\n"); - fprintf(f, "# address device port pkey\n");