]> git.openfabrics.org - ~shefty/librdmacm.git/log
~shefty/librdmacm.git
14 years agolibrdmacm/man: add man pages for calls in rdma_verbs.h
Sean Hefty [Mon, 19 Jul 2010 18:45:21 +0000 (11:45 -0700)]
librdmacm/man: add man pages for calls in rdma_verbs.h

rdma_verbs.h define several inline functions that wrap around verb
routines.  Add man pages for these calls.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm/man: add rdma_get_request man page to release
Sean Hefty [Mon, 19 Jul 2010 18:36:09 +0000 (11:36 -0700)]
librdmacm/man: add rdma_get_request man page to release

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: remove 32-bit build warnings
Sean Hefty [Tue, 1 Jun 2010 17:26:49 +0000 (10:26 -0700)]
librdmacm: remove 32-bit build warnings

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: support 2.6.9
Sean Hefty [Tue, 1 Jun 2010 14:44:14 +0000 (07:44 -0700)]
librdmacm: support 2.6.9

Redhat 4.x is based on 2.6.9.  Add support for older kernels.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: release 1.0.12 v1.0.12
Sean Hefty [Mon, 17 May 2010 21:41:59 +0000 (14:41 -0700)]
librdmacm: release 1.0.12

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: fix makefile installation path
Sean Hefty [Mon, 24 May 2010 18:02:09 +0000 (11:02 -0700)]
librdmacm: fix makefile installation path

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm/man: add man pages for new APIs
Sean Hefty [Fri, 21 May 2010 21:29:51 +0000 (14:29 -0700)]
librdmacm/man: add man pages for new APIs

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: define struct ibv_path_record if not defined
Sean Hefty [Mon, 17 May 2010 21:37:30 +0000 (14:37 -0700)]
librdmacm: define struct ibv_path_record if not defined

librdmacm relies on struct ibv_path_record from libibverbs.  However,
to support older versions of libibverbs, define struct ibv_path_record
if it is not already defined.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: disable AF_IB support
Sean Hefty [Tue, 11 May 2010 18:15:47 +0000 (11:15 -0700)]
librdmacm: disable AF_IB support

To avoid potential compatability issues, disable AF_IB support
until it has been queued for inclusion upstream.  We will re-enable
AF_IB support after releasing version 1.0.12 for OFED 1.5.2, which
will include support for IB ACM.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: initialize path_cnt
Sean Hefty [Thu, 6 May 2010 22:52:23 +0000 (15:52 -0700)]
librdmacm: initialize path_cnt

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: use IB ACM to resolve IB path
Sean Hefty [Thu, 6 May 2010 22:51:38 +0000 (15:51 -0700)]
librdmacm: use IB ACM to resolve IB path

Starting with 2.6.33, the kernel supports the ability to
manually specify the path record that a connection should
use.  Allow the librdmacm to contact the IB ACM to acquire
path record data, even if rdma_getaddrinfo is not used and
the kernel does not support AF_IB.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: check if kernel supports AF_IB
Sean Hefty [Thu, 6 May 2010 22:51:35 +0000 (15:51 -0700)]
librdmacm: check if kernel supports AF_IB

Add check during initialization to determine if the kernel
supports AF_IB.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm/mckey: use AF_IB for unmapped multicast addresses
Sean Hefty [Thu, 6 May 2010 22:51:06 +0000 (15:51 -0700)]
librdmacm/mckey: use AF_IB for unmapped multicast addresses

If the user joins an unmapped multicast address, use AF_IB,
rather than AF_INET6, to communicate that information with the
kernel.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: update man pages
Sean Hefty [Thu, 6 May 2010 22:51:01 +0000 (15:51 -0700)]
librdmacm: update man pages

Update man pages to reflect recent changes to the APIs.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm/rdma_server: add new sample server application
Sean Hefty [Thu, 6 May 2010 22:50:57 +0000 (15:50 -0700)]
librdmacm/rdma_server: add new sample server application

