5 Star 0 Fork 7

src-openEuler/hikptool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0031-hikptool-RDMA-Fix-the-missing-bank-ID-in-roce_trp-GE.patch 1.78 KB
一键复制 编辑 原始数据 按行查看 历史
From 074af28f22f7e3dff9637a6366ad0a1ad1dd2852 Mon Sep 17 00:00:00 2001
From: Junxian Huang <huangjunxian6@hisilicon.com>
Date: Wed, 30 Aug 2023 09:24:49 +0800
Subject: hikptool/RDMA: Fix the missing bank ID in roce_trp GEN_AC
Upstream: Yes
Currently hikptool only accepts bank ID 0 and 1 for roce_trp GEN_AC.
The firmware then multiplies the bank ID received from hikptool by 2
and converts it to 0 and 2. But actually there are 4 banks in GEN_AC
and each of them is independent.
To fix the problem, both hikptool and firmware should be modified.
This patch modifies the bank ID limit form 2 to 4 in hikptool.
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
---
net/roce/roce_trp/hikp_roce_trp.c | 2 +-
net/roce/roce_trp/hikp_roce_trp.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/roce/roce_trp/hikp_roce_trp.c b/net/roce/roce_trp/hikp_roce_trp.c
index 8befb06..bf22484 100644
--- a/net/roce/roce_trp/hikp_roce_trp.c
+++ b/net/roce/roce_trp/hikp_roce_trp.c
@@ -32,7 +32,7 @@ static int hikp_roce_trp_help(struct major_cmd_ctrl *self, const char *argv)
"this is necessary param COMMON/TRP_RX/GEN_AC/PAYL");
printf(" %s, %-25s %s\n", "-b", "--bank=<bank>",
"[option]set which bank to read. (default 0) "
- "COMMON : 0~3\n PAYL: 0~1\n GEN_AC : 0~1\n ");
+ "COMMON : 0~3\n PAYL: 0~1\n GEN_AC : 0~3\n ");
printf("\n");
return 0;
diff --git a/net/roce/roce_trp/hikp_roce_trp.h b/net/roce/roce_trp/hikp_roce_trp.h
index db58216..80d28af 100644
--- a/net/roce/roce_trp/hikp_roce_trp.h
+++ b/net/roce/roce_trp/hikp_roce_trp.h
@@ -25,7 +25,7 @@
}
#define TRP_MAX_BANK_NUM 0x3
#define PAYL_MAX_BANK_NUM 0x1
-#define GAC_MAX_BANK_NUM 0x1
+#define GAC_MAX_BANK_NUM 0x3
#define PER_TRP_DATA_NUM 2
struct roce_trp_req_param {
--
2.30.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/hikptool.git
git@gitee.com:src-openeuler/hikptool.git
src-openeuler
hikptool
hikptool
master

搜索帮助