From 7fe4d64508c40cfe145764ae1187d412ee2789ef Mon Sep 17 00:00:00 2001 From: Yonatan Nachum Date: Wed, 4 Mar 2026 16:02:58 +0000 Subject: [PATCH] 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 --- configure.ac | 5 +++++ src/perftest_resources.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/configure.ac b/configure.ac index 4abd2931..d2a8465e 100755 --- a/configure.ac +++ b/configure.ac @@ -573,6 +573,11 @@ if [test $HAVE_IBV_WR_API = yes]; then if [test $HAVE_SRD_QP_SL_SUPPORT = yes]; then AC_DEFINE([HAVE_SRD_QP_SL], [1], [Have SRD QP SL support]) fi + AC_TRY_LINK([#include ], + [int x = EFADV_QP_FLAGS_INLINE_WRITE;], [HAVE_WRITE_INLINE_SRD=yes], [HAVE_WRITE_INLINE_SRD=no]) + if [test $HAVE_WRITE_INLINE_SRD = yes]; then + AC_DEFINE([HAVE_SRD_WRITE_INLINE], [1], [Have SRD with RDMA write inline support]) + fi else AC_CHECK_LIB([efa], [efadv_create_driver_qp], [HAVE_SRD=yes], [HAVE_SRD=no]) fi diff --git a/src/perftest_resources.c b/src/perftest_resources.c index b7b7e5b7..8dbc34f4 100755 --- a/src/perftest_resources.c +++ b/src/perftest_resources.c @@ -3091,6 +3091,12 @@ struct ibv_qp* ctx_qp_create(struct pingpong_context *ctx, #ifdef HAVE_SRD_QP_SL efa_attr.sl = user_param->sl; #endif + #ifdef HAVE_SRD_WRITE_INLINE + if ((user_param->verb == WRITE || user_param->verb == WRITE_IMM) && user_param->inline_size) { + efa_attr.flags |= EFADV_QP_FLAGS_INLINE_WRITE; + } + #endif + qp = efadv_create_qp_ex(ctx->context, &attr_ex, &efa_attr, sizeof(efa_attr)); #else