]> git.openfabrics.org - ~shefty/ibacm.git/log
~shefty/ibacm.git
10 years agoibacm: Release 1.0.9 v1.0.9
Sean Hefty [Mon, 23 Jun 2014 17:40:51 +0000 (10:40 -0700)]
ibacm: Release 1.0.9

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: Eliminate strict aliasing compiler warnings
Sean Hefty [Sat, 22 Mar 2014 03:30:17 +0000 (20:30 -0700)]
ibacm: Eliminate strict aliasing compiler warnings

Use local variables and memcpy to defeat the
compiler warning: dereferencing type-punned
pointer will break strict-aliasing rules

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: Rename client array
Sean Hefty [Thu, 20 Mar 2014 04:45:42 +0000 (21:45 -0700)]
ibacm: Rename client array

Rename the client array to client_array, to make it easier
to distinguish between the array and local variables, which
are also named client.

And, hey, this found the bug in the previous patch.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: Release the refcnt on the correct client
Sean Hefty [Thu, 20 Mar 2014 06:00:56 +0000 (23:00 -0700)]
ibacm: Release the refcnt on the correct client

Release the reference on the client that we're referencing,
and not the one at the front of the array.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoMerge branch 'ira-name-res3'
Sean Hefty [Tue, 8 Apr 2014 21:29:34 +0000 (14:29 -0700)]
Merge branch 'ira-name-res3'

10 years agoibacm: by default remove processing of IP's from ibacm_addr.cfg
Ira Weiny [Fri, 4 Apr 2014 00:15:05 +0000 (20:15 -0400)]
ibacm: by default remove processing of IP's from ibacm_addr.cfg

support_ips_in_addr_cfg option in config file can turn this back on if wanted.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: ib_acme remove IP addresses from ibacm_addr.cfg file generation
Ira Weiny [Wed, 26 Mar 2014 00:40:37 +0000 (20:40 -0400)]
ibacm: ib_acme remove IP addresses from ibacm_addr.cfg file generation

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: Fix handling of aliased IPoIB devices
Ira Weiny [Tue, 25 Mar 2014 23:21:46 +0000 (19:21 -0400)]
ibacm: Fix handling of aliased IPoIB devices

ibX:Y devices don't have sysfs files directly.  They use the "base" interface
of ibX.  The ioctl calls however include the full aliased name.

Netlink does not have this problem as the interface name is reported as it
appears in sysfs.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: Add/remove addr's in EP's when added/removed from the system.
Ira Weiny [Fri, 21 Mar 2014 20:26:05 +0000 (16:26 -0400)]
ibacm: Add/remove addr's in EP's when added/removed from the system.

This builds on the previous patch by reacting to the IP address changes
monitored there.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: Add Netlink socket to monitor IP address changes
Ira Weiny [Fri, 21 Mar 2014 18:39:34 +0000 (14:39 -0400)]
ibacm: Add Netlink socket to monitor IP address changes

Currently only reports events to the log.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: read system IP's into endpoints at startup
Ira Weiny [Sat, 22 Mar 2014 01:22:14 +0000 (21:22 -0400)]
ibacm: read system IP's into endpoints at startup

ibacm_addr.cfg is read after system is read which can add endpoints which are
not active at start up.

ibacm_addr.cfg can still specify names for end points

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: add separate acm_ep_insert_addr function
Ira Weiny [Sat, 22 Mar 2014 00:13:01 +0000 (20:13 -0400)]
ibacm: add separate acm_ep_insert_addr function

This is in preparation for netlink support which will do this dynamically.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: convert logging in acm_util.c to acm_log
Ira Weiny [Tue, 25 Mar 2014 07:07:35 +0000 (03:07 -0400)]
ibacm: convert logging in acm_util.c to acm_log