Provide a simple server application to demonstrate the minimal
amount of coding needed to accept a connection request from
a client and exchange messages.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm/rdma_client: add new client sample
Sean Hefty [Thu, 6 May 2010 22:50:54 +0000 (15:50 -0700)]
librdmacm/rdma_client: add new client sample

Provide a very simple client application that shows the
minimal coding needed to establish a connection and exchange
messages with a server.  The client makes use of the new
rdma_getaddrinfo and rdma_create_ep calls, plus rdma verbs
abstractions.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: provide abstracted verb calls
Sean Hefty [Thu, 6 May 2010 22:50:50 +0000 (15:50 -0700)]
librdmacm: provide abstracted verb calls

Provide abstractions to the verb calls to simplify the user
interface for more casual verbs consumers.  Users still have
access to the full range of verbs functionality by calling
verbs directly.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: format IB CM private data RDMA CM header
Sean Hefty [Thu, 6 May 2010 22:50:43 +0000 (15:50 -0700)]
librdmacm: format IB CM private data RDMA CM header

When IB ACM is used, the address and route resolution is
done entirely in user space.  Before converting AF_INET or
AF_INET6 addresses to AF_IB, format the connection private
data for IB CM REQ messages.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: use sockaddr_ib addressing if IB ACM is in use
Sean Hefty [Thu, 6 May 2010 22:49:55 +0000 (15:49 -0700)]
librdmacm: use sockaddr_ib addressing if IB ACM is in use

If IB ACM route resolution succeeds, provide the user with
AF_IB addresses, rather than AF_INET or AF_INET6 addressing.
AF_IB identifies the local and remote devices directly,
eliminating the need to perform address resolution a second
time via rdma_resolve_addr.

AF_IB addresses are returned using sockaddr_ib as part of
rdma_getaddrinfo.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: define RDMA_PS_IB
Sean Hefty [Thu, 6 May 2010 22:49:04 +0000 (15:49 -0700)]
librdmacm: define RDMA_PS_IB

AF_IB uses the IB port space.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: add support for IB ACM service
Sean Hefty [Thu, 6 May 2010 22:48:53 +0000 (15:48 -0700)]
librdmacm: add support for IB ACM service

Allow the librdmacm to contact a service via sockets to obtain
address mapping and path record data.  The use of the service
is controlled through a build option (with-ib_acm).  If the
library fails to contact the service, it falls back to using
the kernel services to resolve address and routing data.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: set src_addr in rdma_getaddrinfo
Sean Hefty [Thu, 6 May 2010 22:48:03 +0000 (15:48 -0700)]
librdmacm: set src_addr in rdma_getaddrinfo

If the user provides a source address as a hint, copy
the address to rdma_addrinfo ai_src_addr.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: auto create QPs in rdma_get_request
Sean Hefty [Thu, 6 May 2010 22:47:58 +0000 (15:47 -0700)]
librdmacm: auto create QPs in rdma_get_request

If the user passed initial QP attributes into rdma_create_ep,
allocate a QP for the user as part of rdma_get_request.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: add support for passive side in rdma_create_ep
Sean Hefty [Thu, 6 May 2010 22:47:52 +0000 (15:47 -0700)]
librdmacm: add support for passive side in rdma_create_ep

Allow calling rdma_create_ep for a listening rdma_cm_id.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: add rdma_destoy_ep
Sean Hefty [Thu, 6 May 2010 22:47:33 +0000 (15:47 -0700)]
librdmacm: add rdma_destoy_ep

Provide counterpart call to rdma_create_ep.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: add new call to create id
Sean Hefty [Thu, 6 May 2010 22:47:27 +0000 (15:47 -0700)]
librdmacm: add new call to create id

Provide a simple call to create an rdma_id, with optional QP.  The
id is created using synchronous operation, using the output of
rdma_getaddrinfo.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: specify qp_type when creating id
Sean Hefty [Thu, 6 May 2010 22:47:23 +0000 (15:47 -0700)]
librdmacm: specify qp_type when creating id

