Skip to content

Commit c94e538

Browse files
authored
Merge pull request #388 from SreevatsaAnantharamu/anantharamus/num-sge-zero-support
Added --enable-num_sge_zero in configure.ac to allow for using num_sge=0 for Write with IMM if the vendor supports it
2 parents 2acfd77 + ca3537d commit c94e538

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

configure.ac

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ AS_IF([test "x$enable_cq_ex" = "xno"],
6565
[USE_CQ_EX=no],
6666
[USE_CQ_EX=yes])
6767

68+
AC_ARG_ENABLE([num_sge_zero],
69+
[AS_HELP_STRING([--enable-num_sge_zero], [Allows using num_sge=0 with RDMA Write With IMM verb])],
70+
[AC_DEFINE([HAVE_NUM_SGE_ZERO], [1], [Use num_sge=0 with RDMA Write With IMM])],
71+
[])
72+
6873
AC_PREFIX_DEFAULT("/usr")
6974

7075
AC_PROG_CC

src/perftest_resources.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4105,11 +4105,15 @@ int ctx_set_recv_wqes(struct pingpong_context *ctx,struct perftest_parameters *u
41054105
}
41064106
}
41074107

4108+
#ifdef HAVE_NUM_SGE_ZERO
4109+
// Setting num_sge=0 is supported by the vendor and using it for WRITE_IMM verb.
41084110
if (user_param->verb == WRITE_IMM) {
41094111
ctx->rwr[i * user_param->recv_post_list + j].sg_list = NULL;
41104112
ctx->rwr[i * user_param->recv_post_list + j].num_sge = 0;
41114113
}
4112-
else {
4114+
else
4115+
#endif
4116+
{
41134117
ctx->rwr[i * user_param->recv_post_list + j].sg_list = &ctx->recv_sge_list[i * user_param->recv_post_list + j];
41144118
ctx->rwr[i * user_param->recv_post_list + j].num_sge = MAX_RECV_SGE;
41154119
}

0 commit comments

Comments
 (0)