ib_acme build defines ACME_PRINTS which overrides acm_log to printf

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: move acm_if_iter_sys to acm_util.c
Ira Weiny [Tue, 25 Mar 2014 06:52:04 +0000 (02:52 -0400)]
ibacm: move acm_if_iter_sys to acm_util.c

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: Move calling of helper functions out of get_devaddr
Ira Weiny [Tue, 25 Mar 2014 03:17:37 +0000 (23:17 -0400)]
ibacm: Move calling of helper functions out of get_devaddr

Again this is in prep for sharing this code with ibacm and ib_acme

get_devaddr uses globals which are specific to ib_acme.  Move toward this
function being ib_acme specific while the code in get_addr_ip becomes generic.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: move sysfs helper functions to acm_util 'module'
Ira Weiny [Tue, 25 Mar 2014 02:11:10 +0000 (22:11 -0400)]
ibacm: move sysfs helper functions to acm_util 'module'

This is in preparation for these functions to be included in both ibacm and
ib_acme build.

Also rename to more global appropriate name acm_if_*

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: use sysfs (in acm_if_is_ib) rather than ioctl(... SIOCGIFHWADDR ...) to read...
Ira Weiny [Tue, 25 Mar 2014 01:30:00 +0000 (21:30 -0400)]
ibacm: use sysfs (in acm_if_is_ib) rather than ioctl(... SIOCGIFHWADDR ...) to read interface type

Getting an interface type from sysfs is easier than using an ioctl when an
interface name is readily available (as is the case with netlink.)

In preparation for netlink support create a function which uses sysfs and use
it instead of ioctls.

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: pass interface name rather than 'struct ifreq' to get_devaddr, get_sgid, and...
Ira Weiny [Mon, 24 Mar 2014 23:11:33 +0000 (19:11 -0400)]
ibacm: pass interface name rather than 'struct ifreq' to get_devaddr, get_sgid, and get_pkey

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: get_devaddr remove unused variable from signature
Ira Weiny [Mon, 24 Mar 2014 22:59:56 +0000 (18:59 -0400)]
ibacm: get_devaddr remove unused variable from signature

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: properly check return from ibv_open_device
Ira Weiny [Fri, 21 Mar 2014 14:07:03 +0000 (10:07 -0400)]
ibacm: properly check return from ibv_open_device

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
10 years agoibacm: properly check return from ibv_open_device
Ira Weiny [Fri, 21 Mar 2014 14:07:03 +0000 (10:07 -0400)]
ibacm: properly check return from ibv_open_device

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm.init.in: Fix typo
Hal Rosenstock [Thu, 13 Feb 2014 19:49:30 +0000 (11:49 -0800)]
ibacm.init.in: Fix typo

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agobuild: Fix daemon script to work with SuSE
Sean Hefty [Tue, 4 Feb 2014 23:47:22 +0000 (15:47 -0800)]
build: Fix daemon script to work with SuSE

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoacm: Remove whitespace
Hal Rosenstock [Fri, 16 Aug 2013 14:57:15 +0000 (07:57 -0700)]
acm: Remove whitespace

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoacm.c: In acm_join_group, no need to set qkey in umad addr to send to SA
Hal Rosenstock [Tue, 6 Aug 2013 11:45:43 +0000 (07:45 -0400)]
acm.c: In acm_join_group, no need to set qkey in umad addr to send to SA

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoacm.c: Fix endian of qkey in MCMemberRecord in acm_init_join
Hal Rosenstock [Tue, 6 Aug 2013 11:45:40 +0000 (07:45 -0400)]
acm.c: Fix endian of qkey in MCMemberRecord in acm_init_join

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoacm.c: Send multicast joins to SA on default partition
Hal Rosenstock [Tue, 6 Aug 2013 11:45:37 +0000 (07:45 -0400)]
acm.c: Send multicast joins to SA on default partition

rather than on EP partition