To support AF_IB / PS_IB, we need to specify the qp type when
creating the rdma_cm_id.  The kernel requires this in order
to select the correct type of operation to perform (e.g. SIDR
versus REQ).

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: define options to set IB route directly
Sean Hefty [Thu, 6 May 2010 22:47:14 +0000 (15:47 -0700)]
librdmacm: define options to set IB route directly

Add the definitions needed to set IB path record data using set_option.
This will be used by rdma_create_ep().

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: add rdma_get_request
Sean Hefty [Thu, 6 May 2010 22:46:37 +0000 (15:46 -0700)]
librdmacm: add rdma_get_request

To simplify passive side operation and better support synchronous
operations, add rdma_get_request().  This function is called on the
listening side to retrieve a connection request event.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: add rdma_getaddrinfo
Sean Hefty [Thu, 6 May 2010 22:46:32 +0000 (15:46 -0700)]
librdmacm: add rdma_getaddrinfo

Provide a call similar to getaddrinfo for RDMA devices and
connections.  rdma_get_addrinfo is modeled after getaddrinfo, with
the following modifications:

A source address is returned as part of the call to allow the
user to allocate the necessary resources for connections.

Optional routing information may be returned to support
Infiniband fabrics.  IB routing information includes necessary
path record data.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: expose ucma_init to other internal modules
Sean Hefty [Thu, 6 May 2010 22:45:13 +0000 (15:45 -0700)]
librdmacm: expose ucma_init to other internal modules

Remove static property from ucma_init and expose its
definition in cma.h.  The address resolution module will
need access to this function.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: allow conn_param to be optional
Sean Hefty [Thu, 6 May 2010 22:45:09 +0000 (15:45 -0700)]
librdmacm: allow conn_param to be optional

If conn_param is not provided to rdma_connect or rdma_accept,
then default values are used to establish the connection.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: allow user to specify max RDMA resouces
Sean Hefty [Thu, 6 May 2010 22:45:05 +0000 (15:45 -0700)]
librdmacm: allow user to specify max RDMA resouces

Allow the user to indicate that the library should select the
maximum RDMA read values available should be used when
establishing a connection.  The library selects the maximum
based on local hardware limitations and connection request
data.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: make CQs optional for rdma_create_qp
Sean Hefty [Thu, 6 May 2010 22:44:57 +0000 (15:44 -0700)]
librdmacm: make CQs optional for rdma_create_qp

Allow the user to specify NULL for the send and receive CQs when
creating a QP through rdma_create_qp.  The librdmacm will automatically
create CQs for the user, along with completion channel.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: allow pd parameter to be optional
Sean Hefty [Thu, 6 May 2010 22:44:52 +0000 (15:44 -0700)]
librdmacm: allow pd parameter to be optional

Allow the user to create a QP using rdma_create_qp without
specifying a PD.  If a PD is not given, a default PD will be
used instead.  This simplifies the user interface.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: support synchronous rdma_cm_id's
Sean Hefty [Thu, 6 May 2010 22:44:46 +0000 (15:44 -0700)]
librdmacm: support synchronous rdma_cm_id's

Allow the user to specify NULL as the rdma_event_channel in
order to indicate that the rdma_cm_id should process all requests
synchronously.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: use calloc call
Sean Hefty [Thu, 6 May 2010 22:44:42 +0000 (15:44 -0700)]
librdmacm: use calloc call

Use calloc to allocate and clear memory.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: move common definitions to internal header file
Sean Hefty [Thu, 6 May 2010 22:44:38 +0000 (15:44 -0700)]
librdmacm: move common definitions to internal header file

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: add support for AF_IB multicast addresses
Sean Hefty [Thu, 6 May 2010 22:44:34 +0000 (15:44 -0700)]
librdmacm: add support for AF_IB multicast addresses

Allow the user to specify AF_IB addresses when joining
multicast groups.  AF_IB addresses contain MGIDs directly.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: add support for AF_IB to resolve_addr
Sean Hefty [Thu, 6 May 2010 22:44:29 +0000 (15:44 -0700)]
librdmacm: add support for AF_IB to resolve_addr

