From 4948417abacfa0795cea2d287fefafe3ceb07a1a Mon Sep 17 00:00:00 2001 From: Dmitry Akhmedzhanov Date: Sun, 25 Aug 2019 17:29:23 +0300 Subject: [PATCH 01/41] Removed some features that are not supported in rdma-core Descprition: Pieces of code under HAVE_RSS_EXP, HAVE_ACCL_VERBS, HAVE_MASKED_ATOMICS, HAVE_PACKET_PACING_EXP, HAVE_PACKET_PACING_EXTENSION_EXP, HAVE_SCATTER_FCS, HAVE_RAW_ETH_EXP, HAVE_EXP_ODP, HAVE_VERBS_EXP, HAVE_DC, SNIFFER_EXP, EXP_OOO_ATTR, RAW_ETH_EXP were removed Signed-off-by: Dmitry Akhmedzhanov --- configure.ac | 139 +-- src/atomic_bw.c | 12 - src/atomic_lat.c | 13 - src/perftest_communication.c | 4 +- src/perftest_parameters.c | 120 +- src/perftest_parameters.h | 20 +- src/perftest_resources.c | 1888 +++-------------------------- src/perftest_resources.h | 94 +- src/raw_ethernet_resources.c | 228 +--- src/raw_ethernet_resources.h | 16 - src/raw_ethernet_send_burst_lat.c | 37 - src/raw_ethernet_send_bw.c | 74 +- src/raw_ethernet_send_lat.c | 38 - 13 files changed, 184 insertions(+), 2499 deletions(-) diff --git a/configure.ac b/configure.ac index c9268593..17aec4c9 100755 --- a/configure.ac +++ b/configure.ac @@ -44,20 +44,11 @@ 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_IF([test "x$enable_ibv_wr_api" = "xyes"], [USE_IBV_WR_API=yes], [USE_IBV_WR_API=no]) @@ -77,14 +68,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 ], - [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 ], [struct ibv_flow *t = ibv_create_flow(NULL,NULL);],[HAVE_RAW_ETH_REG=yes], [HAVE_RAW_ETH_REG=no]) @@ -94,7 +77,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) @@ -141,14 +124,6 @@ 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 ]) -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 ], [int x = IBV_QP_INIT_ATTR_SEND_OPS_FLAGS;],[HAVE_IBV_WR_API=yes],[HAVE_IBV_WR_API=no]) @@ -159,90 +134,27 @@ else HAVE_IBV_WR_API=no fi -AC_TRY_LINK([ -#include -#include ], - [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 -#include ], - [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 -#include ], - [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 -#include ], - [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 - AC_TRY_LINK([ #include ], [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 +if [test $HAVE_IPV6 = yes]; then AC_DEFINE([HAVE_IPV6], [1], [Enable IPv6 Flow Specification]) fi -AC_TRY_LINK([ -#include -#include ], - [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 - AC_DEFINE([HAVE_IPV6], [1], [Enable IPv6 Flow Specification]) -fi - -AC_TRY_LINK([ -#include -#include ], - [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 ], [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 -#include ], - [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 ], [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 @@ -261,55 +173,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 -#include ], - [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 -#include ], - [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 -#include ], - [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 ], - [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 ], - [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 ], [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"]) diff --git a/src/atomic_bw.c b/src/atomic_bw.c index fee4b291..15f8ea29 100755 --- a/src/atomic_bw.c +++ b/src/atomic_bw.c @@ -87,18 +87,6 @@ int main(int argc, char *argv[]) return FAILURE; } - #ifdef HAVE_MASKED_ATOMICS - if (check_masked_atomics_support(&ctx)) { - user_param.masked_atomics = 1; - user_param.use_exp = 1; - } - - if (user_param.masked_atomics && (user_param.work_rdma_cm || user_param.use_rdma_cm)) { - fprintf(stderr, "atomic test is not supported with -R/-z flag (rdma_cm) with this device.\n"); - return FAILURE; - } - #endif - /* See if MTU and link type are valid and supported. */ if (check_link(ctx.context, &user_param)) { fprintf(stderr, " Couldn't get context for the device\n"); diff --git a/src/atomic_lat.c b/src/atomic_lat.c index cc0c8460..f038b2d4 100755 --- a/src/atomic_lat.c +++ b/src/atomic_lat.c @@ -103,19 +103,6 @@ int main(int argc, char *argv[]) return FAILURE; } - #ifdef HAVE_MASKED_ATOMICS - if (check_masked_atomics_support(&ctx)) { - user_param.masked_atomics = 1; - user_param.use_exp = 1; - } - - if (user_param.masked_atomics && (user_param.work_rdma_cm || user_param.use_rdma_cm)) { - fprintf(stderr, "atomic test is not supported with -R/-z flag (rdma_cm) with this device.\n"); - return FAILURE; - } - - #endif - /* See if MTU and link type are valid and supported. */ if (check_link(ctx.context,&user_param)) { fprintf(stderr, " Couldn't get context for the device\n"); diff --git a/src/perftest_communication.c b/src/perftest_communication.c index b26152fd..264ddfa8 100755 --- a/src/perftest_communication.c +++ b/src/perftest_communication.c @@ -527,7 +527,7 @@ static int rdma_read_keys(struct pingpong_dest *rem_dest, return 0; } - +//TODO: Move to another gid #ifdef HAVE_GID_ATTR enum who_is_better {LEFT_IS_BETTER, EQUAL, RIGHT_IS_BETTER}; @@ -838,7 +838,6 @@ int set_up_connection(struct pingpong_context *ctx, } #endif - #ifdef HAVE_DC if(user_param->machine == SERVER || user_param->duplex || user_param->tst == LAT) { if (user_param->connection_type == DC) { for (i=0; i < user_param->num_of_qps; i++) { @@ -849,7 +848,6 @@ int set_up_connection(struct pingpong_context *ctx, } } } - #endif return 0; } diff --git a/src/perftest_parameters.c b/src/perftest_parameters.c index b71f5fc8..c23f24ce 100755 --- a/src/perftest_parameters.c +++ b/src/perftest_parameters.c @@ -421,7 +421,7 @@ static void usage(const char *argv0, VerbType verb, TestType tst, int connection printf(" Create memory region for each qp.\n"); } - #if defined HAVE_EX_ODP || defined HAVE_EXP_ODP + #if defined HAVE_EX_ODP printf(" --odp "); printf(" Use On Demand Paging instead of Memory Registration.\n"); #endif @@ -472,22 +472,8 @@ static void usage(const char *argv0, VerbType verb, TestType tst, int connection printf(" Use CUDA lib for GPU-Direct testing.\n"); #endif - #ifdef HAVE_VERBS_EXP - printf(" --use_exp "); - printf(" Use Experimental verbs in data path. Default is OFF.\n"); - #endif - printf(" --use_hugepages "); printf(" Use Hugepages instead of contig, memalign allocations.\n"); - - - #ifdef HAVE_ACCL_VERBS - printf(" --use_res_domain "); - printf(" Use shared resource domain\n"); - - printf(" --verb_type=