Skip to content

Commit

Permalink
Merge branch 'rdma-core-dc-support'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Akhmedzhanov committed May 5, 2020
2 parents 5b13f97 + 54b2598 commit 094b630
Show file tree
Hide file tree
Showing 21 changed files with 1,067 additions and 2,839 deletions.
2 changes: 0 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ endif

if IS_FREEBSD
LIBMLX4= -lmlx4
LIBMLX5= -lmlx5
else
LIBMLX4=
LIBMLX5=
endif

ib_send_bw_SOURCES = src/send_bw.c src/multicast_resources.c src/multicast_resources.h
Expand Down
195 changes: 33 additions & 162 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# SOFTWARE.
dnl Process this file with autoconf to produce a configure script.

AC_INIT([perftest],[5.62],[[email protected]])
AC_INIT([perftest],[5.91],[[email protected]])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
Expand All @@ -42,23 +42,14 @@ AC_SUBST(MINOR_VERSION)
AC_ARG_VAR(CUDA_H_PATH, help-string)
AC_ARG_VAR(RANLIB, ranlib tool)

AC_ARG_ENABLE([verbs_exp],
[AS_HELP_STRING([--disable-verbs_exp],
[Disable Verbs Experimental])],
[], [enable_verbs_exp=yes])

AC_ARG_ENABLE([ibv_wr_api],
[AS_HELP_STRING([--enable-ibv_wr_api],
[Enable new post send API])],
[enable_ibv_wr_api=yes], [enable_ibv_wr_api=no])

AS_IF([test "x$enable_verbs_exp" = "xyes"],
[USE_VERBS_EXP=yes],
[USE_VERBS_EXP=no])
[AS_HELP_STRING([--disable-ibv_wr_api],
[Disable new post send API])],
[disable_ibv_wr_api=yes], [disable_ibv_wr_api=no])

AS_IF([test "x$enable_ibv_wr_api" = "xyes"],
[USE_IBV_WR_API=yes],
[USE_IBV_WR_API=no])
AS_IF([test "x$disable_ibv_wr_api" = "xyes"],
[USE_IBV_WR_API=no],
[USE_IBV_WR_API=yes])

AC_PREFIX_DEFAULT("/usr")