Allow user to specify AF_IB addresses to rdma_resolve_addr.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: add support to bind using AF_IB
Sean Hefty [Thu, 6 May 2010 22:44:25 +0000 (15:44 -0700)]
librdmacm: add support to bind using AF_IB

Allow rdma_bind_addr to accept AF_IB addresses.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: add support for sockaddr_ib length
Sean Hefty [Thu, 6 May 2010 22:44:21 +0000 (15:44 -0700)]
librdmacm: add support for sockaddr_ib length

Enhance ucma_addrlen to return the correct address size
for AF_IB.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: replace query_route call with separate queries
Sean Hefty [Thu, 6 May 2010 22:44:16 +0000 (15:44 -0700)]
librdmacm: replace query_route call with separate queries

To support other address families and multiple path records,
replace the query_route call with specific query calls to obtain
only the desired information.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: add support to query GIDs
Sean Hefty [Thu, 6 May 2010 22:44:11 +0000 (15:44 -0700)]
librdmacm: add support to query GIDs

Support query GID ABI to obtain GID information separately from
path record data and sa_family addressing.

This patch also adds the definition for sockaddr_ib for user space.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: add ability to query IB path records
Sean Hefty [Thu, 6 May 2010 22:43:08 +0000 (15:43 -0700)]
librdmacm: add ability to query IB path records

The current query_route command only supports 2 path records.
Add support for query_path, which is capable of supporting
multiple paths.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: support querying AF_IB addresses
Sean Hefty [Wed, 7 Apr 2010 18:01:52 +0000 (11:01 -0700)]
librdmacm: support querying AF_IB addresses

The current query route command returns path record data and address
information.  The latter is restricted to sizeof(sockaddr_in6).  In
order to support AF_IB, modify the library to use the new query addr
command, which supports larger address sizes and avoids querying for
path records data when none are available.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: name changes to indicate only IP addresses supported
Sean Hefty [Wed, 7 Apr 2010 18:01:43 +0000 (11:01 -0700)]
librdmacm: name changes to indicate only IP addresses supported

Several commands to the kernel RDMA CM only support IP addresses
because of limitations in the structure definition.  Update
the library to match the name changes in the kernel and indicate
that only IP addresses can be used with the current commands.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agoSubject: [PATCH] librdmacm: document/clarify the delivery of connection
Or Gerlitz [Mon, 22 Mar 2010 17:49:18 +0000 (09:49 -0800)]
Subject: [PATCH] librdmacm: document/clarify the delivery of connection
established event

Applications based on the rdma-cm may assume that established event
is always delivered by the the kernel stack, clarify that.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
14 years agolibrdmacm: transition QP to RTS before sending reply
Sean Hefty [Fri, 5 Feb 2010 22:25:15 +0000 (14:25 -0800)]
librdmacm: transition QP to RTS before sending reply

In order to handle a race condition where the passive side of
a connection can receive data on a QP before the connection established
event has been received, transition the QP to RTS before sending the reply.
This allows a user to send a response to any received message immediately,
rather than waiting until the connection established event has been
processed.

A similar fix was applied to the kernel rdma_cm a while ago.
Simply duplicate the fix in the user space library.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: release 1.0.11 v1.0.11
Sean Hefty [Tue, 24 Nov 2009 20:57:19 +0000 (12:57 -0800)]
librdmacm: release 1.0.11

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm/mckey: report multicast events to the user
Or Gerlitz [Fri, 13 Nov 2009 23:08:08 +0000 (15:08 -0800)]
librdmacm/mckey: report multicast events to the user

Extend mckey to report multicast events.  If mckey joins as a server,
it can be used to report membership join or ip address changes to
the  user.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm/cmatose: add support for ipv6
David J. Wilder [Tue, 27 Oct 2009 16:30:24 +0000 (08:30 -0800)]
librdmacm/cmatose: add support for ipv6

Signed-off-by: David Wilder <dwilder@us.ibm.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm/mckey: enforce local binding for unmapped multicast address
Or Gerlitz [Mon, 9 Nov 2009 22:46:20 +0000 (14:46 -0800)]
librdmacm/mckey: enforce local binding for unmapped multicast address

