From 81c82d7fc4ecf8119bcea506d22033cf67cce67f Mon Sep 17 00:00:00 2001 From: Nitzan Lavy Date: Sun, 9 Nov 2025 20:13:09 +0000 Subject: [PATCH] Perftest: Prevent write with imm from running if not supported Prevent write with immediate tests to run and print an appropriate message in case EFA device does not support RDMA write. Apply the same conditions as on write verb. Reviewed-by: Chen Brasch Reviewed-by: Yonatan Nachum Signed-off-by: Nitzan Lavy --- src/perftest_communication.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/perftest_communication.c b/src/perftest_communication.c index 5c89dd0f..8c22824f 100755 --- a/src/perftest_communication.c +++ b/src/perftest_communication.c @@ -2028,7 +2028,7 @@ int check_mtu(struct ibv_context *context,struct perftest_parameters *user_param return FAILURE; } } - } else if (user_param->verb == READ || user_param->verb == WRITE) { + } else if (user_param->verb == READ || user_param->verb == WRITE || user_param->verb == WRITE_IMM) { #ifdef HAVE_SRD struct efadv_device_attr efa_device_attr = {0}; @@ -2047,7 +2047,7 @@ int check_mtu(struct ibv_context *context,struct perftest_parameters *user_param fprintf(stderr, "SRD connection not possible in READ verb\n"); exit(1); #endif - } else if (user_param->verb == WRITE) { + } else if (user_param->verb == WRITE || user_param->verb == WRITE_IMM) { #ifdef HAVE_SRD_WITH_RDMA_WRITE if (!(efa_device_attr.device_caps & EFADV_DEVICE_ATTR_CAPS_RDMA_WRITE)) { fprintf(stderr, "Write verb is not supported with this EFA device\n");