]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Accelio Autotools glue.
authorMatt Benjamin <matt@linuxbox.com>
Mon, 21 Apr 2014 18:47:09 +0000 (14:47 -0400)
committerMatt Benjamin <matt@cohortfs.com>
Wed, 14 Jan 2015 21:43:43 +0000 (16:43 -0500)
Add Accelio to build process with --enable-xio is provided.

Signed-off-by: Matt Benjamin <matt@cohortfs.com>
README.xio [new file with mode: 0644]
configure.ac
src/common/Makefile.am
src/msg/Makefile.am
src/test/messenger/Makefile.am

diff --git a/README.xio b/README.xio
new file mode 100644 (file)
index 0000000..e01d575
--- /dev/null
@@ -0,0 +1,14 @@
+
+
+Building
+
+The Accelio XioMessenger is built conditionally only, when --enable-xio is
+provided to configure.
+
+Accelio depends on OpenFabrics verbs development headers/libraries.
+
+If either the Accelio or OFED development environments are in non-standard locations,
+include and library paths must be added to both CFLAGS and CXXFLAGS, in the Autotools
+build as of 1/1/2015.
+
+-Matt
index 1b09d115f8170045d4ec2adfa6d3997896164319..782e5bb705873d2ed540447ba44aebd1b0df860e 100644 (file)
@@ -521,6 +521,27 @@ if test "x$enable_cephfs_java" = "xyes"; then
 fi
 AM_CONDITIONAL(HAVE_JUNIT4, [test "$have_junit4" = "1"])
 
+#
+# Accelio and OFED
+#
+AC_ARG_ENABLE(xio,
+    [AC_HELP_STRING([--enable-xio], [build Ceph Accelio transport])],
+    [], [enable_xio=no])
+
+AM_CONDITIONAL(ENABLE_XIO, [test "x$enable_xio" = "xyes"])
+
+if test "x$enable_xio" = x"yes"; then
+   AC_CHECK_HEADER([libxio.h], [], AC_MSG_ERROR([Cannot find header 'libxio.h'.]))
+   AC_CHECK_LIB([xio], [xio_init], [], AC_MSG_FAILURE([Accelio not found]))
+   AC_CHECK_LIB([ibverbs], [ibv_query_device], [], AC_MSG_FAILURE([OFED not found]))
+   AC_CHECK_LIB([rdmacm], [rdma_connect], [], AC_MSG_FAILURE([OFED not found]))
+
+   AC_DEFINE([HAVE_XIO], [1], [Accelio conditional compilation])
+
+   XIO_LIBS="-lxio -libverbs -lrdmacm"
+   AC_SUBST(XIO_LIBS)
+fi
+
 #
 # FreeBSD has it in base.
 #
@@ -727,6 +748,11 @@ AC_CHECK_LIB(boost_system-mt, main, [],
     [AC_CHECK_LIB(boost_system, main, [],
         AC_MSG_NOTICE(["Boost system library not found."]))])
 
+# Also regex, used in address_helper
+AC_CHECK_LIB(boost_regex, main, [],
+    [AC_CHECK_LIB(boost_regex, main, [],
+        AC_MSG_NOTICE(["Boost regex library not found."]))])
+
 # Find the right boost_thread library.
 BOOST_THREAD_LIBS=""
 saved_LIBS="${LIBS}"
index 28881945357c18cd3f87f385ee6cef564d5f91f5..1223ccf1ae035aaccb0097a5966d5aa97da75f09 100644 (file)
@@ -61,6 +61,7 @@ libcommon_internal_la_SOURCES = \
        common/ceph_json.cc \
        common/ipaddr.cc \
        common/pick_address.cc \
+       common/address_helper.cc \
        common/util.cc \
        common/TextTable.cc \
        common/ceph_fs.cc \
index 5a0001d09f9acb0f1b9f3bcafa9d58036bb782ac..3d6ee10337c276155b9f45038ba0d8d8f763f4fa 100644 (file)
@@ -61,4 +61,25 @@ if FREEBSD
 libmsg_la_SOURCES += msg/async/EventKqueue.h
 endif
 
