Skip to content

Commit e0fecea

Browse files
authored
Merge pull request #363 from AnasMasoud/efa_qp_sl
Propagate the service level param to SRD QP attributes
2 parents 4e4f662 + 3ea3b60 commit e0fecea

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

configure.ac

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,11 @@ if [test $HAVE_IBV_WR_API = yes]; then
524524
if [test $HAVE_UNSOLICITED_WRITE_RECV_SRD = yes]; then
525525
AC_DEFINE([HAVE_SRD_WITH_UNSOLICITED_WRITE_RECV], [1], [Have SRD with unsolicited RDMA write with imm. support])
526526
fi
527+
AC_TRY_LINK([#include <infiniband/efadv.h>],
528+
[struct efadv_qp_init_attr *efa_attr; int x = efa_attr->sl;], [HAVE_SRD_QP_SL_SUPPORT=yes], [HAVE_SRD_QP_SL_SUPPORT=no])
529+
if [test $HAVE_SRD_QP_SL_SUPPORT = yes]; then
530+
AC_DEFINE([HAVE_SRD_QP_SL], [1], [Have SRD QP SL support])
531+
fi
527532
else
528533
AC_CHECK_LIB([efa], [efadv_create_driver_qp], [HAVE_SRD=yes], [HAVE_SRD=no])
529534
fi

src/perftest_parameters.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,6 +1801,13 @@ static void force_dependecies(struct perftest_parameters *user_param)
18011801
fprintf(stderr, " SRD does not support RDMA_CM\n");
18021802
exit(1);
18031803
}
1804+
#ifndef HAVE_SRD_QP_SL
1805+
if (user_param->sl != DEF_SL) {
1806+
printf(RESULT_LINE);
1807+
fprintf(stderr, " SRD does not support non-default SL\n");
1808+
exit(1);
1809+
}
1810+
#endif
18041811
user_param->cq_mod = 1;
18051812
}
18061813

src/perftest_resources.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2889,6 +2889,9 @@ struct ibv_qp* ctx_qp_create(struct pingpong_context *ctx,
28892889
if (user_param->use_unsolicited_write)
28902890
efa_attr.flags |= EFADV_QP_FLAGS_UNSOLICITED_WRITE_RECV;
28912891
#endif
2892+
#ifdef HAVE_SRD_QP_SL
2893+
efa_attr.sl = user_param->sl;
2894+
#endif
28922895
qp = efadv_create_qp_ex(ctx->context, &attr_ex,
28932896
&efa_attr, sizeof(efa_attr));
28942897
#else

0 commit comments

Comments
 (0)