Prefer full default partition in case both full and limited
pkeys for default partition are in pkey table.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoacm.c: Make sure MGID has full member pkey bit on
Hal Rosenstock [Tue, 6 Aug 2013 11:45:31 +0000 (07:45 -0400)]
acm.c: Make sure MGID has full member pkey bit on

even when limited member of partition

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoacm.c: Fix endian of transaction ID
Hal Rosenstock [Tue, 6 Aug 2013 11:45:28 +0000 (07:45 -0400)]
acm.c: Fix endian of transaction ID

It should be in network rather than host endian.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoacm.c: Invalid pkey has low order 15 bits 0
Hal Rosenstock [Tue, 6 Aug 2013 11:45:22 +0000 (07:45 -0400)]
acm.c: Invalid pkey has low order 15 bits 0

so add in handling for pkey 0x8000 as well as 0 for invalid

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoacm.c: In acm_port_up, handle noncontiguous pkeys
Hal Rosenstock [Tue, 6 Aug 2013 11:45:17 +0000 (07:45 -0400)]
acm.c: In acm_port_up, handle noncontiguous pkeys

There can be "holes" in pkey table although this is not usually the case
but since IBA spec allows for this, it should be handled.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agolibacm.c: Remove unneeded structures
Hal Rosenstock [Tue, 6 Aug 2013 11:45:14 +0000 (07:45 -0400)]
libacm.c: Remove unneeded structures

acm_port and acm_device are not used/needed

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoacm.c: Handle client reregister local event
Hal Rosenstock [Fri, 2 Aug 2013 12:00:37 +0000 (08:00 -0400)]
acm.c: Handle client reregister local event

When client reregister is requested, ACM should rejoin/recreate
ACM multicast groups.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoacm: Save endpoint pkey in host order
Hal Rosenstock [Thu, 1 Aug 2013 21:10:00 +0000 (14:10 -0700)]
acm: Save endpoint pkey in host order

acm_ep stores and uses a pkey value, assuming that it is in
host order.  However, ibv_query_pkey returns the pkey in network
order.  We need to byte swap the pkey when saving it.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoacm: Add pkey to error message
Hal Rosenstock [Thu, 1 Aug 2013 21:01:11 +0000 (14:01 -0700)]
acm: Add pkey to error message

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoibacm: Release 1.0.8 v1.0.8
Sean Hefty [Thu, 25 Jul 2013 22:31:06 +0000 (15:31 -0700)]
ibacm: Release 1.0.8

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoMakefile.am: Fix name of ibacm_hosts.cfg file to *.data
Sean Hefty [Fri, 26 Jul 2013 04:29:43 +0000 (21:29 -0700)]
Makefile.am: Fix name of ibacm_hosts.cfg file to *.data

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoconfigure: Use subdir-objects option
Sean Hefty [Thu, 25 Jul 2013 20:38:12 +0000 (13:38 -0700)]
configure: Use subdir-objects option

Reduce clobbering the build directory.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoconfigure.ac: Minor updates based on autoupdate suggestions
Sean Hefty [Thu, 25 Jul 2013 19:50:45 +0000 (12:50 -0700)]
configure.ac: Minor updates based on autoupdate suggestions

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoautogen.sh: Use autoreconf
Sean Hefty [Thu, 25 Jul 2013 19:48:21 +0000 (12:48 -0700)]
autogen.sh: Use autoreconf

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoMakefile.am: Replace INCLUDES with AM_CPPFLAGS
Sean Hefty [Thu, 25 Jul 2013 19:46:56 +0000 (12:46 -0700)]
Makefile.am: Replace INCLUDES with AM_CPPFLAGS

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoUse foreign option with AM_INIT_AUTOMAKE
Sean Hefty [Thu, 25 Jul 2013 19:45:46 +0000 (12:45 -0700)]
Use foreign option with AM_INIT_AUTOMAKE

Update AM_INIT_AUTOMAKE usage, which makes it possible to
use autoreconf with the ibacm package.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years agoChange configure.in to configure.ac
Sean Hefty [Thu, 25 Jul 2013 19:42:40 +0000 (12:42 -0700)]
Change configure.in to configure.ac