Expand All @@ -75,14 +66,6 @@ AC_CHECK_LIB([rdmacm], [rdma_create_event_channel], [], AC_MSG_ERROR([librdmacm-
AC_CHECK_LIB([ibumad], [umad_init], [LIBUMAD=-libumad], AC_MSG_ERROR([libibumad not found]))
AC_CHECK_LIB([m], [log], [LIBMATH=-lm], AC_MSG_ERROR([libm not found]))

AC_TRY_LINK([#include <infiniband/verbs.h>],
[struct ibv_exp_flow *t = ibv_exp_create_flow(NULL,NULL);],[HAVE_RAW_ETH_EXP=yes], [HAVE_RAW_ETH_EXP=no])

AM_CONDITIONAL([HAVE_RAW_ETH_EXP],[test "x$HAVE_RAW_ETH_EXP" = "xyes"])
if test $HAVE_RAW_ETH_EXP = yes; then
AC_DEFINE([HAVE_RAW_ETH_EXP], [1], [Enable RAW_ETH_TEST_EXP])
fi

AC_TRY_LINK([#include <infiniband/verbs.h>],
[struct ibv_flow *t = ibv_create_flow(NULL,NULL);],[HAVE_RAW_ETH_REG=yes], [HAVE_RAW_ETH_REG=no])

Expand All @@ -92,7 +75,7 @@ if test $HAVE_RAW_ETH_REG = yes; then
fi

AM_CONDITIONAL([HAVE_RAW_ETH],true)
if [test $HAVE_RAW_ETH_REG = yes] || [test $HAVE_RAW_ETH_EXP = yes]; then
if [test $HAVE_RAW_ETH_REG = yes]; then
AC_DEFINE([HAVE_RAW_ETH], [1], [Enable RAW_ETH_TEST])
else
AM_CONDITIONAL([HAVE_RAW_ETH],false)
Expand Down Expand Up @@ -129,6 +112,7 @@ AC_TRY_LINK([],
AM_CONDITIONAL([IS_FREEBSD],[test "x$IS_FREEBSD" = "xyes"])
if test $IS_FREEBSD = yes; then
AC_DEFINE([IS_FREEBSD], [1], [OS is FreeBSD])
LIBMLX5=-lmlx5
fi

AC_TRY_LINK([#include <infiniband/verbs.h>],
Expand All @@ -139,108 +123,47 @@ if test $HAVE_SCIF = yes; then
AC_DEFINE([HAVE_SCIF], [1], [Enable SCIF link Layer])
fi

AC_CHECK_HEADERS([infiniband/verbs_exp.h],[HAVE_VERBS_EXP=yes],[HAVE_VERBS_EXP=no],[#include <infiniband/verbs.h>])
AM_CONDITIONAL([HAVE_VERBS_EXP],[test "x$HAVE_VERBS_EXP" = "xyes"])
if [test $HAVE_VERBS_EXP = yes] && [test $USE_VERBS_EXP = yes]; then
AC_DEFINE([HAVE_VERBS_EXP], [1], [Have verbs_exp header])
else
HAVE_VERBS_EXP=no
fi

AC_TRY_LINK([
#include <infiniband/verbs.h>],
[int x = IBV_QP_INIT_ATTR_SEND_OPS_FLAGS;],[HAVE_IBV_WR_API=yes],[HAVE_IBV_WR_API=no])
AM_CONDITIONAL([HAVE_IBV_WR_API],[test "x$HAVE_IBV_WR_API" = "xyes"])
# TODO: Add appropriate check. Currently we consider that if rdma-core
# has new post send, it also has ibv_query_gid_type
if [test $HAVE_IBV_WR_API = yes]; then
AC_DEFINE([HAVE_GID_TYPE], [1], [Have a way to check gid type])
fi
if [test $HAVE_IBV_WR_API = yes] && [test $USE_IBV_WR_API = yes]; then
AC_DEFINE([HAVE_IBV_WR_API], [1], [Have new post send API support])
else
HAVE_IBV_WR_API=no
fi

AC_TRY_LINK([
#include <infiniband/verbs.h>
#include <infiniband/verbs_exp.h>],
[int x = IBV_EXP_DEVICE_ATTR_EXT_ATOMIC_ARGS;],[HAVE_MASKED_ATOMICS=yes], [HAVE_MASKED_ATOMICS=no])
AM_CONDITIONAL([HAVE_MASKED_ATOMICS],[test "x$HAVE_MASKED_ATOMICS" = "xyes"])
if [test $HAVE_MASKED_ATOMICS = yes] && [test $HAVE_VERBS_EXP = yes]; then
AC_DEFINE([HAVE_MASKED_ATOMICS], [1], [Have MASKED ATOMICS in verbs_exp header])
fi

AC_TRY_LINK([
#include <infiniband/verbs.h>
#include <infiniband/verbs_exp.h>],
[int x = IBV_EXP_DEVICE_ATTR_RSS_TBL_SZ;],[HAVE_RSS_EXP=yes], [HAVE_RSS_EXP=no])
AM_CONDITIONAL([HAVE_RSS_EXP],[test "x$HAVE_RSS_EXP" = "xyes"])
if [test $HAVE_RSS_EXP = yes] && [test $HAVE_VERBS_EXP = yes]; then
AC_DEFINE([HAVE_RSS_EXP], [1], [Have RSS in verbs_exp header])
fi

AC_TRY_LINK([
#include <infiniband/verbs.h>
#include <infiniband/verbs_exp.h>],
[int x = IBV_EXP_DCT_CREATE_FLAGS_MASK;],[HAVE_DC=yes], [HAVE_DC=no])
AM_CONDITIONAL([HAVE_DC],[test "x$HAVE_DC" = "xyes"])
if [test $HAVE_DC = yes] && [test $HAVE_VERBS_EXP = yes]; then
AC_DEFINE([HAVE_DC], [1], [Enable DC feature])
fi

AC_TRY_LINK([
#include <infiniband/verbs.h>
#include <infiniband/verbs_exp.h>],
[int x = IBV_EXP_INTF_GLOBAL;],[HAVE_ACCL_VERBS=yes], [HAVE_ACCL_VERBS=no])
AM_CONDITIONAL([HAVE_ACCL_VERBS],[test "x$HAVE_ACCL_VERBS" = "xyes"])
if [test $HAVE_ACCL_VERBS = yes] && [test $HAVE_VERBS_EXP = yes]; then
AC_DEFINE([HAVE_ACCL_VERBS], [1], [Enable Accelerated verbs feature])
fi
#include <infiniband/mlx5dv.h>],
[int x = MLX5DV_QP_INIT_ATTR_MASK_QP_CREATE_FLAGS;],[HAVE_MLX5DV=yes], [HAVE_MLX5DV=no])
AM_CONDITIONAL([HAVE_MLX5DV],[test "x$HAVE_MLX5DV" = "xyes"])

AC_TRY_LINK([
#include <infiniband/verbs.h>],
[int x = IBV_FLOW_SPEC_IPV6;],[HAVE_IPV6=yes], [HAVE_IPV6=no])
AM_CONDITIONAL([HAVE_IPV6],[test "x$HAVE_IPV6" = "xyes"])
if [test $HAVE_IPV6 = yes] && [test $HAVE_VERBS_EXP = no]; then
AC_DEFINE([HAVE_IPV6], [1], [Enable IPv6 Flow Specification])
fi

AC_TRY_LINK([
#include <infiniband/verbs.h>
#include <infiniband/verbs_exp.h>],
[int x = IBV_EXP_FLOW_SPEC_IPV6_EXT;],[HAVE_IPV6=yes], [HAVE_IPV6=no])
AM_CONDITIONAL([HAVE_IPV6],[test "x$HAVE_IPV6" = "xyes"])
if [test $HAVE_IPV6 = yes] && [test $HAVE_VERBS_EXP = yes]; then
if [test $HAVE_IPV6 = yes]; then
AC_DEFINE([HAVE_IPV6], [1], [Enable IPv6 Flow Specification])
fi

AC_TRY_LINK([
#include <infiniband/verbs.h>
#include <infiniband/verbs_exp.h>],
[int x = IBV_EXP_FLOW_SPEC_IPV4_EXT;],[HAVE_IPV4_EXT=yes], [HAVE_IPV4_EXT=no])
AM_CONDITIONAL([HAVE_IPV4_EXT],[test "x$HAVE_IPV4_EXT" = "xyes"])
if [test $HAVE_IPV4_EXT = yes] && [test $HAVE_VERBS_EXP = yes]; then
AC_DEFINE([HAVE_IPV4_EXT], [1], [Enable IPv4 Extended Flow Specification])
fi

AC_TRY_LINK([
#include <infiniband/verbs.h>],
[int x = IBV_FLOW_SPEC_IPV4_EXT;],[HAVE_IPV4_EXT=yes], [HAVE_IPV4_EXT=no])
AM_CONDITIONAL([HAVE_IPV4_EXT],[test "x$HAVE_IPV4_EXT" = "xyes"])
if [test $HAVE_IPV4_EXT = yes] && [test $HAVE_VERBS_EXP = no]; then
if [test $HAVE_IPV4_EXT = yes]; then
AC_DEFINE([HAVE_IPV4_EXT], [1], [Enable IPv4 Extended Flow Specification])
fi

AC_TRY_LINK([
#include <infiniband/verbs.h>
#include <infiniband/verbs_exp.h>],
[int x = IBV_EXP_FLOW_ATTR_SNIFFER;],[HAVE_SNIFFER_EXP=yes], [HAVE_SNIFFER_EXP=no])
AM_CONDITIONAL([HAVE_SNIFFER_EXP],[test "x$HAVE_SNIFFER_EXP" = "xyes"])
if [test $HAVE_SNIFFER_EXP = yes] && [test $HAVE_VERBS_EXP = yes]; then
AC_DEFINE([HAVE_SNIFFER_EXP], [1], [Enable Sniffer Flow Specification])
fi

AC_TRY_LINK([
#include <infiniband/verbs.h>],
[int x = IBV_FLOW_ATTR_SNIFFER;],[HAVE_SNIFFER=yes], [HAVE_SNIFFER=no])
AM_CONDITIONAL([HAVE_SNIFFER],[test "x$HAVE_SNIFFER" = "xyes"])
if [test $HAVE_SNIFFER = yes] && [test $HAVE_VERBS_EXP = no]; then
if [test $HAVE_SNIFFER = yes]; then
AC_DEFINE([HAVE_SNIFFER], [1], [Enable Sniffer Flow Specification])
fi

Expand All @@ -257,10 +180,10 @@ for cpu_num in $intel_no_ro_devices; do
done

AC_TRY_LINK([
#include <infiniband/verbs_exp.h>],
[int x = IBV_EXP_ACCESS_RELAXED_ORDERING;],[HAVE_RO=yes], [HAVE_RO=no])
#include <infiniband/verbs.h>],
[int x = IBV_ACCESS_RELAXED_ORDERING;],[HAVE_RO=yes], [HAVE_RO=no])
AM_CONDITIONAL([HAVE_RO],[test "x$HAVE_RO" = "xyes"])
if [test $HAVE_RO = yes] && [test "x$CPU_IS_RO_COMPLIANT" = "xyes"] && [test $HAVE_VERBS_EXP = yes]; then
if [test $HAVE_RO = yes] && [test "x$CPU_IS_RO_COMPLIANT" = "xyes"]; then
AC_DEFINE([HAVE_RO], [1], [Enable Relaxed Ordering])
fi

Expand All @@ -279,55 +202,12 @@ if [test $HAVE_EX_ODP = yes] && [test $HAVE_EX = yes]; then
AC_DEFINE([HAVE_EX_ODP], [1], [Have Extended ODP support])
fi

AC_TRY_LINK([
#include <infiniband/verbs.h>
#include <infiniband/verbs_exp.h>],
[int x = IBV_EXP_ACCESS_ON_DEMAND;],[HAVE_EXP_ODP=yes], [HAVE_EXP_ODP=no])
AM_CONDITIONAL([HAVE_EXP_ODP],[test "x$HAVE_EXP_ODP" = "xyes"])
if [test $HAVE_EXP_ODP = yes] && [test $HAVE_VERBS_EXP = yes]; then
if [test $HAVE_EX_ODP = no] ; then
AC_DEFINE([HAVE_EXP_ODP], [1], [Have Experimental ODP support])
fi
fi

if [test "$CUDA_H_PATH" ]; then
AC_DEFINE([HAVE_CUDA], [1], [Enable CUDA feature])
AC_DEFINE_UNQUOTED([CUDA_PATH], "$CUDA_H_PATH" , [Enable CUDA feature])
LIBS=$LIBS" -lcuda"
fi

AC_TRY_LINK([
#include <infiniband/verbs.h>
#include <infiniband/verbs_exp.h>],
[int x = IBV_EXP_DEVICE_SCATTER_FCS;],[HAVE_SCATTER_FCS=yes], [HAVE_SCATTER_FCS=no])
AM_CONDITIONAL([HAVE_SCATTER_FCS],[test "x$HAVE_SCATTER_FCS" = "xyes"])
if [test $HAVE_SCATTER_FCS = yes] && [test $HAVE_VERBS_EXP = yes]; then
AC_DEFINE([HAVE_SCATTER_FCS], [1], [Have SCATTER_FCS support])
fi

AC_TRY_LINK([
#include <infiniband/verbs.h>
#include <infiniband/verbs_exp.h>],
[int x = ibv_exp_query_gid_attr(NULL, 1, 0, NULL);],[HAVE_GID_ATTR=yes], [HAVE_GID_ATTR=no])
AM_CONDITIONAL([HAVE_GID_ATTR],[test "x$HAVE_GID_ATTR" = "xyes"])
if [test $HAVE_GID_ATTR = yes] && [test $HAVE_VERBS_EXP = yes]; then
AC_DEFINE([HAVE_GID_ATTR], [1], [Enable GID Attribute query feature])
fi

AC_TRY_LINK([ #include <infiniband/verbs_exp.h>],
[struct ibv_exp_qp_attr *attr; int x = attr->rate_limit;],[HAVE_PACKET_PACING_EXP=yes], [HAVE_PACKET_PACING_EXP=no])
AM_CONDITIONAL([HAVE_PACKET_PACING_EXP],[test "x$HAVE_PACKET_PACING_EXP" = "xyes"])
if [test $HAVE_PACKET_PACING_EXP = yes] && [test $HAVE_VERBS_EXP = yes]; then
AC_DEFINE([HAVE_PACKET_PACING_EXP], [1], [Have PACKET_PACING_EXP support])
fi

AC_TRY_LINK([ #include <infiniband/verbs_exp.h>],
[struct ibv_exp_qp_attr *attr; struct ibv_exp_burst_info x = attr->burst_info;],[HAVE_PACKET_PACING_EXTENSION_EXP=yes], [HAVE_PACKET_PACING_EXTENSION_EXP=no])
AM_CONDITIONAL([HAVE_PACKET_PACING_EXTENSION_EXP],[test "x$HAVE_PACKET_PACING_EXTENSION_EXP" = "xyes"])
if [test $HAVE_PACKET_PACING_EXTENSION_EXP = yes] && [test $HAVE_VERBS_EXP = yes]; then
AC_DEFINE([HAVE_PACKET_PACING_EXTENSION_EXP], [1], [Have PACKET_PACING_EXTENSION_EXP support])
fi

AC_TRY_LINK([#include <infiniband/verbs.h>],
[struct ibv_qp_attr *attr; int x = attr->rate_limit;],[HAVE_PACKET_PACING=yes], [HAVE_PACKET_PACING=no])
AM_CONDITIONAL([HAVE_PACKET_PACING],[test "x$HAVE_PACKET_PACING" = "xyes"])
Expand All @@ -342,27 +222,18 @@ if [test $HAVE_OOO_ATTR = yes]; then
AC_DEFINE([HAVE_OOO_ATTR], [1], [Have Out of order data placement support])
fi

AC_TRY_LINK([#include <infiniband/verbs_exp.h>],
[int x = IBV_EXP_OOO_SUPPORT_RW_DATA_PLACEMENT;], [HAVE_EXP_OOO_ATTR=yes], [HAVE_EXP_OOO_ATTR=no])
AM_CONDITIONAL([HAVE_EXP_OOO_ATTR], [test "x$HAVE_EXP_OOO_ATTR" = "xyes"])
if [test $HAVE_EXP_OOO_ATTR = yes]; then
AC_DEFINE([HAVE_EXP_OOO_ATTR], [1], [Have Experimental Out of order data placement support])
fi

if [test $HAVE_IBV_WR_API = yes]; then
AC_CHECK_LIB([efa], [efadv_create_qp_ex], [HAVE_SRD=yes], [HAVE_SRD=no])
AC_TRY_LINK([#include <infiniband/efadv.h>],
[int x = EFADV_DEVICE_ATTR_CAPS_RDMA_READ;], [HAVE_RDMA_READ_SRD=yes], [HAVE_RDMA_READ_SRD=no])
if [test $HAVE_RDMA_READ_SRD = yes]; then
AC_DEFINE([HAVE_SRD_WITH_RDMA_READ], [1], [Have SRD with RDMA read support])
fi
else
AC_CHECK_LIB([efa], [efadv_create_driver_qp], [HAVE_SRD=yes], [HAVE_SRD=no])
fi
AC_CHECK_LIB([efa], [efadv_create_driver_qp], [HAVE_SRD=yes LIBEFA=-lefa], [HAVE_SRD=no])
AM_CONDITIONAL([HAVE_SRD], [test "x$HAVE_SRD" = "xyes"])
if [test $HAVE_SRD = yes]; then
if [test $HAVE_SRD = yes] && [test $HAVE_IBV_WR_API = no]; then
AC_DEFINE([HAVE_SRD], [1], [Have SRD support])
AC_SUBST([LIBEFA], [-lefa])
AC_SUBST([LIBEFA])
fi

AC_CHECK_LIB([mlx5], [mlx5dv_create_qp], [HAVE_MLX5DV_LIB=yes LIBMLX5=-lmlx5], [HAVE_MLX5DV_LIB=no])
AM_CONDITIONAL([HAVE_MLX5DV_LIB], [test "x$HAVE_MLX5DV_LIB" = "xyes"])
if [test $HAVE_MLX5DV_LIB = yes] && [test $HAVE_MLX5DV = yes]; then
AC_DEFINE([HAVE_MLX5DV], [1], [Have Direct Verbs support])
AC_SUBST([LIBMLX5])
fi

CFLAGS="-g -Wall -D_GNU_SOURCE -O3 $CFLAGS"
Expand Down
Loading

0 comments on commit 094b630

Please sign in to comment.