Enforce that mckey is bound to a local address when specifying
an unmapped multicast address.  Otherwise, mckey crashes when
attempting to use cmd_id->verbs pointer.

Update documentation on using unmapped MGIDs.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: release 1.0.10 1.0.10 v1.0.10
Sean Hefty [Wed, 21 Oct 2009 16:41:36 +0000 (09:41 -0700)]
librdmacm: release 1.0.10

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm/examples: print errno on failures
Sean Hefty [Wed, 21 Oct 2009 16:41:32 +0000 (09:41 -0700)]
librdmacm/examples: print errno on failures

Replace printf(... ret) with perror to display the errno value now
that the library sets errno consistently.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: returns errors from the library consistently
Jason Gunthorpe [Wed, 21 Oct 2009 15:02:43 +0000 (08:02 -0700)]
librdmacm: returns errors from the library consistently

Remove the return of -errno and always return codes via errno.
As documented in librdmacm, these libraries are already documented
to return -1 to indicate the code is in errno.

Update rping to show correct error reporting methodology.

Also fix errant return of 0 if the read/write syscalls return 0.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: initialize correct pthread condition in rdma_join_multicast
Sean Hefty [Wed, 21 Oct 2009 14:50:19 +0000 (07:50 -0700)]
librdmacm: initialize correct pthread condition in rdma_join_multicast

rdma_join_multicast re-initializes id_priv->cond rather than mc->cond.
Fix this.  Bug reported by Nir Naaman.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: fix race initializing library
Sean Hefty [Mon, 19 Oct 2009 14:21:42 +0000 (07:21 -0700)]
librdmacm: fix race initializing library

Multi-threaded code can race with ucma_init().  When ucma_init() is called
it can set cma_dev_cnt before it is done initializing the library.  If
a second thread checks cma_dev_cnt and finds it non-zero, then it will
skip the call to ucma_init() and assume that the library is ready for use.
This can lead to an application crash during startup.

Do not set cma_dev_cnt until the end of ucma_init(), after all
initialization has completed.  Adjust the error handling code in
ucma_init() accordingly.

Bug reported by Nir Naaman.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
14 years agolibrdmacm: release 1.0.9 v1.0.9
Sean Hefty [Mon, 21 Sep 2009 15:47:17 +0000 (08:47 -0700)]
librdmacm: release 1.0.9

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
15 years agocmatose: avoid missing completions
Sean Hefty [Wed, 14 Jan 2009 22:31:34 +0000 (14:31 -0800)]
cmatose: avoid missing completions

cmatose uses a single CQ for send and receive completions.  It then
counts completions to determine if all sends and receives are done.
It's possible for a receive completion to be polled when the intent
is to count send completions.  (See server side polling for sends
done, then receives done.  The poll will get up to 8 completions,
which can lead to sends and receives being polled together.)

Fix this by separating the send and receive completions to their
own CQs to avoid any issues knowing what type of receives have been
polled from the CQ.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
15 years agorping: add ipv6 support
Aleksey Senin [Thu, 14 Aug 2008 15:01:58 +0000 (08:01 -0700)]
rping: add ipv6 support

Signed-off-by: Aleksey Senin <alekseys@voltaire.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
15 years agolibrdmacm: use sockaddr_storage
Aleksey Senin [Mon, 11 Aug 2008 20:00:54 +0000 (13:00 -0700)]
librdmacm: use sockaddr_storage

Replace padding and use sockaddr_storage instead.

Signed-off-by: Aleksey Senin <alekseys@voltaire.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm: release 1.0.8 v1.0.8
Sean Hefty [Thu, 3 Jul 2008 15:27:20 +0000 (08:27 -0700)]
librdmacm: release 1.0.8

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm: report timewait exit event
Sean Hefty [Thu, 3 Jul 2008 15:27:15 +0000 (08:27 -0700)]
librdmacm: report timewait exit event

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/rping: allow specifying hostnames in place of IP addresses
Sean Hefty [Wed, 2 Jul 2008 21:01:41 +0000 (14:01 -0700)]
librdmacm/rping: allow specifying hostnames in place of IP addresses