Update autotools support.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
10 years ago[ibacm] Add support for name cache
Hal Rosenstock [Fri, 19 Jul 2013 18:30:04 +0000 (14:30 -0400)]
[ibacm] Add support for name cache

Similar to IPv4 and IPv6 preload, (host)name cache preload is
now supported in addr_preload_file when acm_hosts is specified
for addr_preload setting.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years ago[ibacm] Update documentation for the "new" preload option names
Hal Rosenstock [Fri, 19 Jul 2013 18:00:02 +0000 (14:00 -0400)]
[ibacm] Update documentation for the "new" preload option names

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoibacm: Rename hosts file from .cfg to .data
Sean Hefty [Fri, 19 Jul 2013 16:29:39 +0000 (09:29 -0700)]
ibacm: Rename hosts file from .cfg to .data

The git tree names the hosts file with a .cfg extension, but the
code defaults to .data.  Rename the sample hosts file with .data
to match the code.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoAllow user to preload address data without route data
Sean Hefty [Fri, 28 Jun 2013 17:55:36 +0000 (10:55 -0700)]
Allow user to preload address data without route data

ACM must load routing data (path records) before it can
preload address information.  Remove this order requirement.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoAdd option to allow for ACM cache lookup performance measurement
Hal Rosenstock [Fri, 21 Jun 2013 00:29:03 +0000 (03:29 +0300)]
Add option to allow for ACM cache lookup performance measurement

-C option is added for resolution repetition count

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoAdd support for preloading IPv4 and IPv6 ACM caches
Hal Rosenstock [Thu, 27 Jun 2013 18:48:11 +0000 (21:48 +0300)]
Add support for preloading IPv4 and IPv6 ACM caches

A hosts file (ibacm_hosts.cfg) is configured with tuples of
IP addresses (either IPv4 or IPv6) and IB GID. This information
in conjunction with the path record preloading allows
for the IPv4 and IPv6 ACM caches to be preloaded.

IPv4 was tested with both rping and ucmatose as well as
acme. IPv6 was tested with ucmatose and acme.

The remaining ACM cache to be preloaded is the name cache.
This will be added in subsequent patch.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoConvert linux header files from DOS to unix format
Hal Rosenstock [Thu, 27 Jun 2013 17:08:50 +0000 (20:08 +0300)]
Convert linux header files from DOS to unix format

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoib_acme.c: Support IPv6 addressing in resolve_ip
Hal Rosenstock [Wed, 19 Jun 2013 21:18:23 +0000 (00:18 +0300)]
ib_acme.c: Support IPv6 addressing in resolve_ip

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoIncrease buffer space for inet_ntop from 32 to INET6_ADDRSTRLEN
Hal Rosenstock [Wed, 19 Jun 2013 17:08:20 +0000 (20:08 +0300)]
Increase buffer space for inet_ntop from 32 to INET6_ADDRSTRLEN

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoAdd description of preloading GID and LID destination caches to acm_notes.txt
Hal Rosenstock [Thu, 27 Jun 2013 16:56:18 +0000 (19:56 +0300)]
Add description of preloading GID and LID destination caches to acm_notes.txt

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoAdd the ability to preload the destination GID and LID caches
Hal Rosenstock [Thu, 27 Jun 2013 13:48:24 +0000 (16:48 +0300)]
Add the ability to preload the destination GID and LID caches

Preloading of these caches is supported via a file which is
produced by OpenSM by the dump_pr plugin which contains
sufficient SA PathRecord information. Details on this
file format and configuring OpenSM for this are found in
dump_pr_notes.txt in dump_pr.

File format is specified in ibacm_opts.cfg as follows:
path_rec_fmt full_opensm_v1

