124 Star 0 Fork 24

src-openEuler/perftest

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0011-Perftest-Fix-rx_depth-check-for-XRC.patch 2.48 KB
一键复制 编辑 原始数据 按行查看 历史
yueguofeng 提交于 2024-07-11 10:16 +08:00 . Fix rx_depth check for XRC
From c642cd2753b1b9343a5642ffeaaa78ef135f0f6e Mon Sep 17 00:00:00 2001
From: Junxian Huang <huangjunxian6@hisilicon.com>
Date: Fri, 24 May 2024 17:32:27 +0800
Subject: [PATCH] Perftest: Fix rx_depth check for XRC
When users manually specifies --use_srq in perftest command, the rx_depth
will be checked. If rx_depth is less than the number of qps, the process
will throw an error and exit.
For XRC SEND where SRQ is definitely used, users normally don't need to
manually specifies --use_srq, since the use_srq flag will be set to on
when parsing the XRC parameters. However, the XRC parameters parsing is
after the SRQ rx_depth check. If rx_depth is less than the number of qps
in this case, it will miss the check, size_per_qp in ctx_set_recv_wqes()
will become 0 and ibv_post_srq_recv() won't be called.
Move the XRC parameters parsing ahead of SRQ rx_depth check and set
--use_srq to on in advance so that the rx_depth error can be thrown.
Fixes: 4c774a951b3c ("Added XRC for ib_send_bw test")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
---
src/perftest_parameters.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/src/perftest_parameters.c b/src/perftest_parameters.c
index 5d27132..52b21dc 100755
--- a/src/perftest_parameters.c
+++ b/src/perftest_parameters.c
@@ -1098,7 +1098,19 @@ static void force_dependecies(struct perftest_parameters *user_param)
exit (1);
}
- if (user_param->use_srq && user_param->num_of_qps > user_param->rx_depth) {
+ /* XRC Part */
+ if (user_param->connection_type == XRC) {
+ if (user_param->work_rdma_cm == ON) {
+ printf(RESULT_LINE);
+ fprintf(stderr," XRC does not support RDMA_CM\n");
+ exit(1);
+ }
+ user_param->use_xrc = ON;
+ user_param->use_srq = ON;
+ }
+
+ if (user_param->use_srq && user_param->verb == SEND &&
+ user_param->num_of_qps > user_param->rx_depth) {
printf(RESULT_LINE);
printf(" Using SRQ depth should be greater than number of QPs.\n");
exit (1);
@@ -1396,17 +1408,6 @@ static void force_dependecies(struct perftest_parameters *user_param)
if (user_param->connection_type == DC && !user_param->use_srq)
user_param->use_srq = ON;
- /* XRC Part */
- if (user_param->connection_type == XRC) {
- if (user_param->work_rdma_cm == ON) {
- printf(RESULT_LINE);
- fprintf(stderr," XRC does not support RDMA_CM\n");
- exit(1);
- }
- user_param->use_xrc = ON;
- user_param->use_srq = ON;
- }
-
if (!user_param->use_old_post_send)
{
#ifndef HAVE_IBV_WR_API
--
2.25.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/perftest.git
git@gitee.com:src-openeuler/perftest.git
src-openeuler
perftest
perftest
master

搜索帮助

371d5123 14472233 46e8bd33 14472233