代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/perftest 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 1a842d207a981c72c5162f4efd89da8c5a07a772 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Tue, 8 Nov 2022 20:20:40 +0800
Subject: Perftest: Fix verification of max_inline_data for *_create_qp_ex()
Currently, attr.cap.max_inline_data is used for validation in
*_create_qp() and *_create_qp_ex(). But actually, when entering
the create_qp_ex path, the variable attr is not used. So the current
check of the *_create_qp_ex() branch is meaningless.
The attr_ex.cap.max_inline_data is used to check the max_inline_data
in *_create_qp_ex() path. And related printing error has also been
fixed.
Fixes: 13f71777e6f0 ("Added new post_send API usage for RC,UC,UD,XRC")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
---
src/perftest_resources.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/src/perftest_resources.c b/src/perftest_resources.c
index 23c31d1..751ea96 100755
--- a/src/perftest_resources.c
+++ b/src/perftest_resources.c
@@ -2138,22 +2138,21 @@ struct ibv_qp* ctx_qp_create(struct pingpong_context *ctx,
int dc_num_of_qps = user_param->num_of_qps / 2;
int is_dc_server_side = 0;
+ struct ibv_qp_init_attr attr;
+ memset(&attr, 0, sizeof(struct ibv_qp_init_attr));
+ struct ibv_qp_cap *qp_cap = &attr.cap;
+
#ifdef HAVE_IBV_WR_API
enum ibv_wr_opcode opcode;
- struct ibv_qp_init_attr attr;
struct ibv_qp_init_attr_ex attr_ex;
+ memset(&attr_ex, 0, sizeof(struct ibv_qp_init_attr_ex));
#ifdef HAVE_MLX5DV
struct mlx5dv_qp_init_attr attr_dv;
memset(&attr_dv, 0, sizeof(attr_dv));
#endif
- memset(&attr, 0, sizeof(struct ibv_qp_init_attr));
- memset(&attr_ex, 0, sizeof(struct ibv_qp_init_attr_ex));
#ifdef HAVE_SRD
struct efadv_qp_init_attr efa_attr = {};
#endif
- #else
- struct ibv_qp_init_attr attr;
- memset(&attr, 0, sizeof(struct ibv_qp_init_attr));
#endif
attr.send_cq = ctx->send_cq;
@@ -2328,10 +2327,15 @@ struct ibv_qp* ctx_qp_create(struct pingpong_context *ctx,
fprintf(stderr, "Current TX depth is %d and inline size is %d .\n", user_param->tx_depth, user_param->inline_size);
}
- if (user_param->inline_size > attr.cap.max_inline_data) {
- user_param->inline_size = attr.cap.max_inline_data;
- printf(" Actual inline-size(%d) > requested inline-size(%d)\n",
- attr.cap.max_inline_data, user_param->inline_size);
+ #ifdef HAVE_IBV_WR_API
+ if (!user_param->use_old_post_send)
+ qp_cap = &attr_ex.cap;
+ #endif
+
+ if (user_param->inline_size > qp_cap->max_inline_data) {
+ printf(" Actual inline-size(%d) < requested inline-size(%d)\n",
+ qp_cap->max_inline_data, user_param->inline_size);
+ user_param->inline_size = qp_cap->max_inline_data;
}
return qp;
--
2.34.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。