History log of /include/rdma/rdma_cm.h
Revision Date Author Comments
cf53936f229d81131fef475919f163ce566a205f 29-May-2013 Sean Hefty <sean.hefty@intel.com> RDMA/cma: Export cma_get_service_id()

Allow the rdma_ucm to query the IB service ID formed or allocated by
the rdma_cm by exporting the cma_get_service_id() functionality.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
5c438135adf90b33cb00e5351becf1e557bbdd9d 29-May-2013 Sean Hefty <sean.hefty@intel.com> RDMA/cma: Set qkey for AF_IB

Allow the user to specify the qkey when using AF_IB. The qkey is
added to struct rdma_ucm_conn_param in place of a reserved field, but
for backwards compatability, is only accessed if the associated
rdma_cm_id is using AF_IB.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
58afdcb7382234ebd780e43b17edde92a5853cca 29-May-2013 Sean Hefty <sean.hefty@intel.com> RDMA/cma: Update port reservation to support AF_IB

The AF_IB uses a 64-bit service id (SID), which the user can control
through the use of a mask. The rdma_cm will assign values to the
unmasked portions of the SID based on the selected port space and port
number.

Because the IB spec divides the SID range into several regions, a
SID/mask combination may fall into one of the existing port space
ranges as defined by the RDMA CM IP Annex. Map the AF_IB SID to the
correct RDMA port space.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
68602120e496a31d8e3b36d0bfc7d9d2456fb05c 14-Jun-2012 Sean Hefty <sean.hefty@intel.com> RDMA/cma: Allow user to restrict listens to bound address family

Provide an option for the user to specify that listens should only
accept connections where the incoming address family matches that of
the locally bound address. This is used to support the equivalent of
IPV6_V6ONLY socket option, which allows an app to only accept
connection requests directed to IPv6 addresses.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2d2e94152928209de13dea0535242c0e457bdcbb 29-May-2011 Sean Hefty <sean.hefty@intel.com> RDMA/cm: Define new RDMA port space specific to IB

Add RDMA_PS_IB. XRC QP types will use the IB port space when operating
over the RDMA CM. For the 'IP protocol' field value, we select 0x3F,
which is listed as being for 'any local network'.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
b26f9b9949013fec31b23c426fc463164ae08891 01-Apr-2010 Sean Hefty <sean.hefty@intel.com> RDMA/cma: Pass QP type into rdma_create_id()

The RDMA CM currently infers the QP type from the port space selected
by the user. In the future (eg with RDMA_PS_IB or XRC), there may not
be a 1-1 correspondence between port space and QP type. For netlink
export of RDMA CM state, we want to export the QP type to userspace,
so it is cleaner to explicitly associate a QP type to an ID.

Modify rdma_create_id() to allow the user to specify the QP type, and
use it to make our selections of datagram versus connected mode.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
550e5ca77e96989c5e19f60e017205b2bcc615a5 20-May-2011 Nir Muchtar <nirm@voltaire.com> RDMA/cma: Export enum cma_state in <rdma/rdma_cm.h>

Move cma.c's internal definition of enum cma_state to enum rdma_cm_state
in an exported header so that it can be exported via RDMA netlink.

Signed-off-by: Nir Muchtar <nirm@voltaire.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
a9bb79128aa659f97b774b97c9bb1bdc74444595 10-May-2011 Hefty, Sean <sean.hefty@intel.com> RDMA/cma: Add an ID_REUSEADDR option

Lustre requires that clients bind to a privileged port number before
connecting to a remote server. On larger clusters (typically more
than about 1000 nodes), the number of privileged ports is exhausted,
resulting in lustre being unusable.

To handle this, we add support for reusable addresses to the rdma_cm.
This mimics the behavior of the socket option SO_REUSEADDR. A user
may set an rdma_cm_id to reuse an address before calling
rdma_bind_addr() (explicitly or implicitly). If set, other
rdma_cm_id's may be bound to the same address, provided that they all
have reuse enabled, and there are no active listens.

If rdma_listen() is called on an rdma_cm_id that has reuse enabled, it
will only succeed if there are no other id's bound to that same
address. The reuse option is exported to user space. The behavior of
the kernel reuse implementation was verified against that given by
sockets.

This patch is derived from a path by Ira Weiny <weiny2@llnl.gov>

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
cf4f7e8c47b3298cf90239bad5d86fdcad0c89eb 12-Feb-2010 Sean Hefty <sean.hefty@intel.com> RDMA/cm: Remove unused definition of RDMA_PS_SCTP

The defined SCTP number is incorrect (0x83, rather than 0x84), and
since it is not used anywhere, simply remove the definition.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
3f44675439b136d51179d31eb5a498383cb38624 04-Aug-2008 Roland Dreier <rolandd@cisco.com> RDMA/cma: Remove padding arrays by using struct sockaddr_storage

There are a few places where the RDMA CM code handles IPv6 by doing

struct sockaddr addr;
u8 pad[sizeof(struct sockaddr_in6) -
sizeof(struct sockaddr)];

This is fragile and ugly; handle this in a better way with just

struct sockaddr_storage addr;

[ Also roll in patch from Aleksey Senin <alekseys@voltaire.com> to
switch to struct sockaddr_storage and get rid of padding arrays in
struct rdma_addr. ]

Signed-off-by: Roland Dreier <rolandd@cisco.com>
38ca83a588662f0af684ba2567dd910a564268ab 22-Jul-2008 Amir Vadai <amirv@mellanox.co.il> RDMA/cma: Add RDMA_CM_EVENT_TIMEWAIT_EXIT event