+if ENABLE_XIO
+libmsg_la_SOURCES += \
+       msg/xio/QueueStrategy.cc \
+       msg/xio/XioConnection.cc \
+       msg/xio/XioMessenger.cc \
+       msg/xio/XioMsg.cc \
+       msg/xio/XioPortal.cc \
+       msg/xio/XioPool.cc
+
+noinst_HEADERS += \
+       msg/xio/DispatchStrategy.h \
+       msg/xio/FastStrategy.h \
+       msg/xio/QueueStrategy.h \
+       msg/xio/XioConnection.h \
+       msg/xio/XioInSeq.h \
+       msg/xio/XioMessenger.h \
+       msg/xio/XioMsg.h \
+       msg/xio/XioPool.h \
+       msg/xio/XioPortal.h
+endif
+
 noinst_LTLIBRARIES += libmsg.la
index 7f7251a16b6bceae659649bbf324e2d4a20d3a61..27a4b68dc61a16feb807386ee796aba7f5af394a 100644 (file)
@@ -3,60 +3,64 @@ simple_server_SOURCES = \
        test/messenger/simple_server.cc \
        test/messenger/simple_dispatcher.cc
 
-simple_server_CFLAGS = ${AM_CFLAGS}
-simple_server_CXXFLAGS = ${AM_CXXFLAGS}
+simple_server_CFLAGS = $(AM_CFLAGS)
+simple_server_CXXFLAGS = $(AM_CXXFLAGS)
 
 simple_server_LDADD = \
-       $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON) $(EXTRALIBS)
+       $(LIBOS) $(LIBCOMMON) $(CEPH_GLOBAL) $(PTHREAD_LIBS) $(EXTRALIBS)
 
 if LINUX
-       simple_server_LDADD += -ldl
+simple_server_LDADD += -ldl
 endif
 
 simple_client_SOURCES = \
        test/messenger/simple_client.cc \
        test/messenger/simple_dispatcher.cc
 
-simple_client_CFLAGS = ${AM_CFLAGS}
-simple_client_CXXFLAGS = ${AM_CXXFLAGS}
+simple_client_CFLAGS = $(AM_CFLAGS)
+simple_client_CXXFLAGS = $(AM_CXXFLAGS)
 
 simple_client_LDADD = \
-       $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON) $(EXTRALIBS)
+       $(LIBOS) $(LIBCOMMON) $(CEPH_GLOBAL) $(PTHREAD_LIBS) $(EXTRALIBS)
 
 if LINUX
-       simple_client_LDADD += -ldl
+simple_client_LDADD += -ldl
 endif
 
+noinst_PROGRAMS += \
+       simple_server \
+       simple_client
+
+if ENABLE_XIO
 xio_server_SOURCES = \
        test/messenger/xio_server.cc \
        test/messenger/xio_dispatcher.cc
 
-xio_server_CFLAGS = ${AM_CFLAGS}
-xio_server_CXXFLAGS = ${AM_CXXFLAGS}
+xio_server_CFLAGS = $(AM_CFLAGS)
+xio_server_CXXFLAGS = $(AM_CXXFLAGS)
 
 xio_server_LDADD = \
-       $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON) $(EXTRALIBS)
+       $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON) $(PTHREAD_LIBS) $(EXTRALIBS)
 
 if LINUX
-       xio_server_LDADD += -ldl
+xio_server_LDADD += -ldl
 endif
 
 xio_client_SOURCES = \
        test/messenger/xio_client.cc \
        test/messenger/xio_dispatcher.cc
 
-xio_client_CFLAGS = ${AM_CFLAGS}
-xio_client_CXXFLAGS = ${AM_CXXFLAGS}
+xio_client_CFLAGS = $(AM_CFLAGS)
+xio_client_CXXFLAGS = $(AM_CXXFLAGS)
 
 xio_client_LDADD = \
-       $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON) $(EXTRALIBS)
+       $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON) $(PTHREAD_LIBS) $(EXTRALIBS)
 
 if LINUX
-       xio_client_LDADD += -ldl
+xio_client_LDADD += -ldl
 endif
 
 noinst_PROGRAMS += \
-       simple_server \
-       simple_client \
        xio_server \
        xio_client
+endif