Skip to content

Commit 5be2b4e

Browse files
maorgottliebsshaulnv
authored andcommitted
Perftest: Add print in case blueflame is not supported
Warn if blueflame is not supported, as it can impact latency. Adding the print to all latency tests. Signed-off-by: Maor Gottlieb <[email protected]>
1 parent 920087f commit 5be2b4e

File tree

7 files changed

+36
-0
lines changed

7 files changed

+36
-0
lines changed

configure.ac

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ if [test $HAVE_DCS = yes] && [test $HAVE_MLX5DV = yes]; then
170170
AC_DEFINE([HAVE_DCS], [1], [Have DCS support])
171171
fi
172172

173+
AC_TRY_LINK([
174+
#include <infiniband/mlx5dv.h>],
175+
[int x = MLX5DV_CONTEXT_FLAGS_BLUEFLAME;],[HAVE_MLX5DV_BF_FLAG=yes], [HAVE_MLX5DV_BF_FLAG=no])
176+
AM_CONDITIONAL([HAVE_MLX5DV_BF_FLAG],[test "x$HAVE_MLX5DV_BF_FLAG" = "xyes"])
177+
if [test $HAVE_MLX5DV_BF_FLAG = yes] && [test $HAVE_MLX5DV = yes]; then
178+
AC_DEFINE([HAVE_MLX5DV_BF_FLAG], [1], [Have BF indication support])
179+
fi
180+
173181
AC_TRY_LINK([
174182
#include <infiniband/mlx5dv.h>],
175183
[int x = MLX5DV_CONTEXT_MASK_OOO_RECV_WRS;],[HAVE_OOO_RECV_WRS=yes], [HAVE_OOO_RECV_WRS=no])

src/atomic_lat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ int main(int argc, char *argv[])
179179

180180
/* Print basic test information. */
181181
ctx_print_test_info(&user_param);
182+
check_bf_support(&ctx);
182183

183184
/* shaking hands and gather the other side info. */
184185
if (ctx_hand_shake(&user_comm,my_dest,rem_dest)) {

src/perftest_resources.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,6 +2011,28 @@ static int verify_ooo_settings(struct pingpong_context *ctx,
20112011
}
20122012
}
20132013
#endif
2014+
2015+
void check_bf_support(struct pingpong_context *ctx)
2016+
{
2017+
if (get_device_vendor(ctx->context) != 0x02c9)
2018+
return;
2019+
2020+
#ifdef HAVE_MLX5DV_BF_FLAG
2021+
struct mlx5dv_context ctx_dv;
2022+
int ret;
2023+
2024+
ret = mlx5dv_query_device(ctx->context, &ctx_dv);
2025+
if (ret) {
2026+
fprintf(stderr, "Failed to query device capabilities, ret=%d\n", ret);
2027+
return;
2028+
}
2029+
if (!(ctx_dv.flags & MLX5DV_CONTEXT_FLAGS_BLUEFLAME)) {
2030+
fprintf(stderr, "Warning: Blueflame is not supported in the system\n");
2031+
printf(RESULT_LINE);
2032+
}
2033+
#endif
2034+
}
2035+
20142036
int ctx_init(struct pingpong_context *ctx, struct perftest_parameters *user_param)
20152037
{
20162038
int i;

src/perftest_resources.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,4 +1021,6 @@ int rdma_cm_destroy_cma(struct pingpong_context *ctx,
10211021
*/
10221022
int error_handler(char *error_message);
10231023

1024+
void check_bf_support(struct pingpong_context *ctx);
1025+
10241026
#endif /* PERFTEST_RESOURCES_H */

src/read_lat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ int main(int argc, char *argv[])
179179

180180
/* Print basic test information. */
181181
ctx_print_test_info(&user_param);
182+
check_bf_support(&ctx);
182183

183184
/* shaking hands and gather the other side info. */
184185
if (ctx_hand_shake(&user_comm,my_dest,rem_dest)) {

src/send_lat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ int main(int argc, char *argv[])
299299

300300
/* Print basic test information. */
301301
ctx_print_test_info(&user_param);
302+
check_bf_support(&ctx);
302303

303304
for (i=0; i < user_param.num_of_qps; i++) {
304305

src/write_lat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ int main(int argc, char *argv[])
187187

188188
/* Print basic test information. */
189189
ctx_print_test_info(&user_param);
190+
check_bf_support(&ctx);
190191

191192
/* shaking hands and gather the other side info. */
192193
if (ctx_hand_shake(&user_comm,my_dest,rem_dest)) {

0 commit comments

Comments
 (0)