Skip to content

Commit 7fe4d64

Browse files
committed
Add SRD RDMA write with inline support
Add the create QP DV flag needed to enable write with inline support. Signed-off-by: Yonatan Nachum <ynachum@amazon.com>
1 parent a9f846e commit 7fe4d64

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

configure.ac

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,11 @@ if [test $HAVE_IBV_WR_API = yes]; then
573573
if [test $HAVE_SRD_QP_SL_SUPPORT = yes]; then
574574
AC_DEFINE([HAVE_SRD_QP_SL], [1], [Have SRD QP SL support])
575575
fi
576+
AC_TRY_LINK([#include <infiniband/efadv.h>],
577+
[int x = EFADV_QP_FLAGS_INLINE_WRITE;], [HAVE_WRITE_INLINE_SRD=yes], [HAVE_WRITE_INLINE_SRD=no])
578+
if [test $HAVE_WRITE_INLINE_SRD = yes]; then
579+
AC_DEFINE([HAVE_SRD_WRITE_INLINE], [1], [Have SRD with RDMA write inline support])
580+
fi
576581
else
577582
AC_CHECK_LIB([efa], [efadv_create_driver_qp], [HAVE_SRD=yes], [HAVE_SRD=no])
578583
fi

src/perftest_resources.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3091,6 +3091,12 @@ struct ibv_qp* ctx_qp_create(struct pingpong_context *ctx,
30913091
#ifdef HAVE_SRD_QP_SL
30923092
efa_attr.sl = user_param->sl;
30933093
#endif
3094+
#ifdef HAVE_SRD_WRITE_INLINE
3095+
if ((user_param->verb == WRITE || user_param->verb == WRITE_IMM) && user_param->inline_size) {
3096+
efa_attr.flags |= EFADV_QP_FLAGS_INLINE_WRITE;
3097+
}
3098+
#endif
3099+
30943100
qp = efadv_create_qp_ex(ctx->context, &attr_ex,
30953101
&efa_attr, sizeof(efa_attr));
30963102
#else

0 commit comments

Comments
 (0)