File format defaults to none which means no preload of ACM cache.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoUpdate ib_acme.1 and ibacm.1 man pages
Hal Rosenstock [Sun, 16 Jun 2013 12:26:36 +0000 (15:26 +0300)]
Update ib_acme.1 and ibacm.1 man pages

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoman: Change DOS formatting to unix formatting
Hal Rosenstock [Sat, 15 Jun 2013 14:24:24 +0000 (17:24 +0300)]
man: Change DOS formatting to unix formatting

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoib_acme: Enhance documention in generated ibacm_opt.cfg
Hal Rosenstock [Fri, 28 Jun 2013 01:08:27 +0000 (18:08 -0700)]
ib_acme: Enhance documention in generated ibacm_opt.cfg

Improve the description of the send_depth value in the generated
ibacm_opt.cfg file.  Fixup a couple of other areas.  Patch derived from
patches submitted by Hal.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoacm_notes.txt: Change DOS formatting to unix formatting
Hal Rosenstock [Wed, 12 Jun 2013 18:37:37 +0000 (21:37 +0300)]
acm_notes.txt: Change DOS formatting to unix formatting

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoRemove sample ibacm_*.cfg files
Sean Hefty [Fri, 28 Jun 2013 01:04:39 +0000 (18:04 -0700)]
Remove sample ibacm_*.cfg files

Configuration files can be automatically generated using ib_acme.  Remove
the files from the source tree, versus maintaining them and ensuring that
they remain in sync with the files generated by ib_acme.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoUpdate build notes for the librdmacm
Sean Hefty [Thu, 9 May 2013 14:55:53 +0000 (07:55 -0700)]
Update build notes for the librdmacm

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoIncrease size of available file name
Sean Hefty [Mon, 25 Mar 2013 21:04:57 +0000 (14:04 -0700)]
Increase size of available file name

ibacm limits the path to the log and lock file to 32 characters.
This is too small for some users.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoib_acme: Add option to display output in more readable format
Sean Hefty [Tue, 9 Oct 2012 18:39:15 +0000 (11:39 -0700)]
ib_acme: Add option to display output in more readable format

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoibacm: Remove umask(0)
Sean Hefty [Tue, 9 Oct 2012 18:33:27 +0000 (11:33 -0700)]
ibacm: Remove umask(0)

This causes ibacm files to be created as world writable.

Problem reported by Florian Weimer <fweimer@redhat.com>

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
11 years agoibacm: Timeout address and route data
Sean Hefty [Tue, 9 Oct 2012 00:00:14 +0000 (17:00 -0700)]
ibacm: Timeout address and route data

Add an option that allows address and route data to
time out.  Once data has timed out, it needs to be
resolved again.  This helps handle cases where the
remote data has changed.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agov1.0.7 v1.0.7
Sean Hefty [Fri, 29 Jun 2012 23:12:58 +0000 (16:12 -0700)]
v1.0.7

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agoConfigure init script based on target OS
Sean Hefty [Wed, 6 Jun 2012 23:10:22 +0000 (16:10 -0700)]
Configure init script based on target OS

The init script either needs to depend on 'rdma' or 'openibd'
scripts being started.  The actual script depends on the target
operating system.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agoibacm: Automatically select local port if not specified by path record
Sean Hefty [Mon, 4 Jun 2012 18:38:54 +0000 (11:38 -0700)]
ibacm: Automatically select local port if not specified by path record

If the user specifies a DLID or DGID as part of a path record lookup,
automatically select a local port.  This allows a user to query an SA
without needing to specify the local SLID or SGID.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agoibacm/acme: Eliminate segfault when SLID/SGID not given
Sean Hefty [Thu, 31 May 2012 23:48:32 +0000 (16:48 -0700)]
ibacm/acme: Eliminate segfault when SLID/SGID not given

