代码拉取完成,页面将自动刷新
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。