Problem reported by Jeff Squyres <jsquyres@cisco.com>

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/rping: fix duplicate usage message
Sean Hefty [Wed, 2 Jul 2008 19:02:35 +0000 (12:02 -0700)]
librdmacm/rping: fix duplicate usage message

Avoid displaying the usage message twice if --help option is used.
Problem reported by Jeff Squyres <jsquyres@cisco.com>.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm: implement address change event
Or Gerlitz [Wed, 2 Jul 2008 18:53:49 +0000 (11:53 -0700)]
librdmacm: implement address change event

RDMA_CM_EVENT_ADDR_CHANGE event can be used by librdmacm consumers
that wish to have their RDMA sessions always use the same links
(eg <hca/port>) as the IP stack does. In the current code, this
does not happen when bonding is used and fail-over happened,
but the IB link used by an already existing session is operating fine.

The kernel rdma-cm code was enhanced to use netevent notification
for sensing that a change has happened in the IP stack, and deliver
this event for ID that is misaligned that respect with the IP
stack. The user can act on the event or just ignore it

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agoMake manpage reflect the fact that rdma_bind_addr(port=0) does not
Aaron Fabbri [Tue, 10 Jun 2008 16:40:18 +0000 (09:40 -0700)]
Make manpage reflect the fact that rdma_bind_addr(port=0) does not
return the assigned port.

Signed-off-by: Aaron Fabbri <aafabbri@cisco.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm: fix license text
Sean Hefty [Thu, 22 May 2008 14:35:13 +0000 (07:35 -0700)]
librdmacm: fix license text

The license text for references a third software license
that was inadvertently copied in.  Update the license to match that used
by openfabrics.  This update was based on a request from HP.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/examples: add option to manually set port number
Dotan Barak [Tue, 8 Apr 2008 19:50:14 +0000 (12:50 -0700)]
librdmacm/examples: add option to manually set port number

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/examples
Dotan Barak [Tue, 8 Apr 2008 19:37:01 +0000 (12:37 -0700)]
librdmacm/examples

Fix some typos.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm: release 1.0.7 v1.0.7
Sean Hefty [Fri, 28 Mar 2008 18:42:53 +0000 (10:42 -0800)]
librdmacm: release 1.0.7

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm: add rdma_migrate_id
Sean Hefty [Wed, 20 Feb 2008 16:53:19 +0000 (08:53 -0800)]
librdmacm: add rdma_migrate_id

This is based on user feedback from Doug Ledford at RedHat:

Events that occur on an rdma_cm_id are reported to userspace through
an event channel.  Connection request events are reported
on the event channel associated with the listen.  When the
connection is accepted, a new rdma_cm_id is created and automatically
uses the listen event channel.  This is suboptimal where the user
only wants listen events on that channel.

Additionally, it may be desirable to have events related to
connection establishment use a different event channel than those
related to already established connections.

Allow the user to migrate an rdma_cm_id between event channels.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agoAdd BuildRequires for libibverbs 1.1 to RPM spec file
Roland Dreier [Wed, 20 Feb 2008 16:53:07 +0000 (08:53 -0800)]
Add BuildRequires for libibverbs 1.1 to RPM spec file

librdmacm can't build without libibverbs 1.1.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agoMove man pages from man1 into -utils package
Roland Dreier [Wed, 20 Feb 2008 16:53:00 +0000 (08:53 -0800)]
Move man pages from man1 into -utils package

Move the man pages for the executables that are shipped with the -utils
package from the -devel package into the -utils package itself.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agoAdd changelog to rpm spec file
Roland Dreier [Wed, 20 Feb 2008 16:52:43 +0000 (08:52 -0800)]
Add changelog to rpm spec file