Problem and cause reported by Hal Rosenstock <hal@mellanox.com>

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Tested-by: Hal Rosenstock <hal@mellanox.com>
12 years agoibacm: Avoid negative shift for subnet timeout
Hal Rosenstock [Thu, 31 May 2012 22:35:41 +0000 (15:35 -0700)]
ibacm: Avoid negative shift for subnet timeout

Otherwise resulting port subnet timeout may be too large.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agoibacm: security fix replace sprintf with snprintf
Dotan Barak [Mon, 23 Apr 2012 16:09:44 +0000 (09:09 -0700)]
ibacm: security fix replace sprintf with snprintf

Replace sprintf with snprintf to protects from buffer overflow.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Reviewed-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agoibacm: Fix rmpbuild issues
Sean Hefty [Wed, 30 May 2012 00:10:10 +0000 (17:10 -0700)]
ibacm: Fix rmpbuild issues

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agov1.0.6 v1.0.6
Sean Hefty [Fri, 30 Mar 2012 22:46:39 +0000 (15:46 -0700)]
v1.0.6

12 years agoibacm: Fixes to ACM package to support distros
Sean Hefty [Fri, 30 Mar 2012 23:31:08 +0000 (16:31 -0700)]
ibacm: Fixes to ACM package to support distros

Set of changes to fixup the ibacm package for inclusion into RedHat 6.
Changes are based on feedback from Doug Ledford <dledford@redhat.com>.
These are primarily changes to the build files, along with name changes
to the man pages and sample configuration files.

Rename the ib_acm service to match the package name, ibacm.

Rename the ibacm configuration files to use the prefix 'ibacm' instead
of 'acm'.  The new sample files are 'ibacm_addr.cfg' and 'ibacm_opts.cfg'.

Move location of ACM lock and configuration files and ibacm.pid
files.  They are currently in non-standard locations.

Modify ibacm and ib_acme to use $sysconfdir, $bindir, and rdmadir
configure values.  The ibacm_addr.cfg and ibacm_opt.cfg files will now be
read/written to $sysconfdir/$rdmadir by default, with rdmadir defaulting
to 'rdma' if not specified..  And ibacm will execute
$bindir/ib_acme if it needs to create the ibacm_addr.cfg file.  Without
$bindir, the ibacm service can fail to launch ib_acme when started
from an init script.

Add init script as part of install.  The init script is installed
into $sysconfdir/init.d.  The init script is processed by configure,
so that it executes the correct ibacm service that was installed.

Fixup man pages based on changes.

Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agoibacm: Set default route resolution to SA
Sean Hefty [Fri, 6 Apr 2012 15:12:02 +0000 (08:12 -0700)]
ibacm: Set default route resolution to SA

SA resolution works in more environments than the ACM protocol.
SA is the default protocol for the ibacm_opts.cfg file, but if
that file is not available, the ibacm service defaults to ACM.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agoibacm: Display LID using unsigned decimal
Hal Rosenstock [Fri, 6 Apr 2012 14:58:55 +0000 (07:58 -0700)]
ibacm: Display LID using unsigned decimal

So that all LIDs diplay as positive numbers

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agoib_acme: Better error handling in resolve_gid
Hal Rosenstock [Thu, 5 Apr 2012 23:29:52 +0000 (16:29 -0700)]
ib_acme: Better error handling in resolve_gid

A return of 0 is an error for inet_pton but if 0 is returned
from resolve_gid, show_path is mistakenly called so if
0 is returned from inet_pton, return -1 instead (which is
what is done elsewhere in acme).

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agoib_acme: Use IPv4 rather than IPv6 when connecting to ACM server
Hal Rosenstock [Thu, 5 Apr 2012 23:24:09 +0000 (16:24 -0700)]
ib_acme: Use IPv4 rather than IPv6 when connecting to ACM server

