Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 21 additions & 28 deletions config/m4/ib.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,67 +5,60 @@
# $HEADER$
#


#
# Select IB transports
#
with_ib=no


#
# Check basic IB support: User wanted at least one IB transport, and we found
# verbs header file and library.
#
AS_IF([test "x$with_ib" != xno],
[AC_CHECK_HEADER([infiniband/verbs.h], [],
[AC_MSG_WARN([ibverbs header files not found]);with_ib=no])
save_LDFLAGS="$LDFLAGS"
AC_CHECK_LIB([ibverbs], [ibv_get_device_list],
[AC_SUBST(IBVERBS_LDFLAGS, [-libverbs])],
[AC_MSG_WARN([libibverbs not found]);with_ib=no])
LDFLAGS="$save_LDFLAGS"
])
AS_IF([test "x$with_ib" != xno],
[AC_DEFINE([HAVE_IB], 1, [IB support])])
#
# RC Support
#
AC_ARG_WITH([rc],
[AC_HELP_STRING([--with-rc], [Compile with IB Reliable Connection support])],
[],
[with_rc=yes])
AS_IF([test "x$with_rc" != xno],
AS_IF([test "x$with_rc" != xno -a "x$with_ib" != xno],
[AC_DEFINE([HAVE_TL_RC], 1, [RC transport support])
with_ib=yes
transports="${transports},rc"])


AC_ARG_WITH([ud],
[AC_HELP_STRING([--with-ud], [Compile with IB Unreliable Datagram support])],
[],
[with_ud=yes;with_ib=yes])
AS_IF([test "x$with_ud" != xno],
[with_ud=yes])
AS_IF([test "x$with_ud" != xno -a "x$with_ib" != xno],
[AC_DEFINE([HAVE_TL_UD], 1, [UD transport support])
with_ib=yes
transports="${transports},ud"])


AC_ARG_WITH([dc],
[AC_HELP_STRING([--with-dc], [Compile with IB Dynamic Connection support])],
[],
[with_dc=yes;with_ib=yes])
AS_IF([test "x$with_dc" != xno],
[with_dc=yes])
AS_IF([test "x$with_dc" != xno -a "x$with_ib" != xno],
[AC_CHECK_DECLS(IBV_EXP_QPT_DC_INI, [], [with_dc=no], [[#include <infiniband/verbs.h>]])
AC_CHECK_MEMBERS([struct ibv_exp_dct_init_attr.inline_size], [] , [with_dc=no], [[#include <infiniband/verbs.h>]])
])
AS_IF([test "x$with_dc" != xno],
AS_IF([test "x$with_dc" != xno -a "x$with_ib" != xno],
[AC_DEFINE([HAVE_TL_DC], 1, [DC transport support])
with_ib=yes
transports="${transports},dc"])


#
# Check basic IB support: User wanted at least one IB transport, and we found
# verbs header file and library.
#
AS_IF([test "x$with_ib" != xno],
[AC_CHECK_HEADER([infiniband/verbs.h], [],
[AC_MSG_WARN([ibverbs header files not found]);with_ib=no])
save_LDFLAGS="$LDFLAGS"
AC_CHECK_LIB([ibverbs], [ibv_get_device_list],
[AC_SUBST(IBVERBS_LDFLAGS, [-libverbs])],
[AC_MSG_WARN([libibverbs not found]);with_ib=no])
LDFLAGS="$save_LDFLAGS"
])
AS_IF([test "x$with_ib" != xno],
[AC_DEFINE([HAVE_IB], 1, [IB support])])


#
# Check for experimental verbs support
#
Expand Down
18 changes: 5 additions & 13 deletions src/uct/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ libuct_la_SOURCES += \
ib/base/ib_device.c \
ib/base/ib_iface.c

if HAVE_MLX5_HW
noinst_HEADERS += \
ib/mlx5/ib_mlx5.h

libuct_la_SOURCES += \
ib/mlx5/ib_mlx5.c
endif

endif

if HAVE_TL_RC
noinst_HEADERS += \
ib/rc/rc_ep.h \
Expand All @@ -54,11 +44,13 @@ noinst_HEADERS += \
libuct_la_SOURCES += \
ib/rc/rc_ep.c \
ib/rc/rc_iface.c
endif

if HAVE_MLX5_HW
noinst_HEADERS += \
ib/mlx5/ib_mlx5.h

libuct_la_SOURCES += \
ib/rc/rc_mlx5.c \
ib/rc/rc_mlx5.h
ib/mlx5/ib_mlx5.c
endif

endif