Skip to content

Commit d2efded

Browse files
committed
r4019: Add support for userspace RDMA connection management abstraction (CMA).
- Adds common user/kernel data structures and copy routines in ib_uverbs and libibverbs. - Update ib_ucm and libibcm to use common structures and copy routines. - Add new kernel module, rdma_ucm, to support userspace CMA. - Add userspace CMA library, librdmacm. - Add userspace CMA test program. - Update kernel CMA to support userspace CMA library. - Add support for users to transition QP states. - Add backlog parameter to rdma_listen API. Signed-off-by: Sean Hefty <[email protected]>
0 parents  commit d2efded

15 files changed

+2435
-0
lines changed

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Sean Hefty <[email protected]>

COPYING

+378
Large diffs are not rendered by default.

ChangeLog

Whitespace-only changes.

INSTALL

Whitespace-only changes.

Makefile.am

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# $Id: Makefile.am 3373 2005-09-12 16:34:20Z roland $
2+
INCLUDES = -I$(srcdir)/include
3+
4+
AM_CFLAGS = -g -Wall -D_GNU_SOURCE
5+
6+
rdmacmlibdir = $(libdir)
7+
8+
rdmacmlib_LTLIBRARIES = src/librdmacm.la
9+
10+
src_rdmacm_la_CFLAGS = -g -Wall -D_GNU_SOURCE
11+
12+
if HAVE_LD_VERSION_SCRIPT
13+
rdmacm_version_script = -Wl,--version-script=$(srcdir)/src/librdmacm.map
14+
else
15+
rdmacm_version_script =
16+
endif
17+
18+
src_librdmacm_la_SOURCES = src/cma.c
19+
src_librdmacm_la_LDFLAGS = -avoid-version $(rdmacm_version_script)
20+
21+
bin_PROGRAMS = examples/ucmatose
22+
examples_ucmatose_SOURCES = examples/cmatose.c
23+
examples_ucmatose_LDADD = $(top_builddir)/src/librdmacm.la
24+
25+
librdmacmincludedir = $(includedir)/rdma
26+
27+
librdmacminclude_HEADERS = include/rdma/rdma_cma_abi.h \
28+
include/rdma/rdma_cma.h
29+
30+
EXTRA_DIST = include/rdma/rdma_cma_abi.h \
31+
include/rdma/rdma_cma.h \
32+
src/librdmacm.map \
33+
librdmacm.spec.in
34+
35+
dist-hook: librdmacm.spec
36+
cp librdmacm.spec $(distdir)

NEWS

Whitespace-only changes.

README

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
This README is for userspace RDMA cm library.
2+
3+
Building
4+
5+
To make this directory, run:
6+
./autogen.sh && ./configure && make && make install
7+
8+
Typically the autogen and configure steps only need be done the first
9+
time unless configure.in or Makefile.am changes.
10+
11+
Libraries are installed by default at /usr/local/lib.
12+
13+
Device files
14+
15+
The userspace CMA uses a single device file regardless of the number
16+
of adapters or ports present.
17+
18+
To create the appropriate character device file automatically with
19+
udev, a rule like
20+
21+
KERNEL="ucma", NAME="infiniband/%k", MODE="0666"
22+
23+
can be used. This will create the device node named
24+
25+
/dev/infiniband/ucma
26+
27+
or you can create it manually
28+
29+
mknod /dev/infiniband/ucma c 231 255

autogen.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#! /bin/sh
2+
3+
set -x
4+
aclocal -I config
5+
libtoolize --force --copy
6+
autoheader
7+
automake --foreign --add-missing --copy
8+
autoconf

configure.in

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
dnl Process this file with autoconf to produce a configure script.
2+
3+
AC_PREREQ(2.57)
4+
AC_INIT(librdmacm, 0.9.0, [email protected])
5+
AC_CONFIG_SRCDIR([src/cma.c])
6+
AC_CONFIG_AUX_DIR(config)
7+
AM_CONFIG_HEADER(config.h)
8+
AM_INIT_AUTOMAKE(librdmacm, 0.9.0)
9+
AC_DISABLE_STATIC
10+
AM_PROG_LIBTOOL
11+
12+
AC_ARG_ENABLE(libcheck, [ --disable-libcheck do not test for presence of ib libraries],
13+
[ if test x$enableval = xno ; then
14+
disable_libcheck=yes
15+
fi
16+
])
17+
18+
dnl Checks for programs
19+
AC_PROG_CC
20+
21+
dnl Checks for typedefs, structures, and compiler characteristics.
22+
AC_C_CONST
23+
AC_CHECK_SIZEOF(long)
24+
25+
dnl Checks for libraries
26+
if test "$disable_libcheck" != "yes"
27+
then
28+
AC_CHECK_LIB(ibverbs, ibv_get_devices, [],
29+
AC_MSG_ERROR([ibv_get_devices() not found. librdmacm requires libibverbs.]))
30+
fi
31+
32+
dnl Checks for header files.
33+
if test "$disable_libcheck" != "yes"
34+
then
35+
AC_CHECK_HEADER(infiniband/verbs.h, [],
36+
AC_MSG_ERROR([<infiniband/verbs.h> not found. Is libibverbs installed?]))
37+
fi
38+
AC_HEADER_STDC
39+
40+
AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
41+
if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then
42+
ac_cv_version_script=yes
43+
else
44+
ac_cv_version_script=no
45+
fi)
46+
47+
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes")
48+
49+
AC_CONFIG_FILES([Makefile librdmacm.spec])
50+
AC_OUTPUT

0 commit comments

Comments
 (0)