Consumers that want to re-use their QPs in new connections need to
know when the QP has exited the timewait state. Report the timewait
event through the rdma_cm.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
dd5bdff83b19d9174126e0398b47117c3a80e22d 22-Jul-2008 Or Gerlitz <ogerlitz@voltaire.com> RDMA/cma: Add RDMA_CM_EVENT_ADDR_CHANGE event

Add an RDMA_CM_EVENT_ADDR_CHANGE event can be used by rdma-cm
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.

Use the netevent notification for sensing that a change has happened
in the IP stack, then scan the rdma-cm ID list to see if there is an
ID that is "misaligned" with respect to the IP stack, and deliver
RDMA_CM_EVENT_ADDR_CHANGE for this ID. The consumer can act on the
event or just ignore it.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
4deccd6d95f1f1536dad3c842e39c1ace577329d 15-Jul-2008 Dotan Barak <dotanba@gmail.com> RDMA: Improve include file coding style

Remove subversion $Id lines and improve readability by fixing other
coding style problems pointed out by checkpatch.pl.

Signed-off-by: Dotan Barak <dotanba@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
a9474917099e007c0f51d5474394b5890111614f 15-Jul-2008 Sean Hefty <sean.hefty@intel.com> RDMA: Fix license text

The license text for several files references a third software license
that was inadvertently copied in. Update the license to what was
intended. This update was based on a request from HP.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
a81c994d5eef87ed77cb30d8343d6be296528b3f 09-Aug-2007 Sean Hefty <sean.hefty@intel.com> RDMA/cma: Add ability to specify type of service

Provide support to specify a type of service for a communication
identifier. A new function call is used when dealing with IPv4
addresses. For IPv6 addresses, the ToS is specified through the
traffic class field in the sockaddr_in6 structure.

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

[ The comments Eitan Zahavi and myself have made over the v1 post at
<http://lists.openfabrics.org/pipermail/general/2007-August/039247.html>
were fully addressed. ]

Reviewed-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
c8f6a362bf3eb28ade6027b49bb160a336dd51c0 16-Feb-2007 Sean Hefty <sean.hefty@intel.com> RDMA/cma: Add multicast communication support

Extend rdma_cm to support multicast communication. Multicast support
is added to the existing RDMA_PS_UDP port space, as well as a new
RDMA_PS_IPOIB port space. The latter port space allows joining the
multicast groups used by IPoIB, which enables offloading IPoIB traffic
to a separate QP. The port space determines the signature used in the
MGID when joining the group. The newly added RDMA_PS_IPOIB also
allows for unicast operations, similar to RDMA_PS_UDP.

Supporting the RDMA_PS_IPOIB requires changing how UD QPs are initialized,
since we can no longer assume that the qkey is constant. This requires
saving the Q_Key to use when attaching to a device, so that it is
available when creating the QP. The Q_Key information is exported to
the user through the existing rdma_init_qp_attr() interface.

Multicast support is also exported to userspace through the rdma_ucm.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
628e5f6d39d5a6be96c1272a6709f2dd3ec8b7ce 01-Dec-2006 Sean Hefty <sean.hefty@intel.com> RDMA/cma: Add support for RDMA_PS_UDP

Allow the use of UD QPs through the rdma_cm, in order to provide
address translation services for resolving IB addresses for datagram
messages using SIDR.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
0fe313b000b6a699afbbb59ef9c47a2b22146f1e 01-Dec-2006 Sean Hefty <sean.hefty@intel.com> RDMA/cma: Allow early transition to RTS to handle lost CM messages

During connection establishment, the passive side of a connection can
receive messages from the active side before the connection event has
been delivered to the user. Allow the passive side to send messages
in response to received data before the event is delivered. To handle
the case where the connection messages are lost, a new rdma_notify()
function is added that users may invoke to force a connection into the
established state.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
a1b1b61f80aba49f1e0f32b0e4b1c35be91c57fa 01-Dec-2006 Sean Hefty <sean.hefty@intel.com> RDMA/cma: Report connect info with connect events

Connection information was never given to the recipient of a
connection request or reply message. Only the event was delivered.
Report the connection data with the event to allows user to
reject the connection based on the requested parameters, or adjust
their resources to match the request.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
9b2e9c0c241e532d923fff23d9a7c0bd31bd96b1 01-Dec-2006 Sean Hefty <sean.hefty@intel.com> RDMA/cma: Remove unneeded qp_type parameter from rdma_cm

The qp_type parameter into the rdma_cm is unneeded, and can be
misleading. The QP type should be determined from the port space.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
951f7fc1372da3d826b1d975b3cc5e3db92af5d0 23-Sep-2006 Or Gerlitz <ogerlitz@voltaire.com> RDMA/cma: Document rdma_accept() error handling

Document the reject sending and modifying QP to error done in rdma_accept().

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
07eeec0627e93a1a753c4df004a97a4d0a7b9ceb 12-Sep-2006 Or Gerlitz <ogerlitz@voltaire.com> RDMA/cma: Document rdma_destroy_id() function

Clarify that rdma_destroy_id cancels outstanding asynchronous operations on the
Associated id.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
e51060f08a61965c4dd91516d82fe90617152590 18-Jun-2006 Sean Hefty <sean.hefty@intel.com> IB: IP address based RDMA connection manager

Kernel connection management agent over InfiniBand that connects based
on IP addresses. The agent defines a generic RDMA connection
abstraction to support clients wanting to connect over different RDMA
devices.

The agent also handles RDMA device hotplug events on behalf of clients.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>