When both IPv4 and IPv6 are running, getaddrinfo indicates IPv6
rather than IPv4 and that currently causes a failure to connect to
the ACM server.  Fix is to set the address family in the hint to
getaddrinfo to IPv4.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agoib_acme: Fix typo
Hal Rosenstock [Thu, 5 Apr 2012 23:20:44 +0000 (16:20 -0700)]
ib_acme: Fix typo

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agoibacm: Allow user to specify LIDs and/or GIDs when using PR lookups
Sean Hefty [Mon, 3 Oct 2011 19:40:16 +0000 (12:40 -0700)]
ibacm: Allow user to specify LIDs and/or GIDs when using PR lookups

Currently, we only allow a user to lookup data with path records
if the LIDs are provided.  Handle the case where the GIDs may be
provided instead.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agoFix refcnt for multicast destination
sean.hefty@intel.com [Wed, 4 Apr 2012 00:20:35 +0000 (17:20 -0700)]
Fix refcnt for multicast destination

mc_dest has a default refcnt of 0.  When a multicast destination is
released, an attempt is made to free it, which can result in the
ibacm service crashing.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agoAfter allocation of dynamic memory blocks, check that the allocation
Dotan Barak [Mon, 28 Nov 2011 20:21:37 +0000 (12:21 -0800)]
After allocation of dynamic memory blocks, check that the allocation
succeeded, if it failed handle it gracefully.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Reviewed-by: Erez Shitrit <erezsh@mellanox.co.il>
12 years agov1.0.5
Sean Hefty [Thu, 19 May 2011 20:15:20 +0000 (13:15 -0700)]
v1.0.5

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
12 years agoib_acme: Add missing carriage return in usage statements
Sean Hefty [Mon, 29 Aug 2011 23:14:50 +0000 (16:14 -0700)]
ib_acme: Add missing carriage return in usage statements

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoibacm: Add performance counters
Sean Hefty [Mon, 27 Jun 2011 17:29:36 +0000 (10:29 -0700)]
ibacm: Add performance counters

Add performance counters to track service usage.  Counters are exposed
via a new perf query request.  Update ib_acme to retrieve counters from
a specified endpoint.

Counters that are currently defined are:

- Address and route resolution errors
- Resolution requests
- Requests not satisfied as a result of no data available
- Requests requiring an address lookup
- Requests that found address information in the cache
- Requests requiring a route lookup (i.e. path record query)
- Requests that found route information in the cache

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoFix strict-aliasing rules warning
Sean Hefty [Thu, 30 Jun 2011 00:28:57 +0000 (17:28 -0700)]
Fix strict-aliasing rules warning

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoReduce build output
Sean Hefty [Thu, 30 Jun 2011 17:06:36 +0000 (10:06 -0700)]
Reduce build output

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoFixup starting curly brace alignment
Sean Hefty [Mon, 27 Jun 2011 19:08:16 +0000 (12:08 -0700)]
Fixup starting curly brace alignment

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoibacm: Run as daemon by default
Sean Hefty [Mon, 27 Jun 2011 17:19:57 +0000 (10:19 -0700)]
ibacm: Run as daemon by default

Start ibacm as a daemon by default, with an optional non-daemon mode.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoibacm: Allocate address handles dynamically when needed
Sean Hefty [Fri, 1 Apr 2011 23:03:40 +0000 (16:03 -0700)]
ibacm: Allocate address handles dynamically when needed

ibacm allocates an address handle for every remote destination
that it tracks.  However, under normal operation, the handle
is used infrequently - typically only once by the target
service to send a response and not at all on the initiator
service.  Avoid the overhead of having 1 address handle per
destination by allocating them dynamically only when they are needed.

The exceptions to this are the address handles allocated to
communicate with the SA and the primary multicast group.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoibacm: Join only the base multicast group if using SA path resolution
Sean Hefty [Fri, 1 Apr 2011 22:58:19 +0000 (15:58 -0700)]
ibacm: Join only the base multicast group if using SA path resolution