rpmlint says:

    E: no-changelogname-tag

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agoRemove period from end of Summary in RPM spec file
Roland Dreier [Wed, 20 Feb 2008 16:52:26 +0000 (08:52 -0800)]
Remove period from end of Summary in RPM spec file

rpmlint says:

    W: summary-ended-with-dot Userspace RDMA Connection Manager.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agoTake empty ChangeLog out of RPM packages
Roland Dreier [Wed, 20 Feb 2008 16:52:06 +0000 (08:52 -0800)]
Take empty ChangeLog out of RPM packages

rpmlint says:

    E: zero-length /usr/share/doc/librdmacm-1.0.6/ChangeLog

and there's really no point in shipping an empty file, so just don't
package it.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agoFix Source URL in RPM spec file
Roland Dreier [Wed, 20 Feb 2008 16:51:44 +0000 (08:51 -0800)]
Fix Source URL in RPM spec file

Source packages are now in downloads/rdmacm/, not just downloads/.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/cm: set status correctly for rejects
Sean Hefty [Mon, 11 Feb 2008 23:17:30 +0000 (15:17 -0800)]
librdmacm/cm: set status correctly for rejects

The status is not being set for rejected connection requests.
Set it by moving common initialization outside of the switch.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm: release 1.0.6 ofed_1_3 v1.0.6
Sean Hefty [Mon, 21 Jan 2008 18:21:47 +0000 (10:21 -0800)]
librdmacm: release 1.0.6

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agoUpdate %install secion of librdmacm spec file
Roland Dreier [Mon, 21 Jan 2008 18:21:44 +0000 (10:21 -0800)]
Update %install secion of librdmacm spec file

Change from using the %makeinstall macro to using "make install"
directly.  The page <http://fedoraproject.org/wiki/Packaging/Guidelines>
has this to say:

  "Fedora's RPM includes a %makeinstall macro but it must NOT be used
   when make install DESTDIR=%{buildroot} works. %makeinstall is a
   kludge....
   It is error-prone and can have unexpected effects....
   It can trigger unnecessary and wrong rebuilds....
   ....it can cause broken *.la files to be installed....
   Instead, Fedora packages should use: make DESTDIR=%{buildroot}
   install or make DESTDIR=$RPM_BUILD_ROOT install"

The librdmacm package uses automake, which means that the "make
DESTDIR=... install" method works fine, so we should use it.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agoUpdated License: field in librdmacm spec file
Roland Dreier [Mon, 21 Jan 2008 18:21:41 +0000 (10:21 -0800)]
Updated License: field in librdmacm spec file

Update License: field to match the exact format given in
http://fedoraproject.org/wiki/Packaging/LicensingGuidelines
for a package available under a choice of GPL or BSD license.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/cm: override default responder_resources with user value
Sean Hefty [Thu, 3 Jan 2008 23:36:14 +0000 (15:36 -0800)]
librdmacm/cm: override default responder_resources with user value

By default, the responder_resources parameter is set to that received
in a connection request.  The passive side may override this value
when accepting the connection.  Use the value provided by the passive
side when transitioning the QP to RTR state, rather than the value
given in the connect request.  Without this change, the RTR transition
may fail if the passive side supports fewer responder_resources than
that in the request.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm: release 1.0.5 v1.0.5
Sean Hefty [Wed, 2 Jan 2008 20:16:42 +0000 (12:16 -0800)]
librdmacm: release 1.0.5

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/man: more updates to man pages
Sean Hefty [Wed, 2 Jan 2008 20:16:33 +0000 (12:16 -0800)]
librdmacm/man: more updates to man pages

Updates to rdma_disconnect, rdma_join_multicast, and return codes.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm: document retry count limits
Sean Hefty [Thu, 29 Nov 2007 18:04:33 +0000 (10:04 -0800)]
librdmacm: document retry count limits

Clarify retry count and RNR retry count limits.  These are 3-bit values.

Response based on customer feedback.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/man: fix-up man pages
Sean Hefty [Tue, 6 Nov 2007 19:07:55 +0000 (11:07 -0800)]
librdmacm/man: fix-up man pages

Fix a couple of errors in the man page documentation and add
infiniband specific text about QP configuration settings.  This
is in response to user questions about various settings based
on feedback from Or.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm: release 1.0.4 v1.0.4
Sean Hefty [Thu, 18 Oct 2007 17:22:37 +0000 (10:22 -0700)]
librdmacm: release 1.0.4

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/cma: provide wrapper functions to extract src/dst addresses
Sean Hefty [Thu, 18 Oct 2007 17:18:47 +0000 (10:18 -0700)]
librdmacm/cma: provide wrapper functions to extract src/dst addresses

Provide wrapper functions to retrieve the source and destination
addresses.  This is based on feedback from Doug Ledford.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/cma: provide sanity checks for max outstanding rdma ops
Sean Hefty [Tue, 16 Oct 2007 21:59:21 +0000 (14:59 -0700)]
librdmacm/cma: provide sanity checks for max outstanding rdma ops

Ensure that the responder_resources and initiator_depth values
provided by the user are supported by the local hardware.  This
traps errors sooner during connection establishment (when calling
rdma_connect), rather than waiting until the modify QP fails
(after calling rdma_accept).

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/man: update man pages to clarify connection request params
Sean Hefty [Tue, 16 Oct 2007 16:47:22 +0000 (09:47 -0700)]
librdmacm/man: update man pages to clarify connection request params

Document connection requests parameters in rdma_connect(),
rdma_accept(), and rdma_get_cm_event(), specifically regarding
initiator_depth and responder_resources.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm: prepare new release v1.0.3
Sean Hefty [Mon, 1 Oct 2007 17:37:35 +0000 (10:37 -0700)]
librdmacm: prepare new release

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/man: update documentation regarding private_data_len
Sean Hefty [Mon, 24 Sep 2007 21:32:46 +0000 (14:32 -0700)]
librdmacm/man: update documentation regarding private_data_len

The private_data_len on the receive side is the size of the data
buffer, and not the size of the private data sent by the remote side.
For IB, the size of the sent data is not known, so private_data_len
is the size of the private data field carried in the CM message.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/examples: Add option to set TOS.
Sean Hefty [Mon, 10 Sep 2007 19:20:36 +0000 (12:20 -0700)]
librdmacm/examples: Add option to set TOS.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agordma/cm: Add ability to specify the type of service
Sean Hefty [Fri, 7 Sep 2007 18:20:50 +0000 (11:20 -0700)]
rdma/cm: Add ability to specify the type of service

Add rdma_set_option, similar to setsockopt, to allow the user to
specify the quality of service provided by a connection.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/rping: Persistent rping server.
Steve Wise [Fri, 7 Sep 2007 18:12:57 +0000 (11:12 -0700)]
librdmacm/rping: Persistent rping server.

Support a rping server mode where the server handles many incoming
connections by creating threads to process each new rping session.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
16 years agolibrdmacm: add valgrind support.
Sean Hefty [Thu, 6 Sep 2007 16:54:03 +0000 (09:54 -0700)]
librdmacm: add valgrind support.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm/build: minor tweak to build settings for consistency
Sean Hefty [Wed, 5 Sep 2007 18:15:35 +0000 (11:15 -0700)]
librdmacm/build: minor tweak to build settings for consistency

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
16 years agolibrdmacm: Fix memory leak reported by valgrind
Dotan Barak [Tue, 14 Aug 2007 16:04:05 +0000 (09:04 -0700)]
librdmacm: Fix memory leak reported by valgrind

Fix memory leak reported by valgrind:
==6239== 16 bytes in 1 blocks are definitely lost in loss record 2 of 10
==6239==    at 0x4A04CBF: calloc (vg_replace_malloc.c:279)
==6239==    by 0x4E386C4: ibv_get_device_list@@IBVERBS_1.1 (device.c:65)
==6239==    by 0x4C2D868: ucma_init (cma.c:221)
==6239==    by 0x4C2F831: rdma_create_event_channel (cma.c:299)
==6239==    by 0x4018A5: main (cmatose.c:650)

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>