If the ACM service is configured to use the SA to resolve path
record data, then only join the base multicast group.  We only
need to join other groups if we're creating path records based
on multicast data, using the acm route protocol.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoibacm: Reduce overhead on multicast groups not used
Sean Hefty [Fri, 1 Apr 2011 21:46:34 +0000 (14:46 -0700)]
ibacm: Reduce overhead on multicast groups not used

ACM may join several multicast groups when using the multicast
group protocol.  No data is ever sent on those groups.  They exist
simply to see if a port *could* send data across those groups, for
example, to validate the mtu or rate between two endpoints.  Since
we don't send data on them, there's no need to create an address
handle for them or attach the ACM UD QP to it.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoHandle port down events
Sean Hefty [Wed, 23 Feb 2011 22:41:48 +0000 (14:41 -0800)]
Handle port down events

Process port down or error events.  While a port is down, the
ibacm service will fail all requests to endpoints on that port.
Cached data is not invalidated however, under the assumption
that the port state is temporary.  (A future enhancement can
optimize the cleanup.)

Since a port can now transition between up and down, we need
to fixup a couple of places to avoid initializing structures
multiple times.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoHandle port up events
Sean Hefty [Tue, 22 Feb 2011 18:26:01 +0000 (10:26 -0800)]
Handle port up events

Handle port up events.  The IB ACM service only checks once
during initialization for active ports to use.  If a port later
becomes available, the service will not be able to use it.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoAdd log message when incrementing SM destination reference count
Sean Hefty [Thu, 10 Feb 2011 20:31:44 +0000 (12:31 -0800)]
Add log message when incrementing SM destination reference count

The reference count for the SM destination structure is manually
incremented, but acm_put_dest is used to release it.  This results
in an unmatched put message in the ibacm log file.  Provide a matching
'get dest' log message when incrementing the SM destination.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoSet SM LID address in network byte order
Sean Hefty [Thu, 10 Feb 2011 20:06:46 +0000 (12:06 -0800)]
Set SM LID address in network byte order

acm_set_dest_addr expects LIDs to be in network order.
Convert the sm_lid retrieved from the port attributes into
network order.  This formats the LID value correctly
when entered into the ibacm log.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoMove endpoint activation to another thread
Sean Hefty [Fri, 21 Jan 2011 01:06:28 +0000 (17:06 -0800)]
Move endpoint activation to another thread

To support dynamic changes, move endpoint activation from
the main thread into a dedicated thread that will also
process asynchronous events (to be added separately).  The
main thread will still initialize the device and port
list, but activation code will be handled by the new thread,
so that endpoints can be deferred until their associated
ports are activated.

This also means that multicast joins are deferred, and
additional state checking is needed to prevent the main
thread (which processes client requests) from accessing
endpoints which are not yet fully active.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoTrack inactive devices and ports
Sean Hefty [Thu, 20 Jan 2011 21:26:26 +0000 (13:26 -0800)]
Track inactive devices and ports

When obtaining a list of devices and ports, store all that are
available in the local device list, including those that are not
active.  This will allow the ib_acm service to handle dynamic
changes, like port up/down events.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoDelay opening address file until assigning addresses
Sean Hefty [Thu, 20 Jan 2011 19:46:44 +0000 (11:46 -0800)]
Delay opening address file until assigning addresses

In order to handle ports that are down, we need to add
new endpoints only when they are brought online or assigned
new partitions (pkeys).  This is easier to handle if we
delay the opening of the address configuration file until
it is needed to assign addresses.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoibacm: restructure path query code
Sean Hefty [Fri, 17 Dec 2010 20:53:43 +0000 (12:53 -0800)]
ibacm: restructure path query code

Merge acm_svr_query_sa() with acm_svr_query().

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
13 years agoibacm: Convert LID name to host order
Sean Hefty [Fri, 17 Dec 2010 20:10:14 +0000 (12:10 -0800)]
ibacm: Convert LID name to host order

Signed-off-by: Sean Hefty <sean.hefty@intel.com>