!39 同步patch:新增RoCE模块的DFX命令,以及修复部分bug和检视意见
From: @veega2022 Reviewed-by: @chenjunxin1992 Signed-off-by: @chenjunxin1992
This commit is contained in:
commit
1efdbc0f9f
386
0039-hikptool-roce-Add-a-common-frame-for-hikptool-roce-r.patch
Normal file
386
0039-hikptool-roce-Add-a-common-frame-for-hikptool-roce-r.patch
Normal file
@ -0,0 +1,386 @@
|
|||||||
|
From 8b3b68347165b602cded484d090509426f88cc75 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
Date: Mon, 31 Jul 2023 21:19:46 +0800
|
||||||
|
Subject: hikptool/roce: Add a common frame for hikptool roce register query
|
||||||
|
|
||||||
|
Add a common frame for hikptool roce register query.
|
||||||
|
|
||||||
|
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
---
|
||||||
|
net/roce/roce_caep/hikp_roce_caep.h | 2 +-
|
||||||
|
.../roce_ext_common/hikp_roce_ext_common.c | 178 ++++++++++++++++++
|
||||||
|
.../roce_ext_common/hikp_roce_ext_common.h | 52 +++++
|
||||||
|
net/roce/roce_gmv/hikp_roce_gmv.h | 2 +-
|
||||||
|
net/roce/roce_mdb/hikp_roce_mdb.h | 2 +-
|
||||||
|
net/roce/roce_pkt/hikp_roce_pkt.h | 2 +-
|
||||||
|
net/roce/roce_qmm/hikp_roce_qmm.h | 2 +-
|
||||||
|
net/roce/roce_scc/hikp_roce_scc.h | 2 +-
|
||||||
|
net/roce/roce_timer/hikp_roce_timer.h | 2 +-
|
||||||
|
net/roce/roce_trp/hikp_roce_trp.h | 2 +-
|
||||||
|
net/roce/roce_tsp/hikp_roce_tsp.h | 2 +-
|
||||||
|
11 files changed, 239 insertions(+), 9 deletions(-)
|
||||||
|
create mode 100644 net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
create mode 100644 net/roce/roce_ext_common/hikp_roce_ext_common.h
|
||||||
|
|
||||||
|
diff --git a/net/roce/roce_caep/hikp_roce_caep.h b/net/roce/roce_caep/hikp_roce_caep.h
|
||||||
|
index 3c494b1..804d2df 100644
|
||||||
|
--- a/net/roce/roce_caep/hikp_roce_caep.h
|
||||||
|
+++ b/net/roce/roce_caep/hikp_roce_caep.h
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
#ifndef __HIKP_ROCE_CAEP_H__
|
||||||
|
#define __HIKP_ROCE_CAEP_H__
|
||||||
|
|
||||||
|
-#include "hikp_net_lib.h"
|
||||||
|
+#include "hikp_roce_ext_common.h"
|
||||||
|
|
||||||
|
#define ROCE_HIKP_CAEP_REG_NUM 29
|
||||||
|
#define PER_REG_NUM 2
|
||||||
|
diff --git a/net/roce/roce_ext_common/hikp_roce_ext_common.c b/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..ec47dce
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
@@ -0,0 +1,178 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2023 Hisilicon Technologies Co., Ltd.
|
||||||
|
+ * Hikptool is licensed under Mulan PSL v2.
|
||||||
|
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
+ * You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
+ * http://license.coscl.org.cn/MulanPSL2
|
||||||
|
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
+ *
|
||||||
|
+ * See the Mulan PSL v2 for more details.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include "hikp_roce_ext_common.h"
|
||||||
|
+
|
||||||
|
+static void hikp_roce_ext_reg_data_free(struct reg_data *reg)
|
||||||
|
+{
|
||||||
|
+ if (reg->offset)
|
||||||
|
+ free(reg->offset);
|
||||||
|
+
|
||||||
|
+ if (reg->data)
|
||||||
|
+ free(reg->data);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void hikp_roce_ext_cmd_ret_free(struct hikp_cmd_ret *cmd_ret)
|
||||||
|
+{
|
||||||
|
+ if (cmd_ret)
|
||||||
|
+ free(cmd_ret);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static const struct cmd_type_info {
|
||||||
|
+ enum roce_cmd_type cmd_type;
|
||||||
|
+ const char *cmd_name;
|
||||||
|
+ uint8_t reg_array_length;
|
||||||
|
+} cmd_info_table[] = {
|
||||||
|
+ {GET_ROCEE_MDB_CMD, "MDB", ROCE_HIKP_MDB_REG_NUM_EXT},
|
||||||
|
+ {GET_ROCEE_GMV_CMD, "GMV", ROCE_HIKP_GMV_REG_NUM_EXT},
|
||||||
|
+ {GET_ROCEE_CAEP_CMD, "CAEP", ROCE_HIKP_CAEP_REG_NUM_EXT},
|
||||||
|
+ {GET_ROCEE_PKT_CMD, "PKT", ROCE_HIKP_PKT_REG_NUM_EXT},
|
||||||
|
+ {GET_ROCEE_SCC_CMD, "SCC", ROCE_HIKP_SCC_REG_NUM_EXT},
|
||||||
|
+ {GET_ROCEE_QMM_CMD, "QMM", ROCE_HIKP_QMM_REG_NUM_EXT},
|
||||||
|
+ {GET_ROCEE_TIMER_CMD, "TIMER", ROCE_HIKP_TIMER_REG_NUM_EXT},
|
||||||
|
+ {GET_ROCEE_TRP_CMD, "TRP", ROCE_HIKP_TRP_REG_NUM_EXT},
|
||||||
|
+ {GET_ROCEE_TSP_CMD, "TSP", ROCE_HIKP_TSP_REG_NUM_EXT},
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static int get_cmd_info_table_idx(enum roce_cmd_type cmd_type)
|
||||||
|
+{
|
||||||
|
+ int array_size = sizeof(cmd_info_table) / sizeof(struct cmd_type_info);
|
||||||
|
+ int i;
|
||||||
|
+
|
||||||
|
+ for (i = 0; i < array_size; i++)
|
||||||
|
+ if (cmd_type == cmd_info_table[i].cmd_type)
|
||||||
|
+ return i;
|
||||||
|
+
|
||||||
|
+ return -ENOENT;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static const char *get_cmd_name(enum roce_cmd_type cmd_type)
|
||||||
|
+{
|
||||||
|
+ int idx;
|
||||||
|
+
|
||||||
|
+ idx = get_cmd_info_table_idx(cmd_type);
|
||||||
|
+ if (idx >= 0)
|
||||||
|
+ return cmd_info_table[idx].cmd_name;
|
||||||
|
+
|
||||||
|
+ printf("Failed to get cmd name, cmd_type = %d\n", cmd_type);
|
||||||
|
+ return NULL;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int get_cmd_reg_array_length(enum roce_cmd_type cmd_type)
|
||||||
|
+{
|
||||||
|
+ int idx;
|
||||||
|
+
|
||||||
|
+ idx = get_cmd_info_table_idx(cmd_type);
|
||||||
|
+ if (idx >= 0)
|
||||||
|
+ return cmd_info_table[idx].reg_array_length;
|
||||||
|
+
|
||||||
|
+ printf("Failed to get cmd reg array length, cmd_type = %d\n", cmd_type);
|
||||||
|
+ return idx;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int hikp_roce_ext_get_res(enum roce_cmd_type cmd_type,
|
||||||
|
+ uint32_t block_id,
|
||||||
|
+ struct roce_ext_head *res_head,
|
||||||
|
+ struct reg_data *reg,
|
||||||
|
+ int (*get_data)(struct hikp_cmd_ret **cmd_ret,
|
||||||
|
+ uint32_t block_id))
|
||||||
|
+{
|
||||||
|
+ int reg_array_length = get_cmd_reg_array_length(cmd_type);
|
||||||
|
+ const char *cmd_name = get_cmd_name(cmd_type);
|
||||||
|
+ struct roce_ext_res_param *roce_ext_res;
|
||||||
|
+ struct hikp_cmd_ret *cmd_ret;
|
||||||
|
+ size_t max_size;
|
||||||
|
+ size_t cur_size;
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ /* reg_array_length greater than or equal to 0 ensures that cmd_name
|
||||||
|
+ * is not NULL, so cmd_name does not need to be checked.
|
||||||
|
+ */
|
||||||
|
+ if (reg_array_length < 0)
|
||||||
|
+ return reg_array_length;
|
||||||
|
+
|
||||||
|
+ ret = get_data(&cmd_ret, block_id);
|
||||||
|
+ if (ret) {
|
||||||
|
+ printf("hikptool roce_%s get data failed!\n", cmd_name);
|
||||||
|
+ goto get_data_error;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ roce_ext_res = (struct roce_ext_res_param *)cmd_ret->rsp_data;
|
||||||
|
+ *res_head = roce_ext_res->head;
|
||||||
|
+ max_size = res_head->total_block_num * sizeof(uint32_t);
|
||||||
|
+
|
||||||
|
+ if (block_id == 0) {
|
||||||
|
+ reg->offset = (uint32_t *)malloc(max_size);
|
||||||
|
+ reg->data = (uint32_t *)malloc(max_size);
|
||||||
|
+ if ((reg->offset == NULL) || (reg->data == NULL)) {
|
||||||
|
+ printf("hikptool roce_%s alloc log memmory 0x%x failed!\n",
|
||||||
|
+ cmd_name, max_size);
|
||||||
|
+ ret = -ENOMEM;
|
||||||
|
+ hikp_roce_ext_reg_data_free(reg);
|
||||||
|
+ goto get_data_error;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ cur_size = res_head->cur_block_num * sizeof(uint32_t);
|
||||||
|
+ if (cur_size > max_size) {
|
||||||
|
+ printf("hikptool roce_%s log data copy size error, data size: 0x%x, max size: 0x%x\n",
|
||||||
|
+ cmd_name, cur_size, max_size);
|
||||||
|
+ ret = -EINVAL;
|
||||||
|
+ hikp_roce_ext_reg_data_free(reg);
|
||||||
|
+ goto get_data_error;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ memcpy(reg->offset + block_id,
|
||||||
|
+ (uint32_t *)&roce_ext_res->reg_data, cur_size);
|
||||||
|
+ memcpy(reg->data + block_id,
|
||||||
|
+ (uint32_t *)&roce_ext_res->reg_data + reg_array_length, cur_size);
|
||||||
|
+
|
||||||
|
+get_data_error:
|
||||||
|
+ hikp_roce_ext_cmd_ret_free(cmd_ret);
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void hikp_roce_ext_print(const char *cmd_name, uint32_t total_block_num,
|
||||||
|
+ const uint32_t *offset, const uint32_t *data)
|
||||||
|
+{
|
||||||
|
+ int i;
|
||||||
|
+
|
||||||
|
+ printf("**************%s INFO*************\n", cmd_name);
|
||||||
|
+ for (i = 0; i < total_block_num; i++)
|
||||||
|
+ printf("[0x%08X] : 0x%08X\n", offset[i], data[i]);
|
||||||
|
+ printf("************************************\n");
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void hikp_roce_ext_execute(struct major_cmd_ctrl *self,
|
||||||
|
+ enum roce_cmd_type cmd_type,
|
||||||
|
+ int (*get_data)(struct hikp_cmd_ret **cmd_ret,
|
||||||
|
+ uint32_t block_id))
|
||||||
|
+{
|
||||||
|
+ uint32_t queried_block_id = 0;
|
||||||
|
+ struct roce_ext_head res_head;
|
||||||
|
+ struct reg_data reg = { 0 };
|
||||||
|
+
|
||||||
|
+ do {
|
||||||
|
+ self->err_no = hikp_roce_ext_get_res(cmd_type, queried_block_id,
|
||||||
|
+ &res_head, ®, get_data);
|
||||||
|
+ if (self->err_no)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ queried_block_id += res_head.cur_block_num;
|
||||||
|
+ } while (queried_block_id < res_head.total_block_num);
|
||||||
|
+
|
||||||
|
+ hikp_roce_ext_print(get_cmd_name(cmd_type), res_head.total_block_num,
|
||||||
|
+ reg.offset, reg.data);
|
||||||
|
+
|
||||||
|
+ hikp_roce_ext_reg_data_free(®);
|
||||||
|
+}
|
||||||
|
diff --git a/net/roce/roce_ext_common/hikp_roce_ext_common.h b/net/roce/roce_ext_common/hikp_roce_ext_common.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..1e8063d
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/net/roce/roce_ext_common/hikp_roce_ext_common.h
|
||||||
|
@@ -0,0 +1,52 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2023 Hisilicon Technologies Co., Ltd.
|
||||||
|
+ * Hikptool is licensed under Mulan PSL v2.
|
||||||
|
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
+ * You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
+ * http://license.coscl.org.cn/MulanPSL2
|
||||||
|
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
+ *
|
||||||
|
+ * See the Mulan PSL v2 for more details.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#ifndef __HIKP_ROCE_EXT_COMMON_H__
|
||||||
|
+#define __HIKP_ROCE_EXT_COMMON_H__
|
||||||
|
+
|
||||||
|
+#include "hikp_net_lib.h"
|
||||||
|
+
|
||||||
|
+#define ROCE_MAX_REG_NUM (NET_MAX_REQ_DATA_NUM - 1)
|
||||||
|
+
|
||||||
|
+#define ROCE_HIKP_CAEP_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
+#define ROCE_HIKP_GMV_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
+#define ROCE_HIKP_MDB_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
+#define ROCE_HIKP_PKT_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
+#define ROCE_HIKP_QMM_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
+#define ROCE_HIKP_SCC_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
+#define ROCE_HIKP_TIMER_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
+#define ROCE_HIKP_TRP_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
+#define ROCE_HIKP_TSP_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
+
|
||||||
|
+struct roce_ext_head {
|
||||||
|
+ uint8_t total_block_num;
|
||||||
|
+ uint8_t cur_block_num;
|
||||||
|
+ uint16_t reserved;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+struct roce_ext_res_param {
|
||||||
|
+ struct roce_ext_head head;
|
||||||
|
+ uint32_t reg_data[0];
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+struct reg_data {
|
||||||
|
+ uint32_t *offset;
|
||||||
|
+ uint32_t *data;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+void hikp_roce_ext_execute(struct major_cmd_ctrl *self,
|
||||||
|
+ enum roce_cmd_type cmd_type,
|
||||||
|
+ int (*get_data)(struct hikp_cmd_ret **cmd_ret,
|
||||||
|
+ uint32_t block_id));
|
||||||
|
+
|
||||||
|
+#endif /* __HIKP_ROCE_EXT_COMMON_H__ */
|
||||||
|
diff --git a/net/roce/roce_gmv/hikp_roce_gmv.h b/net/roce/roce_gmv/hikp_roce_gmv.h
|
||||||
|
index 30f37fb..1ef5b93 100644
|
||||||
|
--- a/net/roce/roce_gmv/hikp_roce_gmv.h
|
||||||
|
+++ b/net/roce/roce_gmv/hikp_roce_gmv.h
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
#ifndef __HIKP_ROCE_GMV_H__
|
||||||
|
#define __HIKP_ROCE_GMV_H__
|
||||||
|
|
||||||
|
-#include "hikp_net_lib.h"
|
||||||
|
+#include "hikp_roce_ext_common.h"
|
||||||
|
|
||||||
|
#define ROCE_HIKP_GMV_REG_NUM 7
|
||||||
|
#define ROCE_HIKP_GMV_REG_SWICTH 2
|
||||||
|
diff --git a/net/roce/roce_mdb/hikp_roce_mdb.h b/net/roce/roce_mdb/hikp_roce_mdb.h
|
||||||
|
index 8e7da03..7643dff 100644
|
||||||
|
--- a/net/roce/roce_mdb/hikp_roce_mdb.h
|
||||||
|
+++ b/net/roce/roce_mdb/hikp_roce_mdb.h
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
#ifndef __HIKP_ROCE_MDB_H__
|
||||||
|
#define __HIKP_ROCE_MDB_H__
|
||||||
|
|
||||||
|
-#include "hikp_net_lib.h"
|
||||||
|
+#include "hikp_roce_ext_common.h"
|
||||||
|
|
||||||
|
#define ROCE_HIKP_MDB_REG_NUM 22
|
||||||
|
#define ROCE_HIKP_REG_SWICTH 2
|
||||||
|
diff --git a/net/roce/roce_pkt/hikp_roce_pkt.h b/net/roce/roce_pkt/hikp_roce_pkt.h
|
||||||
|
index 5f438b7..0200c44 100644
|
||||||
|
--- a/net/roce/roce_pkt/hikp_roce_pkt.h
|
||||||
|
+++ b/net/roce/roce_pkt/hikp_roce_pkt.h
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
#ifndef __HIKP_ROCE_PKT_H__
|
||||||
|
#define __HIKP_ROCE_PKT_H__
|
||||||
|
|
||||||
|
-#include "hikp_net_lib.h"
|
||||||
|
+#include "hikp_roce_ext_common.h"
|
||||||
|
|
||||||
|
#define ROCE_HIKP_PKT_REG_NUM 29
|
||||||
|
#define PKT_PER_REG_NUM 2
|
||||||
|
diff --git a/net/roce/roce_qmm/hikp_roce_qmm.h b/net/roce/roce_qmm/hikp_roce_qmm.h
|
||||||
|
index 08cb5d2..0645ab3 100644
|
||||||
|
--- a/net/roce/roce_qmm/hikp_roce_qmm.h
|
||||||
|
+++ b/net/roce/roce_qmm/hikp_roce_qmm.h
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
#ifndef __HIKP_ROCE_QMM_H__
|
||||||
|
#define __HIKP_ROCE_QMM_H__
|
||||||
|
|
||||||
|
-#include "hikp_net_lib.h"
|
||||||
|
+#include "hikp_roce_ext_common.h"
|
||||||
|
|
||||||
|
#define ROCE_HIKP_QMM_REG_NUM 36
|
||||||
|
#define QMM_BANK_NUM 0x7
|
||||||
|
diff --git a/net/roce/roce_scc/hikp_roce_scc.h b/net/roce/roce_scc/hikp_roce_scc.h
|
||||||
|
index de8772e..5d37a11 100644
|
||||||
|
--- a/net/roce/roce_scc/hikp_roce_scc.h
|
||||||
|
+++ b/net/roce/roce_scc/hikp_roce_scc.h
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
#ifndef __HIKP_ROCE_SCC_H__
|
||||||
|
#define __HIKP_ROCE_SCC_H__
|
||||||
|
|
||||||
|
-#include "hikp_net_lib.h"
|
||||||
|
+#include "hikp_roce_ext_common.h"
|
||||||
|
|
||||||
|
#define ROCE_HIKP_SCC_REG_NUM 29
|
||||||
|
#define MAX_SCC_MODULE_NAME_LEN 20
|
||||||
|
diff --git a/net/roce/roce_timer/hikp_roce_timer.h b/net/roce/roce_timer/hikp_roce_timer.h
|
||||||
|
index a4a32b1..7f7deb6 100644
|
||||||
|
--- a/net/roce/roce_timer/hikp_roce_timer.h
|
||||||
|
+++ b/net/roce/roce_timer/hikp_roce_timer.h
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
#ifndef __HIKP_ROCE_TIMER_H__
|
||||||
|
#define __HIKP_ROCE_TIMER_H__
|
||||||
|
|
||||||
|
-#include "hikp_net_lib.h"
|
||||||
|
+#include "hikp_roce_ext_common.h"
|
||||||
|
|
||||||
|
#define ROCE_HIKP_TIMER_REG_NUM 25
|
||||||
|
#define ROCE_TIMER_CMD_CLEAR (1 << 0)
|
||||||
|
diff --git a/net/roce/roce_trp/hikp_roce_trp.h b/net/roce/roce_trp/hikp_roce_trp.h
|
||||||
|
index 80d28af..97f1838 100644
|
||||||
|
--- a/net/roce/roce_trp/hikp_roce_trp.h
|
||||||
|
+++ b/net/roce/roce_trp/hikp_roce_trp.h
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
#ifndef __HIKP_ROCE_TRP_H__
|
||||||
|
#define __HIKP_ROCE_TRP_H__
|
||||||
|
|
||||||
|
-#include "hikp_net_lib.h"
|
||||||
|
+#include "hikp_roce_ext_common.h"
|
||||||
|
|
||||||
|
#define TRP_DIV_NUM_T 4
|
||||||
|
#define ROCE_HIKP_TRP_REG_NUM 29
|
||||||
|
diff --git a/net/roce/roce_tsp/hikp_roce_tsp.h b/net/roce/roce_tsp/hikp_roce_tsp.h
|
||||||
|
index ae864ba..43d0d0d 100644
|
||||||
|
--- a/net/roce/roce_tsp/hikp_roce_tsp.h
|
||||||
|
+++ b/net/roce/roce_tsp/hikp_roce_tsp.h
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
#ifndef __HIKP_ROCE_TSP_H__
|
||||||
|
#define __HIKP_ROCE_TSP_H__
|
||||||
|
|
||||||
|
-#include "hikp_net_lib.h"
|
||||||
|
+#include "hikp_roce_ext_common.h"
|
||||||
|
|
||||||
|
#define ROCE_HIKP_TSP_REG_NUM 29
|
||||||
|
#define TSP_PER_REG_NUM 2
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
179
0040-hikptool-roce-Add-roce_rst-cmd-for-reset-signal-regi.patch
Normal file
179
0040-hikptool-roce-Add-roce_rst-cmd-for-reset-signal-regi.patch
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
From a0ac3e3cd5e94657ee1a58c74037aa6898898c75 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
Date: Fri, 4 Aug 2023 17:25:53 +0800
|
||||||
|
Subject: hikptool/roce: Add roce_rst cmd for reset signal registers query
|
||||||
|
|
||||||
|
Add roce_rst cmd for reset signal registers query.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
hikptool roce_rst -i eth1
|
||||||
|
|
||||||
|
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
---
|
||||||
|
net/hikp_net_lib.h | 1 +
|
||||||
|
.../roce_ext_common/hikp_roce_ext_common.c | 1 +
|
||||||
|
.../roce_ext_common/hikp_roce_ext_common.h | 1 +
|
||||||
|
net/roce/roce_rst/hikp_roce_rst.c | 78 +++++++++++++++++++
|
||||||
|
net/roce/roce_rst/hikp_roce_rst.h | 29 +++++++
|
||||||
|
5 files changed, 110 insertions(+)
|
||||||
|
create mode 100644 net/roce/roce_rst/hikp_roce_rst.c
|
||||||
|
create mode 100644 net/roce/roce_rst/hikp_roce_rst.h
|
||||||
|
|
||||||
|
diff --git a/net/hikp_net_lib.h b/net/hikp_net_lib.h
|
||||||
|
index 21b5357..e60fc15 100644
|
||||||
|
--- a/net/hikp_net_lib.h
|
||||||
|
+++ b/net/hikp_net_lib.h
|
||||||
|
@@ -100,6 +100,7 @@ enum roce_cmd_type {
|
||||||
|
GET_ROCEE_TIMER_CMD,
|
||||||
|
GET_ROCEE_TRP_CMD,
|
||||||
|
GET_ROCEE_TSP_CMD,
|
||||||
|
+ GET_ROCEE_RST_CMD,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ub_cmd_type {
|
||||||
|
diff --git a/net/roce/roce_ext_common/hikp_roce_ext_common.c b/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
index ec47dce..01dded5 100644
|
||||||
|
--- a/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
+++ b/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
@@ -42,6 +42,7 @@ static const struct cmd_type_info {
|
||||||
|
{GET_ROCEE_TIMER_CMD, "TIMER", ROCE_HIKP_TIMER_REG_NUM_EXT},
|
||||||
|
{GET_ROCEE_TRP_CMD, "TRP", ROCE_HIKP_TRP_REG_NUM_EXT},
|
||||||
|
{GET_ROCEE_TSP_CMD, "TSP", ROCE_HIKP_TSP_REG_NUM_EXT},
|
||||||
|
+ {GET_ROCEE_RST_CMD, "RST", ROCE_HIKP_RST_REG_NUM},
|
||||||
|
};
|
||||||
|
|
||||||
|
static int get_cmd_info_table_idx(enum roce_cmd_type cmd_type)
|
||||||
|
diff --git a/net/roce/roce_ext_common/hikp_roce_ext_common.h b/net/roce/roce_ext_common/hikp_roce_ext_common.h
|
||||||
|
index 1e8063d..918712f 100644
|
||||||
|
--- a/net/roce/roce_ext_common/hikp_roce_ext_common.h
|
||||||
|
+++ b/net/roce/roce_ext_common/hikp_roce_ext_common.h
|
||||||
|
@@ -27,6 +27,7 @@
|
||||||
|
#define ROCE_HIKP_TIMER_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
#define ROCE_HIKP_TRP_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
#define ROCE_HIKP_TSP_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
+#define ROCE_HIKP_RST_REG_NUM ROCE_MAX_REG_NUM
|
||||||
|
|
||||||
|
struct roce_ext_head {
|
||||||
|
uint8_t total_block_num;
|
||||||
|
diff --git a/net/roce/roce_rst/hikp_roce_rst.c b/net/roce/roce_rst/hikp_roce_rst.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..ad4dd0c
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/net/roce/roce_rst/hikp_roce_rst.c
|
||||||
|
@@ -0,0 +1,78 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2023 Hisilicon Technologies Co., Ltd.
|
||||||
|
+ * Hikptool is licensed under Mulan PSL v2.
|
||||||
|
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
+ * You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
+ * http://license.coscl.org.cn/MulanPSL2
|
||||||
|
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
+ *
|
||||||
|
+ * See the Mulan PSL v2 for more details.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include "hikp_roce_rst.h"
|
||||||
|
+
|
||||||
|
+static struct cmd_roce_rst_param g_roce_rst_param = { 0 };
|
||||||
|
+
|
||||||
|
+static int hikp_roce_rst_help(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
+{
|
||||||
|
+ printf("\n Usage: %s %s\n", self->cmd_ptr->name, "-i <interface>\n");
|
||||||
|
+ printf("\n %s\n", self->cmd_ptr->help_info);
|
||||||
|
+ printf(" Options:\n\n");
|
||||||
|
+ printf(" %s, %-25s %s\n", "-h", "--help", "display this help and exit");
|
||||||
|
+ printf(" %s, %-25s %s\n", "-i", "--interface=<interface>", "device target, e.g. eth0");
|
||||||
|
+ printf("\n");
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int hikp_roce_rst_target(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
+{
|
||||||
|
+ self->err_no = tool_check_and_get_valid_bdf_id(argv, &(g_roce_rst_param.target));
|
||||||
|
+ if (self->err_no)
|
||||||
|
+ snprintf(self->err_str, sizeof(self->err_str), "Unknown device %s.\n", argv);
|
||||||
|
+
|
||||||
|
+ return self->err_no;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int hikp_roce_rst_get_data(struct hikp_cmd_ret **cmd_ret,
|
||||||
|
+ uint32_t block_id)
|
||||||
|
+{
|
||||||
|
+ struct hikp_cmd_header req_header = { 0 };
|
||||||
|
+ struct roce_rst_req_param req_data;
|
||||||
|
+ uint32_t req_size;
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ req_data.bdf = g_roce_rst_param.target.bdf;
|
||||||
|
+ req_data.block_id = block_id;
|
||||||
|
+
|
||||||
|
+ req_size = sizeof(struct roce_rst_req_param);
|
||||||
|
+ hikp_cmd_init(&req_header, ROCE_MOD, GET_ROCEE_RST_CMD,
|
||||||
|
+ g_roce_rst_param.sub_cmd);
|
||||||
|
+ *cmd_ret = hikp_cmd_alloc(&req_header, &req_data, req_size);
|
||||||
|
+ ret = hikp_rsp_normal_check(*cmd_ret);
|
||||||
|
+ if (ret)
|
||||||
|
+ printf("hikptool roce_rst cmd_ret malloc failed, sub_cmd = %u, ret = %d.\n",
|
||||||
|
+ g_roce_rst_param.sub_cmd, ret);
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void hikp_roce_rst_execute(struct major_cmd_ctrl *self)
|
||||||
|
+{
|
||||||
|
+ hikp_roce_ext_execute(self, GET_ROCEE_RST_CMD, hikp_roce_rst_get_data);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void cmd_roce_rst_init(void)
|
||||||
|
+{
|
||||||
|
+ struct major_cmd_ctrl *major_cmd = get_major_cmd();
|
||||||
|
+
|
||||||
|
+ major_cmd->option_count = 0;
|
||||||
|
+ major_cmd->execute = hikp_roce_rst_execute;
|
||||||
|
+
|
||||||
|
+ cmd_option_register("-h", "--help", false, hikp_roce_rst_help);
|
||||||
|
+ cmd_option_register("-i", "--interface", true, hikp_roce_rst_target);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+HIKP_CMD_DECLARE("roce_rst", "get roce_rst registers information", cmd_roce_rst_init);
|
||||||
|
diff --git a/net/roce/roce_rst/hikp_roce_rst.h b/net/roce/roce_rst/hikp_roce_rst.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..731effc
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/net/roce/roce_rst/hikp_roce_rst.h
|
||||||
|
@@ -0,0 +1,29 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2023 Hisilicon Technologies Co., Ltd.
|
||||||
|
+ * Hikptool is licensed under Mulan PSL v2.
|
||||||
|
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
+ * You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
+ * http://license.coscl.org.cn/MulanPSL2
|
||||||
|
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
+ *
|
||||||
|
+ * See the Mulan PSL v2 for more details.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#ifndef __HIKP_ROCE_RST_H__
|
||||||
|
+#define __HIKP_ROCE_RST_H__
|
||||||
|
+
|
||||||
|
+#include "hikp_roce_ext_common.h"
|
||||||
|
+
|
||||||
|
+struct cmd_roce_rst_param {
|
||||||
|
+ struct tool_target target;
|
||||||
|
+ uint32_t sub_cmd;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+struct roce_rst_req_param {
|
||||||
|
+ struct bdf_t bdf;
|
||||||
|
+ uint32_t block_id;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+#endif /* __HIKP_ROCE_RST_H__ */
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
210
0041-hikptool-roce-Add-roce_global_cfg-cmd-for-global-con.patch
Normal file
210
0041-hikptool-roce-Add-roce_global_cfg-cmd-for-global-con.patch
Normal file
@ -0,0 +1,210 @@
|
|||||||
|
From 36ba114387e6b262d5a55b397a47e63fd0e75d0a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
Date: Wed, 2 Aug 2023 16:12:49 +0800
|
||||||
|
Subject: hikptool/roce: Add roce_global_cfg cmd for global config registers
|
||||||
|
query
|
||||||
|
|
||||||
|
Add roce_global_cfg cmd for global config registers query
|
||||||
|
|
||||||
|
Example:
|
||||||
|
hikptool roce_global_cfg -i eth1
|
||||||
|
|
||||||
|
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
---
|
||||||
|
net/hikp_net_lib.h | 1 +
|
||||||
|
.../roce_ext_common/hikp_roce_ext_common.c | 1 +
|
||||||
|
.../roce_ext_common/hikp_roce_ext_common.h | 1 +
|
||||||
|
.../roce_global_cfg/hikp_roce_global_cfg.c | 97 +++++++++++++++++++
|
||||||
|
.../roce_global_cfg/hikp_roce_global_cfg.h | 40 ++++++++
|
||||||
|
5 files changed, 140 insertions(+)
|
||||||
|
create mode 100644 net/roce/roce_global_cfg/hikp_roce_global_cfg.c
|
||||||
|
create mode 100644 net/roce/roce_global_cfg/hikp_roce_global_cfg.h
|
||||||
|
|
||||||
|
diff --git a/net/hikp_net_lib.h b/net/hikp_net_lib.h
|
||||||
|
index e60fc15..bdaacb1 100644
|
||||||
|
--- a/net/hikp_net_lib.h
|
||||||
|
+++ b/net/hikp_net_lib.h
|
||||||
|
@@ -101,6 +101,7 @@ enum roce_cmd_type {
|
||||||
|
GET_ROCEE_TRP_CMD,
|
||||||
|
GET_ROCEE_TSP_CMD,
|
||||||
|
GET_ROCEE_RST_CMD,
|
||||||
|
+ GET_ROCEE_GLOBAL_CFG_CMD,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ub_cmd_type {
|
||||||
|
diff --git a/net/roce/roce_ext_common/hikp_roce_ext_common.c b/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
index 01dded5..0ff07dc 100644
|
||||||
|
--- a/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
+++ b/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
@@ -43,6 +43,7 @@ static const struct cmd_type_info {
|
||||||
|
{GET_ROCEE_TRP_CMD, "TRP", ROCE_HIKP_TRP_REG_NUM_EXT},
|
||||||
|
{GET_ROCEE_TSP_CMD, "TSP", ROCE_HIKP_TSP_REG_NUM_EXT},
|
||||||
|
{GET_ROCEE_RST_CMD, "RST", ROCE_HIKP_RST_REG_NUM},
|
||||||
|
+ {GET_ROCEE_GLOBAL_CFG_CMD, "GLOBAL_CFG", ROCE_HIKP_GLOBAL_CFG_REG_NUM},
|
||||||
|
};
|
||||||
|
|
||||||
|
static int get_cmd_info_table_idx(enum roce_cmd_type cmd_type)
|
||||||
|
diff --git a/net/roce/roce_ext_common/hikp_roce_ext_common.h b/net/roce/roce_ext_common/hikp_roce_ext_common.h
|
||||||
|
index 918712f..870a361 100644
|
||||||
|
--- a/net/roce/roce_ext_common/hikp_roce_ext_common.h
|
||||||
|
+++ b/net/roce/roce_ext_common/hikp_roce_ext_common.h
|
||||||
|
@@ -28,6 +28,7 @@
|
||||||
|
#define ROCE_HIKP_TRP_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
#define ROCE_HIKP_TSP_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
#define ROCE_HIKP_RST_REG_NUM ROCE_MAX_REG_NUM
|
||||||
|
+#define ROCE_HIKP_GLOBAL_CFG_REG_NUM ROCE_MAX_REG_NUM
|
||||||
|
|
||||||
|
struct roce_ext_head {
|
||||||
|
uint8_t total_block_num;
|
||||||
|
diff --git a/net/roce/roce_global_cfg/hikp_roce_global_cfg.c b/net/roce/roce_global_cfg/hikp_roce_global_cfg.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..49a4a2c
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/net/roce/roce_global_cfg/hikp_roce_global_cfg.c
|
||||||
|
@@ -0,0 +1,97 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2023 Hisilicon Technologies Co., Ltd.
|
||||||
|
+ * Hikptool is licensed under Mulan PSL v2.
|
||||||
|
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
+ * You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
+ * http://license.coscl.org.cn/MulanPSL2
|
||||||
|
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
+ *
|
||||||
|
+ * See the Mulan PSL v2 for more details.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include "hikp_roce_global_cfg.h"
|
||||||
|
+
|
||||||
|
+static struct cmd_roce_global_cfg_param g_roce_global_cfg_param = { 0 };
|
||||||
|
+
|
||||||
|
+static int hikp_roce_global_cfg_help(struct major_cmd_ctrl *self,
|
||||||
|
+ const char *argv)
|
||||||
|
+{
|
||||||
|
+ printf("\n Usage: %s %s\n", self->cmd_ptr->name, "-i <interface>\n");
|
||||||
|
+ printf("\n %s\n", self->cmd_ptr->help_info);
|
||||||
|
+ printf(" Options:\n\n");
|
||||||
|
+ printf(" %s, %-25s %s\n", "-h", "--help", "display this help and exit");
|
||||||
|
+ printf(" %s, %-25s %s\n", "-i", "--interface=<interface>", "device target, e.g. eth0");
|
||||||
|
+ printf("\n");
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int hikp_roce_global_cfg_target(struct major_cmd_ctrl *self,
|
||||||
|
+ const char *argv)
|
||||||
|
+{
|
||||||
|
+ self->err_no = tool_check_and_get_valid_bdf_id(argv, &(g_roce_global_cfg_param.target));
|
||||||
|
+ if (self->err_no)
|
||||||
|
+ snprintf(self->err_str, sizeof(self->err_str),
|
||||||
|
+ "Unknown device %s.\n", argv);
|
||||||
|
+
|
||||||
|
+ return self->err_no;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int hikp_roce_global_cfg_get_data(struct hikp_cmd_ret **cmd_ret,
|
||||||
|
+ uint32_t block_id)
|
||||||
|
+{
|
||||||
|
+ struct hikp_cmd_header req_header = { 0 };
|
||||||
|
+ struct roce_global_cfg_req_param req_data;
|
||||||
|
+ uint32_t req_size;
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ req_data.bdf = g_roce_global_cfg_param.target.bdf;
|
||||||
|
+ req_data.block_id = block_id;
|
||||||
|
+
|
||||||
|
+ req_size = sizeof(struct roce_global_cfg_req_param);
|
||||||
|
+ hikp_cmd_init(&req_header, ROCE_MOD, GET_ROCEE_GLOBAL_CFG_CMD,
|
||||||
|
+ g_roce_global_cfg_param.sub_cmd);
|
||||||
|
+ *cmd_ret = hikp_cmd_alloc(&req_header, &req_data, req_size);
|
||||||
|
+ ret = hikp_rsp_normal_check(*cmd_ret);
|
||||||
|
+ if (ret)
|
||||||
|
+ printf("hikptool roce_global_cfg cmd_ret malloc failed, sub_cmd = %u, ret = %d.\n",
|
||||||
|
+ g_roce_global_cfg_param.sub_cmd, ret);
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void hikp_roce_global_cfg_execute(struct major_cmd_ctrl *self)
|
||||||
|
+{
|
||||||
|
+ enum roce_global_cfg_cmd_type sub_cmds[] = {
|
||||||
|
+ ROCE_GLB_GENAC,
|
||||||
|
+ ROCE_GLB_TRP_BANK,
|
||||||
|
+ ROCE_GLB_TRP_RX,
|
||||||
|
+ ROCE_GLB_TPP_M,
|
||||||
|
+ ROCE_GLB_QMM,
|
||||||
|
+ ROCE_GLB_TGP_TMP,
|
||||||
|
+ ROCE_GLB_TDP_M,
|
||||||
|
+ ROCE_GLB_NICL,
|
||||||
|
+ };
|
||||||
|
+ int i;
|
||||||
|
+
|
||||||
|
+ for (i = 0; i < HIKP_ARRAY_SIZE(sub_cmds); i++) {
|
||||||
|
+ g_roce_global_cfg_param.sub_cmd = sub_cmds[i];
|
||||||
|
+ hikp_roce_ext_execute(self, GET_ROCEE_GLOBAL_CFG_CMD,
|
||||||
|
+ hikp_roce_global_cfg_get_data);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void cmd_roce_global_cfg_init(void)
|
||||||
|
+{
|
||||||
|
+ struct major_cmd_ctrl *major_cmd = get_major_cmd();
|
||||||
|
+
|
||||||
|
+ major_cmd->option_count = 0;
|
||||||
|
+ major_cmd->execute = hikp_roce_global_cfg_execute;
|
||||||
|
+
|
||||||
|
+ cmd_option_register("-h", "--help", false, hikp_roce_global_cfg_help);
|
||||||
|
+ cmd_option_register("-i", "--interface", true, hikp_roce_global_cfg_target);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+HIKP_CMD_DECLARE("roce_global_cfg", "get roce_global_cfg registers information", cmd_roce_global_cfg_init);
|
||||||
|
diff --git a/net/roce/roce_global_cfg/hikp_roce_global_cfg.h b/net/roce/roce_global_cfg/hikp_roce_global_cfg.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..66e7fb8
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/net/roce/roce_global_cfg/hikp_roce_global_cfg.h
|
||||||
|
@@ -0,0 +1,40 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2023 Hisilicon Technologies Co., Ltd.
|
||||||
|
+ * Hikptool is licensed under Mulan PSL v2.
|
||||||
|
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
+ * You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
+ * http://license.coscl.org.cn/MulanPSL2
|
||||||
|
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
+ *
|
||||||
|
+ * See the Mulan PSL v2 for more details.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#ifndef __HIKP_ROCE_GLOBAL_CFG_H__
|
||||||
|
+#define __HIKP_ROCE_GLOBAL_CFG_H__
|
||||||
|
+
|
||||||
|
+#include "hikp_roce_ext_common.h"
|
||||||
|
+
|
||||||
|
+struct cmd_roce_global_cfg_param {
|
||||||
|
+ struct tool_target target;
|
||||||
|
+ uint32_t sub_cmd;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+struct roce_global_cfg_req_param {
|
||||||
|
+ struct bdf_t bdf;
|
||||||
|
+ uint32_t block_id;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+enum roce_global_cfg_cmd_type {
|
||||||
|
+ ROCE_GLB_GENAC = 0,
|
||||||
|
+ ROCE_GLB_TRP_BANK,
|
||||||
|
+ ROCE_GLB_TRP_RX,
|
||||||
|
+ ROCE_GLB_TPP_M,
|
||||||
|
+ ROCE_GLB_QMM,
|
||||||
|
+ ROCE_GLB_TGP_TMP,
|
||||||
|
+ ROCE_GLB_TDP_M,
|
||||||
|
+ ROCE_GLB_NICL,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+#endif /* __HIKP_ROCE_GLOBAL_CFG_H__ */
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
179
0042-hikptool-roce-Add-roce_bond-cmd-for-bond-registers-q.patch
Normal file
179
0042-hikptool-roce-Add-roce_bond-cmd-for-bond-registers-q.patch
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
From 7f0a2e3f2dff9b49ce5be8b07835fa7c791cdce1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
Date: Wed, 2 Aug 2023 16:17:40 +0800
|
||||||
|
Subject: hikptool/roce: Add roce_bond cmd for bond registers query
|
||||||
|
|
||||||
|
Add roce_bond cmd for bond registers query.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
hikptool roce_bond -i eth1
|
||||||
|
|
||||||
|
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
---
|
||||||
|
net/hikp_net_lib.h | 1 +
|
||||||
|
net/roce/roce_bond/hikp_roce_bond.c | 78 +++++++++++++++++++
|
||||||
|
net/roce/roce_bond/hikp_roce_bond.h | 29 +++++++
|
||||||
|
.../roce_ext_common/hikp_roce_ext_common.c | 1 +
|
||||||
|
.../roce_ext_common/hikp_roce_ext_common.h | 1 +
|
||||||
|
5 files changed, 110 insertions(+)
|
||||||
|
create mode 100644 net/roce/roce_bond/hikp_roce_bond.c
|
||||||
|
create mode 100644 net/roce/roce_bond/hikp_roce_bond.h
|
||||||
|
|
||||||
|
diff --git a/net/hikp_net_lib.h b/net/hikp_net_lib.h
|
||||||
|
index bdaacb1..ad9e7e4 100644
|
||||||
|
--- a/net/hikp_net_lib.h
|
||||||
|
+++ b/net/hikp_net_lib.h
|
||||||
|
@@ -102,6 +102,7 @@ enum roce_cmd_type {
|
||||||
|
GET_ROCEE_TSP_CMD,
|
||||||
|
GET_ROCEE_RST_CMD,
|
||||||
|
GET_ROCEE_GLOBAL_CFG_CMD,
|
||||||
|
+ GET_ROCEE_BOND_CMD,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ub_cmd_type {
|
||||||
|
diff --git a/net/roce/roce_bond/hikp_roce_bond.c b/net/roce/roce_bond/hikp_roce_bond.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..89f8bab
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/net/roce/roce_bond/hikp_roce_bond.c
|
||||||
|
@@ -0,0 +1,78 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2023 Hisilicon Technologies Co., Ltd.
|
||||||
|
+ * Hikptool is licensed under Mulan PSL v2.
|
||||||
|
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
+ * You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
+ * http://license.coscl.org.cn/MulanPSL2
|
||||||
|
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
+ *
|
||||||
|
+ * See the Mulan PSL v2 for more details.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include "hikp_roce_bond.h"
|
||||||
|
+
|
||||||
|
+static struct cmd_roce_bond_param g_roce_bond_param = { 0 };
|
||||||
|
+
|
||||||
|
+static int hikp_roce_bond_help(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
+{
|
||||||
|
+ printf("\n Usage: %s %s\n", self->cmd_ptr->name, "-i <interface>\n");
|
||||||
|
+ printf("\n %s\n", self->cmd_ptr->help_info);
|
||||||
|
+ printf(" Options:\n\n");
|
||||||
|
+ printf(" %s, %-25s %s\n", "-h", "--help", "display this help and exit");
|
||||||
|
+ printf(" %s, %-25s %s\n", "-i", "--interface=<interface>", "device target, e.g. eth0");
|
||||||
|
+ printf("\n");
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int hikp_roce_bond_target(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
+{
|
||||||
|
+ self->err_no = tool_check_and_get_valid_bdf_id(argv, &(g_roce_bond_param.target));
|
||||||
|
+ if (self->err_no)
|
||||||
|
+ snprintf(self->err_str, sizeof(self->err_str), "Unknown device %s.\n", argv);
|
||||||
|
+
|
||||||
|
+ return self->err_no;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int hikp_roce_bond_get_data(struct hikp_cmd_ret **cmd_ret,
|
||||||
|
+ uint32_t block_id)
|
||||||
|
+{
|
||||||
|
+ struct hikp_cmd_header req_header = { 0 };
|
||||||
|
+ struct roce_bond_req_param req_data;
|
||||||
|
+ uint32_t req_size;
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ req_data.bdf = g_roce_bond_param.target.bdf;
|
||||||
|
+ req_data.block_id = block_id;
|
||||||
|
+
|
||||||
|
+ req_size = sizeof(struct roce_bond_req_param);
|
||||||
|
+ hikp_cmd_init(&req_header, ROCE_MOD, GET_ROCEE_BOND_CMD,
|
||||||
|
+ g_roce_bond_param.sub_cmd);
|
||||||
|
+ *cmd_ret = hikp_cmd_alloc(&req_header, &req_data, req_size);
|
||||||
|
+ ret = hikp_rsp_normal_check(*cmd_ret);
|
||||||
|
+ if (ret)
|
||||||
|
+ printf("hikptool roce_bond cmd_ret malloc failed, sub_cmd = %u, ret = %d.\n",
|
||||||
|
+ g_roce_bond_param.sub_cmd, ret);
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void hikp_roce_bond_execute(struct major_cmd_ctrl *self)
|
||||||
|
+{
|
||||||
|
+ hikp_roce_ext_execute(self, GET_ROCEE_BOND_CMD, hikp_roce_bond_get_data);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void cmd_roce_bond_init(void)
|
||||||
|
+{
|
||||||
|
+ struct major_cmd_ctrl *major_cmd = get_major_cmd();
|
||||||
|
+
|
||||||
|
+ major_cmd->option_count = 0;
|
||||||
|
+ major_cmd->execute = hikp_roce_bond_execute;
|
||||||
|
+
|
||||||
|
+ cmd_option_register("-h", "--help", false, hikp_roce_bond_help);
|
||||||
|
+ cmd_option_register("-i", "--interface", true, hikp_roce_bond_target);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+HIKP_CMD_DECLARE("roce_bond", "get roce_bond registers information", cmd_roce_bond_init);
|
||||||
|
diff --git a/net/roce/roce_bond/hikp_roce_bond.h b/net/roce/roce_bond/hikp_roce_bond.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..14bd233
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/net/roce/roce_bond/hikp_roce_bond.h
|
||||||
|
@@ -0,0 +1,29 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2023 Hisilicon Technologies Co., Ltd.
|
||||||
|
+ * Hikptool is licensed under Mulan PSL v2.
|
||||||
|
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
+ * You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
+ * http://license.coscl.org.cn/MulanPSL2
|
||||||
|
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
+ *
|
||||||
|
+ * See the Mulan PSL v2 for more details.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#ifndef __HIKP_ROCE_BOND_H__
|
||||||
|
+#define __HIKP_ROCE_BOND_H__
|
||||||
|
+
|
||||||
|
+#include "hikp_roce_ext_common.h"
|
||||||
|
+
|
||||||
|
+struct cmd_roce_bond_param {
|
||||||
|
+ struct tool_target target;
|
||||||
|
+ uint32_t sub_cmd;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+struct roce_bond_req_param {
|
||||||
|
+ struct bdf_t bdf;
|
||||||
|
+ uint32_t block_id;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+#endif /* __HIKP_ROCE_BOND_H__ */
|
||||||
|
diff --git a/net/roce/roce_ext_common/hikp_roce_ext_common.c b/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
index 0ff07dc..d0fae69 100644
|
||||||
|
--- a/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
+++ b/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
@@ -44,6 +44,7 @@ static const struct cmd_type_info {
|
||||||
|
{GET_ROCEE_TSP_CMD, "TSP", ROCE_HIKP_TSP_REG_NUM_EXT},
|
||||||
|
{GET_ROCEE_RST_CMD, "RST", ROCE_HIKP_RST_REG_NUM},
|
||||||
|
{GET_ROCEE_GLOBAL_CFG_CMD, "GLOBAL_CFG", ROCE_HIKP_GLOBAL_CFG_REG_NUM},
|
||||||
|
+ {GET_ROCEE_BOND_CMD, "BOND", ROCE_HIKP_BOND_REG_NUM},
|
||||||
|
};
|
||||||
|
|
||||||
|
static int get_cmd_info_table_idx(enum roce_cmd_type cmd_type)
|
||||||
|
diff --git a/net/roce/roce_ext_common/hikp_roce_ext_common.h b/net/roce/roce_ext_common/hikp_roce_ext_common.h
|
||||||
|
index 870a361..a600449 100644
|
||||||
|
--- a/net/roce/roce_ext_common/hikp_roce_ext_common.h
|
||||||
|
+++ b/net/roce/roce_ext_common/hikp_roce_ext_common.h
|
||||||
|
@@ -29,6 +29,7 @@
|
||||||
|
#define ROCE_HIKP_TSP_REG_NUM_EXT ROCE_MAX_REG_NUM
|
||||||
|
#define ROCE_HIKP_RST_REG_NUM ROCE_MAX_REG_NUM
|
||||||
|
#define ROCE_HIKP_GLOBAL_CFG_REG_NUM ROCE_MAX_REG_NUM
|
||||||
|
+#define ROCE_HIKP_BOND_REG_NUM ROCE_MAX_REG_NUM
|
||||||
|
|
||||||
|
struct roce_ext_head {
|
||||||
|
uint8_t total_block_num;
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
174
0043-hikptool-roce-Add-ext-query-for-roce_caep-cmd.patch
Normal file
174
0043-hikptool-roce-Add-ext-query-for-roce_caep-cmd.patch
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
From 80d9d76b7d5af23e58d13569bd1898604c8e2456 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
Date: Tue, 1 Aug 2023 17:41:24 +0800
|
||||||
|
Subject: hikptool/roce: Add ext query for roce_caep cmd
|
||||||
|
|
||||||
|
Add ext query for roce_caep cmd. To query these ext registers, add
|
||||||
|
-e to the query cmd.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
hikptool roce_caep -i eth1 -e
|
||||||
|
|
||||||
|
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
---
|
||||||
|
net/roce/roce_caep/hikp_roce_caep.c | 69 +++++++++++++++++++----------
|
||||||
|
net/roce/roce_caep/hikp_roce_caep.h | 11 +++++
|
||||||
|
2 files changed, 57 insertions(+), 23 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/net/roce/roce_caep/hikp_roce_caep.c b/net/roce/roce_caep/hikp_roce_caep.c
|
||||||
|
index 69a4742..6c92ea1 100644
|
||||||
|
--- a/net/roce/roce_caep/hikp_roce_caep.c
|
||||||
|
+++ b/net/roce/roce_caep/hikp_roce_caep.c
|
||||||
|
@@ -22,6 +22,7 @@ static int hikp_roce_caep_help(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
printf(" Options:\n\n");
|
||||||
|
printf(" %s, %-25s %s\n", "-h", "--help", "display this help and exit");
|
||||||
|
printf(" %s, %-25s %s\n", "-i", "--interface=<interface>", "device target, e.g. eth0");
|
||||||
|
+ printf(" %s, %-25s %s\n", "-e", "--extend", "query extend caep registers");
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
@@ -31,7 +32,7 @@ static int hikp_roce_caep_target(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
{
|
||||||
|
self->err_no = tool_check_and_get_valid_bdf_id(argv, &(g_roce_caep_param_t.target));
|
||||||
|
if (self->err_no != 0) {
|
||||||
|
- snprintf(self->err_str, sizeof(self->err_str), "Unknown device %s.", argv);
|
||||||
|
+ snprintf(self->err_str, sizeof(self->err_str), "Unknown device %s.\n", argv);
|
||||||
|
return self->err_no;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -39,18 +40,28 @@ static int hikp_roce_caep_target(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
}
|
||||||
|
|
||||||
|
static int hikp_roce_caep_get_data(struct hikp_cmd_ret **cmd_ret,
|
||||||
|
- struct roce_caep_req_param req_data)
|
||||||
|
+ uint32_t block_id)
|
||||||
|
{
|
||||||
|
+ struct roce_caep_req_param_ext req_data_ext;
|
||||||
|
struct hikp_cmd_header req_header = { 0 };
|
||||||
|
+ uint32_t req_size;
|
||||||
|
+ int ret;
|
||||||
|
|
||||||
|
- hikp_cmd_init(&req_header, ROCE_MOD, GET_ROCEE_CAEP_CMD, 0);
|
||||||
|
- *cmd_ret = hikp_cmd_alloc(&req_header, &req_data, sizeof(req_data));
|
||||||
|
- if (*cmd_ret == NULL) {
|
||||||
|
- printf("hikptool roce_caep cmd_ret malloc failed\n");
|
||||||
|
- return -EIO;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- return 0;
|
||||||
|
+ req_data_ext.origin_param.bdf = g_roce_caep_param_t.target.bdf;
|
||||||
|
+ req_data_ext.block_id = block_id;
|
||||||
|
+
|
||||||
|
+ req_size = (g_roce_caep_param_t.sub_cmd == CAEP_ORIGIN) ?
|
||||||
|
+ sizeof(struct roce_caep_req_param) :
|
||||||
|
+ sizeof(struct roce_caep_req_param_ext);
|
||||||
|
+ hikp_cmd_init(&req_header, ROCE_MOD, GET_ROCEE_CAEP_CMD,
|
||||||
|
+ g_roce_caep_param_t.sub_cmd);
|
||||||
|
+ *cmd_ret = hikp_cmd_alloc(&req_header, &req_data_ext, req_size);
|
||||||
|
+ ret = hikp_rsp_normal_check(*cmd_ret);
|
||||||
|
+ if (ret)
|
||||||
|
+ printf("hikptool roce_caep cmd_ret malloc failed, sub_cmd = %u, ret = %d.\n",
|
||||||
|
+ g_roce_caep_param_t.sub_cmd, ret);
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void hikp_roce_caep_print(uint32_t total_block_num,
|
||||||
|
@@ -64,29 +75,40 @@ static void hikp_roce_caep_print(uint32_t total_block_num,
|
||||||
|
printf("************************************\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void hikp_roce_caep_execute(struct major_cmd_ctrl *self)
|
||||||
|
+static void hikp_roce_caep_execute_origin(struct major_cmd_ctrl *self)
|
||||||
|
{
|
||||||
|
struct roce_caep_res_param *roce_caep_res;
|
||||||
|
- struct roce_caep_req_param req_data;
|
||||||
|
struct hikp_cmd_ret *cmd_ret;
|
||||||
|
- int ret;
|
||||||
|
|
||||||
|
- req_data.bdf = g_roce_caep_param_t.target.bdf;
|
||||||
|
- ret = hikp_roce_caep_get_data(&cmd_ret, req_data);
|
||||||
|
- if (ret < 0) {
|
||||||
|
- self->err_no = ret;
|
||||||
|
- return;
|
||||||
|
- } else if (cmd_ret->status != 0) {
|
||||||
|
- printf("hikptool roce_caep read data failed\n");
|
||||||
|
+ self->err_no = hikp_roce_caep_get_data(&cmd_ret, 0);
|
||||||
|
+ if (self->err_no) {
|
||||||
|
+ printf("hikptool roce_caep get data failed.\n");
|
||||||
|
goto exec_error;
|
||||||
|
}
|
||||||
|
roce_caep_res = (struct roce_caep_res_param *)cmd_ret->rsp_data;
|
||||||
|
hikp_roce_caep_print(roce_caep_res->total_block_num,
|
||||||
|
- roce_caep_res->reg_data.offset, roce_caep_res->reg_data.data);
|
||||||
|
+ roce_caep_res->reg_data.offset,
|
||||||
|
+ roce_caep_res->reg_data.data);
|
||||||
|
|
||||||
|
exec_error:
|
||||||
|
- free(cmd_ret);
|
||||||
|
- cmd_ret = NULL;
|
||||||
|
+ if (cmd_ret)
|
||||||
|
+ free(cmd_ret);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void hikp_roce_caep_execute(struct major_cmd_ctrl *self)
|
||||||
|
+{
|
||||||
|
+ if (g_roce_caep_param_t.sub_cmd == CAEP_ORIGIN)
|
||||||
|
+ hikp_roce_caep_execute_origin(self);
|
||||||
|
+ else
|
||||||
|
+ hikp_roce_ext_execute(self, GET_ROCEE_CAEP_CMD,
|
||||||
|
+ hikp_roce_caep_get_data);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int hikp_roce_caep_ext_set(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
+{
|
||||||
|
+ g_roce_caep_param_t.sub_cmd = CAEP_EXT;
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void cmd_roce_caep_init(void)
|
||||||
|
@@ -98,6 +120,7 @@ static void cmd_roce_caep_init(void)
|
||||||
|
|
||||||
|
cmd_option_register("-h", "--help", false, hikp_roce_caep_help);
|
||||||
|
cmd_option_register("-i", "--interface", true, hikp_roce_caep_target);
|
||||||
|
+ cmd_option_register("-e", "--extend", false, hikp_roce_caep_ext_set);
|
||||||
|
}
|
||||||
|
|
||||||
|
HIKP_CMD_DECLARE("roce_caep", "get roce_caep registers information", cmd_roce_caep_init);
|
||||||
|
diff --git a/net/roce/roce_caep/hikp_roce_caep.h b/net/roce/roce_caep/hikp_roce_caep.h
|
||||||
|
index 804d2df..547a4d6 100644
|
||||||
|
--- a/net/roce/roce_caep/hikp_roce_caep.h
|
||||||
|
+++ b/net/roce/roce_caep/hikp_roce_caep.h
|
||||||
|
@@ -21,12 +21,18 @@
|
||||||
|
|
||||||
|
struct cmd_roce_caep_param_t {
|
||||||
|
struct tool_target target;
|
||||||
|
+ uint32_t sub_cmd;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct roce_caep_req_param {
|
||||||
|
struct bdf_t bdf;
|
||||||
|
};
|
||||||
|
|
||||||
|
+struct roce_caep_req_param_ext {
|
||||||
|
+ struct roce_caep_req_param origin_param;
|
||||||
|
+ uint32_t block_id;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
struct roce_caep_res {
|
||||||
|
uint32_t offset[ROCE_HIKP_CAEP_REG_NUM];
|
||||||
|
uint32_t data[ROCE_HIKP_CAEP_REG_NUM];
|
||||||
|
@@ -37,4 +43,9 @@ struct roce_caep_res_param {
|
||||||
|
struct roce_caep_res reg_data;
|
||||||
|
};
|
||||||
|
|
||||||
|
+enum roce_caep_cmd_type {
|
||||||
|
+ CAEP_ORIGIN = 0,
|
||||||
|
+ CAEP_EXT,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
#endif /* __HIKP_ROCE_CAEP_H__ */
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
210
0044-hikptool-roce-Add-ext-query-for-roce_mdb-cmd.patch
Normal file
210
0044-hikptool-roce-Add-ext-query-for-roce_mdb-cmd.patch
Normal file
@ -0,0 +1,210 @@
|
|||||||
|
From b949611a7a302743916155adee01db0c73c0f8e7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
Date: Fri, 4 Aug 2023 17:25:23 +0800
|
||||||
|
Subject: hikptool/roce: Add ext query for roce_mdb cmd
|
||||||
|
|
||||||
|
Add ext query for roce_mdb cmd. To query these ext registers, add
|
||||||
|
-e to the query cmd.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
hikptool roce_mdb -i eth1 -e
|
||||||
|
|
||||||
|
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
---
|
||||||
|
net/roce/roce_mdb/hikp_roce_mdb.c | 83 ++++++++++++++++++++-----------
|
||||||
|
net/roce/roce_mdb/hikp_roce_mdb.h | 13 ++++-
|
||||||
|
2 files changed, 67 insertions(+), 29 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/net/roce/roce_mdb/hikp_roce_mdb.c b/net/roce/roce_mdb/hikp_roce_mdb.c
|
||||||
|
index 9cc07a1..04af817 100644
|
||||||
|
--- a/net/roce/roce_mdb/hikp_roce_mdb.c
|
||||||
|
+++ b/net/roce/roce_mdb/hikp_roce_mdb.c
|
||||||
|
@@ -14,7 +14,6 @@
|
||||||
|
#include <unistd.h>
|
||||||
|
#include "hikp_roce_mdb.h"
|
||||||
|
|
||||||
|
-#define ROCE_MDB_CMD_CLEAR HI_BIT(0)
|
||||||
|
static struct cmd_roce_mdb_param g_roce_mdb_param = { 0 };
|
||||||
|
|
||||||
|
static int hikp_roce_mdb_help(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
@@ -25,6 +24,7 @@ static int hikp_roce_mdb_help(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
printf(" %s, %-25s %s\n", "-h", "--help", "display this help and exit");
|
||||||
|
printf(" %s, %-25s %s\n", "-i", "--interface=<interface>", "device target, e.g. eth0");
|
||||||
|
printf(" %s, %-25s %s\n", "-c", "--clear=<clear>", "clear mdb registers");
|
||||||
|
+ printf(" %s, %-25s %s\n", "-e", "--extend", "query extend mdb registers");
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
@@ -34,7 +34,7 @@ static int hikp_roce_mdb_target(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
{
|
||||||
|
self->err_no = tool_check_and_get_valid_bdf_id(argv, &(g_roce_mdb_param.target));
|
||||||
|
if (self->err_no) {
|
||||||
|
- snprintf(self->err_str, sizeof(self->err_str), "Unknown device %s.", argv);
|
||||||
|
+ snprintf(self->err_str, sizeof(self->err_str), "Unknown device %s.\n", argv);
|
||||||
|
return self->err_no;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -43,7 +43,8 @@ static int hikp_roce_mdb_target(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
|
||||||
|
static int hikp_roce_mdb_clear_set(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
{
|
||||||
|
- g_roce_mdb_param.reset_flag = ROCE_MDB_CMD_CLEAR;
|
||||||
|
+ g_roce_mdb_param.flag |= ROCE_MDB_CMD_CLEAR;
|
||||||
|
+
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -58,53 +59,78 @@ static void hikp_roce_mdb_print(uint32_t reg_num, struct roce_mdb_rsp_data *mdb_
|
||||||
|
printf("***********************************\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int hikp_roce_mdb_show(struct major_cmd_ctrl *self)
|
||||||
|
+static int hikp_roce_mdb_get_data(struct hikp_cmd_ret **cmd_ret,
|
||||||
|
+ uint32_t block_id)
|
||||||
|
{
|
||||||
|
- struct roce_mdb_req_para req_data = { 0 };
|
||||||
|
- struct roce_mdb_rsp_data *mdb_rsp = NULL;
|
||||||
|
+ struct roce_mdb_req_param_ext req_data_ext;
|
||||||
|
struct hikp_cmd_header req_header = { 0 };
|
||||||
|
+ uint32_t req_size;
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ req_data_ext.origin_param.bdf = g_roce_mdb_param.target.bdf;
|
||||||
|
+ req_data_ext.block_id = block_id;
|
||||||
|
+
|
||||||
|
+ req_size = (g_roce_mdb_param.flag & ROCE_MDB_CMD_EXT) ?
|
||||||
|
+ sizeof(struct roce_mdb_req_param_ext) :
|
||||||
|
+ sizeof(struct roce_mdb_req_para);
|
||||||
|
+ hikp_cmd_init(&req_header, ROCE_MOD, GET_ROCEE_MDB_CMD,
|
||||||
|
+ g_roce_mdb_param.sub_cmd);
|
||||||
|
+ *cmd_ret = hikp_cmd_alloc(&req_header, &req_data_ext, req_size);
|
||||||
|
+ ret = hikp_rsp_normal_check(*cmd_ret);
|
||||||
|
+ if (ret)
|
||||||
|
+ printf("hikptool roce_mdb cmd_ret malloc failed, sub_cmd = %u, ret = %d.\n",
|
||||||
|
+ g_roce_mdb_param.sub_cmd, ret);
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void hikp_roce_mdb_execute_origin(struct major_cmd_ctrl *self)
|
||||||
|
+{
|
||||||
|
+ struct roce_mdb_rsp_data *mdb_rsp = NULL;
|
||||||
|
struct hikp_cmd_ret *cmd_ret = NULL;
|
||||||
|
uint32_t reg_num;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
- req_data.bdf = g_roce_mdb_param.target.bdf;
|
||||||
|
- if (g_roce_mdb_param.reset_flag)
|
||||||
|
- hikp_cmd_init(&req_header, ROCE_MOD, GET_ROCEE_MDB_CMD, MDB_CLEAR);
|
||||||
|
- else
|
||||||
|
- hikp_cmd_init(&req_header, ROCE_MOD, GET_ROCEE_MDB_CMD, MDB_SHOW);
|
||||||
|
-
|
||||||
|
- cmd_ret = hikp_cmd_alloc(&req_header, &req_data, sizeof(req_data));
|
||||||
|
- ret = hikp_rsp_normal_check(cmd_ret);
|
||||||
|
- if (ret != 0)
|
||||||
|
+ self->err_no = hikp_roce_mdb_get_data(&cmd_ret, 0);
|
||||||
|
+ if (self->err_no) {
|
||||||
|
+ printf("hikptool roce_mdb get data failed\n");
|
||||||
|
goto exec_error;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
reg_num = cmd_ret->rsp_data_num / ROCE_HIKP_REG_SWICTH;
|
||||||
|
if (reg_num != ROCE_HIKP_MDB_REG_NUM) {
|
||||||
|
printf("version might not match.\n");
|
||||||
|
- ret = -1;
|
||||||
|
+ self->err_no = -EPROTO;
|
||||||
|
goto exec_error;
|
||||||
|
}
|
||||||
|
|
||||||
|
mdb_rsp = (struct roce_mdb_rsp_data *)(cmd_ret->rsp_data);
|
||||||
|
hikp_roce_mdb_print(reg_num, mdb_rsp);
|
||||||
|
- ret = 0;
|
||||||
|
|
||||||
|
exec_error:
|
||||||
|
- free(cmd_ret);
|
||||||
|
- cmd_ret = NULL;
|
||||||
|
- return ret;
|
||||||
|
+ if (cmd_ret)
|
||||||
|
+ free(cmd_ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void hikp_roce_mdb_execute(struct major_cmd_ctrl *self)
|
||||||
|
{
|
||||||
|
- self->err_no = hikp_roce_mdb_show(self);
|
||||||
|
- if (self->err_no)
|
||||||
|
- return;
|
||||||
|
-
|
||||||
|
- if (g_roce_mdb_param.reset_flag)
|
||||||
|
- printf("clear roce_mdb reg success.\n");
|
||||||
|
- else
|
||||||
|
- printf("show roce_mdb reg success.\n");
|
||||||
|
+ if (g_roce_mdb_param.flag & ROCE_MDB_CMD_EXT) {
|
||||||
|
+ g_roce_mdb_param.sub_cmd = (g_roce_mdb_param.flag & ROCE_MDB_CMD_CLEAR) ?
|
||||||
|
+ MDB_CLEAR_EXT : MDB_EXT;
|
||||||
|
+ hikp_roce_ext_execute(self, GET_ROCEE_MDB_CMD,
|
||||||
|
+ hikp_roce_mdb_get_data);
|
||||||
|
+ } else {
|
||||||
|
+ g_roce_mdb_param.sub_cmd = (g_roce_mdb_param.flag & ROCE_MDB_CMD_CLEAR) ?
|
||||||
|
+ MDB_CLEAR : MDB_SHOW;
|
||||||
|
+ hikp_roce_mdb_execute_origin(self);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int hikp_roce_mdb_ext_set(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
+{
|
||||||
|
+ g_roce_mdb_param.flag |= ROCE_MDB_CMD_EXT;
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void cmd_roce_mdb_init(void)
|
||||||
|
@@ -117,6 +143,7 @@ static void cmd_roce_mdb_init(void)
|
||||||
|
cmd_option_register("-h", "--help", false, hikp_roce_mdb_help);
|
||||||
|
cmd_option_register("-i", "--interface", true, hikp_roce_mdb_target);
|
||||||
|
cmd_option_register("-c", "--clear", false, hikp_roce_mdb_clear_set);
|
||||||
|
+ cmd_option_register("-e", "--extend", false, hikp_roce_mdb_ext_set);
|
||||||
|
}
|
||||||
|
|
||||||
|
HIKP_CMD_DECLARE("roce_mdb", "get or clear roce_mdb registers information", cmd_roce_mdb_init);
|
||||||
|
diff --git a/net/roce/roce_mdb/hikp_roce_mdb.h b/net/roce/roce_mdb/hikp_roce_mdb.h
|
||||||
|
index 7643dff..26fc549 100644
|
||||||
|
--- a/net/roce/roce_mdb/hikp_roce_mdb.h
|
||||||
|
+++ b/net/roce/roce_mdb/hikp_roce_mdb.h
|
||||||
|
@@ -19,15 +19,24 @@
|
||||||
|
#define ROCE_HIKP_MDB_REG_NUM 22
|
||||||
|
#define ROCE_HIKP_REG_SWICTH 2
|
||||||
|
|
||||||
|
+#define ROCE_MDB_CMD_CLEAR (1 << 0)
|
||||||
|
+#define ROCE_MDB_CMD_EXT (1 << 1)
|
||||||
|
+
|
||||||
|
struct cmd_roce_mdb_param {
|
||||||
|
struct tool_target target;
|
||||||
|
- int reset_flag;
|
||||||
|
+ uint32_t sub_cmd;
|
||||||
|
+ uint8_t flag;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct roce_mdb_req_para {
|
||||||
|
struct bdf_t bdf;
|
||||||
|
};
|
||||||
|
|
||||||
|
+struct roce_mdb_req_param_ext {
|
||||||
|
+ struct roce_mdb_req_para origin_param;
|
||||||
|
+ uint32_t block_id;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
struct roce_mdb_rsp_data {
|
||||||
|
uint32_t reg_offset[ROCE_HIKP_MDB_REG_NUM];
|
||||||
|
uint32_t reg_data[ROCE_HIKP_MDB_REG_NUM];
|
||||||
|
@@ -36,6 +45,8 @@ struct roce_mdb_rsp_data {
|
||||||
|
enum roce_mdb_cmd_type {
|
||||||
|
MDB_SHOW = 0x0,
|
||||||
|
MDB_CLEAR,
|
||||||
|
+ MDB_EXT,
|
||||||
|
+ MDB_CLEAR_EXT,
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* __HIKP_ROCE_MDB_H__ */
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
252
0045-hikptool-roce-Add-ext-query-for-roce_qmm-cmd.patch
Normal file
252
0045-hikptool-roce-Add-ext-query-for-roce_qmm-cmd.patch
Normal file
@ -0,0 +1,252 @@
|
|||||||
|
From 87f8605c32d308938df17b29816720ca97b0a23f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
Date: Sat, 26 Aug 2023 15:05:53 +0800
|
||||||
|
Subject: hikptool/roce: Add ext query for roce_qmm cmd
|
||||||
|
|
||||||
|
Add ext query for roce_qmm cmd. To query these ext registers, add
|
||||||
|
-e to the query cmd.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
hikptool roce_qmm -i eth1 -e
|
||||||
|
|
||||||
|
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
---
|
||||||
|
net/roce/roce_qmm/hikp_roce_qmm.c | 137 ++++++++++++++----------------
|
||||||
|
net/roce/roce_qmm/hikp_roce_qmm.h | 11 +++
|
||||||
|
2 files changed, 75 insertions(+), 73 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/net/roce/roce_qmm/hikp_roce_qmm.c b/net/roce/roce_qmm/hikp_roce_qmm.c
|
||||||
|
index c7e0ca4..b020c6a 100644
|
||||||
|
--- a/net/roce/roce_qmm/hikp_roce_qmm.c
|
||||||
|
+++ b/net/roce/roce_qmm/hikp_roce_qmm.c
|
||||||
|
@@ -25,6 +25,7 @@ static int hikp_roce_qmm_help(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
printf(" %s, %-25s %s\n", "-i", "--interface=<interface>", "device target, e.g. eth0");
|
||||||
|
printf(" %s, %-25s %s\n", "-b", "--bank=<bank>",
|
||||||
|
"[option]bank number, e.g. 0~7. (default 0)");
|
||||||
|
+ printf(" %s, %-25s %s\n", "-e", "--extend", "query extend qmm registers");
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
@@ -34,7 +35,7 @@ static int hikp_roce_qmm_target(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
{
|
||||||
|
self->err_no = tool_check_and_get_valid_bdf_id(argv, &(g_roce_qmm_param.target));
|
||||||
|
if (self->err_no != 0) {
|
||||||
|
- snprintf(self->err_str, sizeof(self->err_str), "Unknown device %s.", argv);
|
||||||
|
+ snprintf(self->err_str, sizeof(self->err_str), "Unknown device %s.\n", argv);
|
||||||
|
return self->err_no;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -61,6 +62,8 @@ static void hikp_roce_qmm_print(struct roce_qmm_rsp_data *qmm_rsp)
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
|
||||||
|
+ printf("**************QMM %s INFO*************\n",
|
||||||
|
+ g_roce_qmm_param.sub_name);
|
||||||
|
while (index < qmm_rsp->reg_num) {
|
||||||
|
printf("0x%08X : 0x%08X\n", qmm_rsp->qmm_content[index][0],
|
||||||
|
qmm_rsp->qmm_content[index][1]);
|
||||||
|
@@ -69,101 +72,88 @@ static void hikp_roce_qmm_print(struct roce_qmm_rsp_data *qmm_rsp)
|
||||||
|
printf("***************************************\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int hikp_roce_qmm_show_cqc(struct major_cmd_ctrl *self)
|
||||||
|
+static int hikp_roce_qmm_get_data(struct hikp_cmd_ret **cmd_ret,
|
||||||
|
+ uint32_t block_id)
|
||||||
|
{
|
||||||
|
- struct roce_qmm_req_para req_data = { 0 };
|
||||||
|
- struct roce_qmm_rsp_data *qmm_rsp = NULL;
|
||||||
|
+ struct roce_qmm_req_para_ext req_data_ext;
|
||||||
|
struct hikp_cmd_header req_header = { 0 };
|
||||||
|
- struct hikp_cmd_ret *cmd_ret = NULL;
|
||||||
|
+ uint32_t req_size;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
- req_data.bdf = g_roce_qmm_param.target.bdf;
|
||||||
|
+ req_data_ext.origin_param.bdf = g_roce_qmm_param.target.bdf;
|
||||||
|
+ req_data_ext.origin_param.bank_id = g_roce_qmm_param.bank_id;
|
||||||
|
+ req_data_ext.block_id = block_id;
|
||||||
|
+
|
||||||
|
+ req_size = g_roce_qmm_param.ext_flag ?
|
||||||
|
+ sizeof(struct roce_qmm_req_para) :
|
||||||
|
+ sizeof(struct roce_qmm_req_para_ext);
|
||||||
|
+ hikp_cmd_init(&req_header, ROCE_MOD, GET_ROCEE_QMM_CMD,
|
||||||
|
+ g_roce_qmm_param.sub_cmd);
|
||||||
|
+ *cmd_ret = hikp_cmd_alloc(&req_header, &req_data_ext, req_size);
|
||||||
|
+ ret = hikp_rsp_normal_check(*cmd_ret);
|
||||||
|
+ if (ret)
|
||||||
|
+ printf("hikptool roce_qmm cmd_ret malloc failed, sub_cmd = %u, ret = %d.\n",
|
||||||
|
+ g_roce_qmm_param.sub_cmd, ret);
|
||||||
|
|
||||||
|
- hikp_cmd_init(&req_header, ROCE_MOD, GET_ROCEE_QMM_CMD, QMM_SHOW_CQC);
|
||||||
|
- cmd_ret = hikp_cmd_alloc(&req_header, &req_data, sizeof(req_data));
|
||||||
|
- ret = hikp_rsp_normal_check(cmd_ret);
|
||||||
|
- if (ret != 0)
|
||||||
|
- goto out;
|
||||||
|
-
|
||||||
|
- qmm_rsp = (struct roce_qmm_rsp_data *)(cmd_ret->rsp_data);
|
||||||
|
- printf("**************QMM CQC INFO*************\n");
|
||||||
|
- hikp_roce_qmm_print(qmm_rsp);
|
||||||
|
-out:
|
||||||
|
- free(cmd_ret);
|
||||||
|
- cmd_ret = NULL;
|
||||||
|
- return ret;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static int hikp_roce_qmm_show_qpc(struct major_cmd_ctrl *self)
|
||||||
|
-{
|
||||||
|
- struct roce_qmm_req_para req_data = { 0 };
|
||||||
|
- struct roce_qmm_rsp_data *qmm_rsp = NULL;
|
||||||
|
- struct hikp_cmd_header req_header = { 0 };
|
||||||
|
- struct hikp_cmd_ret *cmd_ret = NULL;
|
||||||
|
- int ret;
|
||||||
|
-
|
||||||
|
- req_data.bdf = g_roce_qmm_param.target.bdf;
|
||||||
|
- req_data.bank_id = g_roce_qmm_param.bank_id;
|
||||||
|
-
|
||||||
|
- hikp_cmd_init(&req_header, ROCE_MOD, GET_ROCEE_QMM_CMD, QMM_SHOW_QPC);
|
||||||
|
- cmd_ret = hikp_cmd_alloc(&req_header, &req_data, sizeof(req_data));
|
||||||
|
- ret = hikp_rsp_normal_check(cmd_ret);
|
||||||
|
- if (ret != 0)
|
||||||
|
- goto out;
|
||||||
|
-
|
||||||
|
- qmm_rsp = (struct roce_qmm_rsp_data *)(cmd_ret->rsp_data);
|
||||||
|
- printf("**************QMM QPC INFO*************\n");
|
||||||
|
- hikp_roce_qmm_print(qmm_rsp);
|
||||||
|
-out:
|
||||||
|
- free(cmd_ret);
|
||||||
|
- cmd_ret = NULL;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int hikp_roce_qmm_show_top(struct major_cmd_ctrl *self)
|
||||||
|
+static void hikp_roce_qmm_execute_origin(struct major_cmd_ctrl *self)
|
||||||
|
{
|
||||||
|
- struct roce_qmm_req_para req_data = { 0 };
|
||||||
|
- struct roce_qmm_rsp_data *qmm_rsp = NULL;
|
||||||
|
- struct hikp_cmd_header req_header = { 0 };
|
||||||
|
- struct hikp_cmd_ret *cmd_ret = NULL;
|
||||||
|
- int ret;
|
||||||
|
+ struct roce_qmm_rsp_data *roce_qmm_res;
|
||||||
|
+ struct hikp_cmd_ret *cmd_ret;
|
||||||
|
|
||||||
|
- req_data.bdf = g_roce_qmm_param.target.bdf;
|
||||||
|
-
|
||||||
|
- hikp_cmd_init(&req_header, ROCE_MOD, GET_ROCEE_QMM_CMD, QMM_SHOW_TOP);
|
||||||
|
- cmd_ret = hikp_cmd_alloc(&req_header, &req_data, sizeof(req_data));
|
||||||
|
- ret = hikp_rsp_normal_check(cmd_ret);
|
||||||
|
- if (ret != 0)
|
||||||
|
- goto out;
|
||||||
|
+ self->err_no = hikp_roce_qmm_get_data(&cmd_ret, 0);
|
||||||
|
+ if (self->err_no) {
|
||||||
|
+ printf("hikptool roce_qmm get data failed.\n");
|
||||||
|
+ goto exec_error;
|
||||||
|
+ }
|
||||||
|
+ roce_qmm_res = (struct roce_qmm_rsp_data *)cmd_ret->rsp_data;
|
||||||
|
+ hikp_roce_qmm_print(roce_qmm_res);
|
||||||
|
|
||||||
|
- qmm_rsp = (struct roce_qmm_rsp_data *)(cmd_ret->rsp_data);
|
||||||
|
- printf("**************QMM TOP INFO*************\n");
|
||||||
|
- hikp_roce_qmm_print(qmm_rsp);
|
||||||
|
-out:
|
||||||
|
- free(cmd_ret);
|
||||||
|
- cmd_ret = NULL;
|
||||||
|
- return ret;
|
||||||
|
+exec_error:
|
||||||
|
+ if (cmd_ret)
|
||||||
|
+ free(cmd_ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void hikp_roce_qmm_execute(struct major_cmd_ctrl *self)
|
||||||
|
{
|
||||||
|
- int (*func[])(struct major_cmd_ctrl *self) = {
|
||||||
|
- hikp_roce_qmm_show_cqc, hikp_roce_qmm_show_qpc, hikp_roce_qmm_show_top
|
||||||
|
+ const struct cmd_type_info {
|
||||||
|
+ enum roce_qmm_cmd_type sub_cmd;
|
||||||
|
+ enum roce_qmm_cmd_type sub_ext_cmd;
|
||||||
|
+ const char *sub_name;
|
||||||
|
+ } sub_cmd_info_table[] = {
|
||||||
|
+ {QMM_SHOW_CQC, QMM_SHOW_CQC_EXT, "CQC"},
|
||||||
|
+ {QMM_SHOW_QPC, QMM_SHOW_QPC_EXT, "QPC"},
|
||||||
|
+ {QMM_SHOW_TOP, QMM_SHOW_TOP_EXT, "TOP"},
|
||||||
|
};
|
||||||
|
- char *function[] = {"show cqc", "show qpc", "show top"};
|
||||||
|
- int ret;
|
||||||
|
|
||||||
|
- for (int i = 0; i < HIKP_ARRAY_SIZE(func); i++) {
|
||||||
|
- ret = func[i](self);
|
||||||
|
- if (ret != 0) {
|
||||||
|
- self->err_no = -EINVAL;
|
||||||
|
+ for (int i = 0; i < HIKP_ARRAY_SIZE(sub_cmd_info_table); i++) {
|
||||||
|
+ g_roce_qmm_param.sub_name = sub_cmd_info_table[i].sub_name;
|
||||||
|
+ if (g_roce_qmm_param.ext_flag) {
|
||||||
|
+ g_roce_qmm_param.sub_cmd = sub_cmd_info_table[i].sub_ext_cmd;
|
||||||
|
+ hikp_roce_ext_execute(self, GET_ROCEE_QMM_CMD,
|
||||||
|
+ hikp_roce_qmm_get_data);
|
||||||
|
+ } else {
|
||||||
|
+ g_roce_qmm_param.sub_cmd = sub_cmd_info_table[i].sub_cmd;
|
||||||
|
+ hikp_roce_qmm_execute_origin(self);
|
||||||
|
+ }
|
||||||
|
+ if (self->err_no) {
|
||||||
|
snprintf(self->err_str, sizeof(self->err_str),
|
||||||
|
- "roce_qmm %s function failed\n", function[i]);
|
||||||
|
+ "roce_qmm show %s function failed\n",
|
||||||
|
+ sub_cmd_info_table[i].sub_name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int hikp_roce_qmm_ext_set(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
+{
|
||||||
|
+ g_roce_qmm_param.ext_flag = true;
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void cmd_roce_qmm_init(void)
|
||||||
|
{
|
||||||
|
struct major_cmd_ctrl *major_cmd = get_major_cmd();
|
||||||
|
@@ -174,6 +164,7 @@ static void cmd_roce_qmm_init(void)
|
||||||
|
cmd_option_register("-h", "--help", false, hikp_roce_qmm_help);
|
||||||
|
cmd_option_register("-i", "--interface", true, hikp_roce_qmm_target);
|
||||||
|
cmd_option_register("-b", "--bank", true, hikp_roce_qmm_bank_get);
|
||||||
|
+ cmd_option_register("-e", "--extend", false, hikp_roce_qmm_ext_set);
|
||||||
|
}
|
||||||
|
|
||||||
|
HIKP_CMD_DECLARE("roce_qmm", "get roce_qmm registers information", cmd_roce_qmm_init);
|
||||||
|
diff --git a/net/roce/roce_qmm/hikp_roce_qmm.h b/net/roce/roce_qmm/hikp_roce_qmm.h
|
||||||
|
index 0645ab3..06e6bcf 100644
|
||||||
|
--- a/net/roce/roce_qmm/hikp_roce_qmm.h
|
||||||
|
+++ b/net/roce/roce_qmm/hikp_roce_qmm.h
|
||||||
|
@@ -22,6 +22,9 @@
|
||||||
|
struct cmd_roce_qmm_param_t {
|
||||||
|
struct tool_target target;
|
||||||
|
uint32_t bank_id;
|
||||||
|
+ uint32_t sub_cmd;
|
||||||
|
+ const char *sub_name;
|
||||||
|
+ bool ext_flag;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct roce_qmm_rsp_data {
|
||||||
|
@@ -34,10 +37,18 @@ struct roce_qmm_req_para {
|
||||||
|
uint32_t bank_id;
|
||||||
|
};
|
||||||
|
|
||||||
|
+struct roce_qmm_req_para_ext {
|
||||||
|
+ struct roce_qmm_req_para origin_param;
|
||||||
|
+ uint32_t block_id;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
enum roce_qmm_cmd_type {
|
||||||
|
QMM_SHOW_CQC = 0x1,
|
||||||
|
QMM_SHOW_QPC = 0x2,
|
||||||
|
QMM_SHOW_TOP = 0x3,
|
||||||
|
+ QMM_SHOW_CQC_EXT,
|
||||||
|
+ QMM_SHOW_QPC_EXT,
|
||||||
|
+ QMM_SHOW_TOP_EXT,
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* __HIKP_ROCE_QMM_H__ */
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
100
0046-hikptool-Querying-the-SerDes-Relationship-of-the-PCI.patch
Normal file
100
0046-hikptool-Querying-the-SerDes-Relationship-of-the-PCI.patch
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
From 6747635a4423fc0844230bc66112853856b9fe97 Mon Sep 17 00:00:00 2001
|
||||||
|
From: mou bingquan <moubingquan@huawei.com>
|
||||||
|
Date: Wed, 18 Oct 2023 09:52:39 +0800
|
||||||
|
Subject: [PATCH] hikptool : Querying the SerDes Relationship of the PCIe
|
||||||
|
|
||||||
|
This function is used to query the macro corresponding to the
|
||||||
|
port of the PCIe. It is a type of SerDes multiplexing relationship.
|
||||||
|
---
|
||||||
|
pcie/func_lib/pcie_func/pcie_statistics.c | 30 +++++++++++++++++++++++
|
||||||
|
pcie/func_lib/pcie_func/pcie_statistics.h | 10 ++++++++
|
||||||
|
2 files changed, 40 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/pcie/func_lib/pcie_func/pcie_statistics.c b/pcie/func_lib/pcie_func/pcie_statistics.c
|
||||||
|
index 308a142..128e7f7 100644
|
||||||
|
--- a/pcie/func_lib/pcie_func/pcie_statistics.c
|
||||||
|
+++ b/pcie/func_lib/pcie_func/pcie_statistics.c
|
||||||
|
@@ -25,6 +25,10 @@ static const char *g_global_width_name[GLOBAL_WIDTH_TABLE_SIZE] = {
|
||||||
|
"PCIE_WIDTH_X1", "PCIE_WIDTH_X2", "PCIE_WIDTH_X4", "PCIE_WIDTH_X8", "PCIE_WIDTH_X16"
|
||||||
|
};
|
||||||
|
|
||||||
|
+static const char *g_global_ndie_name[] = {
|
||||||
|
+ "Ndie_A", "Ndie_B"
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
static int port_distribution_rsp_data_check(const struct hikp_cmd_ret *cmd_ret, uint32_t *port_num)
|
||||||
|
{
|
||||||
|
size_t rsp_data_size, expect_data_size;
|
||||||
|
@@ -58,6 +62,29 @@ static int port_distribution_rsp_data_check(const struct hikp_cmd_ret *cmd_ret,
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int pcie_portid_serdes_relation(const struct pcie_macro_info *macro_info,
|
||||||
|
+ uint32_t macro_num, uint32_t ndie_id)
|
||||||
|
+{
|
||||||
|
+ uint32_t i, j;
|
||||||
|
+
|
||||||
|
+ if (ndie_id >= HIKP_ARRAY_SIZE(g_global_ndie_name)) {
|
||||||
|
+ Info("PCIe Base", "ndie_id [%u]: %s\n", ndie_id, "UNKNOWN_NDIE");
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (macro_num >= MAX_MACRO_ONEPORT) {
|
||||||
|
+ Info("PCIe Base", "macro_num [%u] exceeds the maximum array length\n", macro_num);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ Info("PCIe Base", "\tndie_id: %s\n", g_global_ndie_name[ndie_id]);
|
||||||
|
+ for (i = 0; i < macro_num; i++) {
|
||||||
|
+ for (j = macro_info[i].lane_s; j <= macro_info[i].lane_e; j++)
|
||||||
|
+ Info("PCIe Base", "\t\tmacro %d \t lane: %d\n", macro_info[i].id, j);
|
||||||
|
+ }
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
int pcie_port_distribution_get(uint32_t chip_id)
|
||||||
|
{
|
||||||
|
struct hikp_cmd_header req_header;
|
||||||
|
@@ -86,6 +113,9 @@ int pcie_port_distribution_get(uint32_t chip_id)
|
||||||
|
}
|
||||||
|
Info("PCIe Base", "port_id[%u] %s\n", port_info->info_pair[i].port_id,
|
||||||
|
g_global_width_name[port_info->info_pair[i].port_width]);
|
||||||
|
+ pcie_portid_serdes_relation(port_info->info_pair[i].macro_info,
|
||||||
|
+ port_info->info_pair[i].macro_num,
|
||||||
|
+ port_info->info_pair[i].ndie_id);
|
||||||
|
}
|
||||||
|
free_cmd_ret:
|
||||||
|
free(cmd_ret);
|
||||||
|
diff --git a/pcie/func_lib/pcie_func/pcie_statistics.h b/pcie/func_lib/pcie_func/pcie_statistics.h
|
||||||
|
index 2a3cc66..3e3916b 100644
|
||||||
|
--- a/pcie/func_lib/pcie_func/pcie_statistics.h
|
||||||
|
+++ b/pcie/func_lib/pcie_func/pcie_statistics.h
|
||||||
|
@@ -17,6 +17,7 @@
|
||||||
|
#include "pcie_common_api.h"
|
||||||
|
|
||||||
|
#define GLOBAL_WIDTH_TABLE_SIZE 5
|
||||||
|
+#define MAX_MACRO_ONEPORT 3
|
||||||
|
|
||||||
|
union mac_test_cnt {
|
||||||
|
/* Define the struct bits */
|
||||||
|
@@ -88,9 +89,18 @@ union dfx_dcrc_err_num {
|
||||||
|
unsigned int u32;
|
||||||
|
};
|
||||||
|
|
||||||
|
+struct pcie_macro_info {
|
||||||
|
+ uint32_t id;
|
||||||
|
+ uint32_t lane_s;
|
||||||
|
+ uint32_t lane_e;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
struct pcie_info_distribution_pair {
|
||||||
|
uint32_t port_id;
|
||||||
|
uint32_t port_width;
|
||||||
|
+ uint32_t ndie_id;
|
||||||
|
+ uint32_t macro_num;
|
||||||
|
+ struct pcie_macro_info macro_info[MAX_MACRO_ONEPORT];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct pcie_port_info {
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
177
0047-hikptool-Remove-the-function-of-querying-SAS-device-.patch
Normal file
177
0047-hikptool-Remove-the-function-of-querying-SAS-device-.patch
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
From ba80a0dd531a4eebccb1852a65b4b7272a02c06d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Yihang Li <liyihang9@huawei.com>
|
||||||
|
Date: Tue, 17 Oct 2023 18:58:27 +0800
|
||||||
|
Subject: [PATCH] hikptool: Remove the function of querying SAS device
|
||||||
|
configurations
|
||||||
|
|
||||||
|
Currently, SAS device information cannot be obtained.
|
||||||
|
Remove the function of querying SAS device configurations
|
||||||
|
|
||||||
|
Signed-off-by: Yihang Li <liyihang9@huawei.com>
|
||||||
|
---
|
||||||
|
sas/sas_func/sas_common.h | 2 --
|
||||||
|
sas/sas_func/sas_read_dev.c | 21 ---------------------
|
||||||
|
sas/user_cmd/cmd_code/sas_cmd_common.c | 10 ----------
|
||||||
|
sas/user_cmd/cmd_code/sas_cmd_dev.c | 17 -----------------
|
||||||
|
sas/user_cmd/cmd_code/sas_tools_include.h | 2 --
|
||||||
|
5 files changed, 52 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sas/sas_func/sas_common.h b/sas/sas_func/sas_common.h
|
||||||
|
index 9464792..1bace0c 100644
|
||||||
|
--- a/sas/sas_func/sas_common.h
|
||||||
|
+++ b/sas/sas_func/sas_common.h
|
||||||
|
@@ -22,7 +22,6 @@
|
||||||
|
#define IPTT_ICT_STATUS 29
|
||||||
|
#define LINK_SPEED_OFFSET 8
|
||||||
|
#define LINK_SPEED_WIDTH 4
|
||||||
|
-#define MAX_DEVICE_NUM 2048
|
||||||
|
|
||||||
|
#define DWS_LOST 0
|
||||||
|
#define RESET_PROB 1
|
||||||
|
@@ -73,7 +72,6 @@ enum sas_errcode_cmd_type {
|
||||||
|
|
||||||
|
enum sas_dev_cmd_type {
|
||||||
|
DEV_LINK,
|
||||||
|
- DEV_INFO,
|
||||||
|
DEV_UNKNOWN_TYPE,
|
||||||
|
};
|
||||||
|
|
||||||
|
diff --git a/sas/sas_func/sas_read_dev.c b/sas/sas_func/sas_read_dev.c
|
||||||
|
index 8b9b58d..3a3db07 100644
|
||||||
|
--- a/sas/sas_func/sas_read_dev.c
|
||||||
|
+++ b/sas/sas_func/sas_read_dev.c
|
||||||
|
@@ -76,24 +76,6 @@ static void print_dev_link(const uint32_t *reg_save, uint32_t reg_num)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void print_dev_info(const void *reg_save, uint32_t reg_num)
|
||||||
|
-{
|
||||||
|
- volatile struct hikp_sas_itct *itct = (volatile struct hikp_sas_itct *)reg_save;
|
||||||
|
-
|
||||||
|
- printf("The device information as below:\n");
|
||||||
|
- printf("dev_type: %d\n", itct->dw0.dev_type);
|
||||||
|
- printf("dev_valid: %d\n", itct->dw0.dev_valid);
|
||||||
|
- printf("break_reply_en: %d\n", itct->dw0.break_reply_en);
|
||||||
|
- printf("smp_timeout: %d\n", itct->dw0.smp_timeout);
|
||||||
|
- printf("tlr_en: %d\n", itct->dw0.tlr_en);
|
||||||
|
- printf("awt_continue: %d\n", itct->dw0.awt_continue);
|
||||||
|
- printf("sas_addr: 0x%llx\n", itct->sas_addr);
|
||||||
|
- printf("I_T_nexus_loss: %d\n", itct->dw2.I_T_nexus_loss);
|
||||||
|
- printf("awt_initial_value: %d\n", itct->dw2.awt_initial_value);
|
||||||
|
- printf("maximum_connect_time: %d\n", itct->dw2.maximum_connect_time);
|
||||||
|
- printf("reject_to_open_limit: %d\n", itct->dw2.reject_to_open_limit);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
static void sas_print_dev(const uint32_t *reg_save, uint32_t reg_num, uint32_t cmd_type)
|
||||||
|
{
|
||||||
|
uint32_t i;
|
||||||
|
@@ -106,9 +88,6 @@ static void sas_print_dev(const uint32_t *reg_save, uint32_t reg_num, uint32_t c
|
||||||
|
case DEV_LINK:
|
||||||
|
print_dev_link(reg_save, reg_num);
|
||||||
|
break;
|
||||||
|
- case DEV_INFO:
|
||||||
|
- print_dev_info(reg_save, reg_num);
|
||||||
|
- break;
|
||||||
|
default:
|
||||||
|
printf("cmd_type is error\n");
|
||||||
|
}
|
||||||
|
diff --git a/sas/user_cmd/cmd_code/sas_cmd_common.c b/sas/user_cmd/cmd_code/sas_cmd_common.c
|
||||||
|
index 9dca63f..358cf39 100644
|
||||||
|
--- a/sas/user_cmd/cmd_code/sas_cmd_common.c
|
||||||
|
+++ b/sas/user_cmd/cmd_code/sas_cmd_common.c
|
||||||
|
@@ -54,11 +54,6 @@ int sas_get_phy_id(void)
|
||||||
|
return g_sas_cmd.phy_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
-int sas_get_dev_id(void)
|
||||||
|
-{
|
||||||
|
- return g_sas_cmd.dev_id;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
int sas_get_que_id(void)
|
||||||
|
{
|
||||||
|
return g_sas_cmd.que_id;
|
||||||
|
@@ -84,11 +79,6 @@ int sas_set_die_id(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
return sas_set_id(self, argv, &g_sas_cmd.die_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
-int sas_set_dev_id(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
-{
|
||||||
|
- return sas_set_id(self, argv, &g_sas_cmd.dev_id);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
int sas_set_que_id(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
{
|
||||||
|
return sas_set_id(self, argv, &g_sas_cmd.que_id);
|
||||||
|
diff --git a/sas/user_cmd/cmd_code/sas_cmd_dev.c b/sas/user_cmd/cmd_code/sas_cmd_dev.c
|
||||||
|
index c95006b..6a5eae0 100644
|
||||||
|
--- a/sas/user_cmd/cmd_code/sas_cmd_dev.c
|
||||||
|
+++ b/sas/user_cmd/cmd_code/sas_cmd_dev.c
|
||||||
|
@@ -26,7 +26,6 @@ static int sas_dev_help(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
printf("\n Options:\n\n");
|
||||||
|
printf(" %s, %-25s %s\n", "-h", "--help", "display this help and exit\n");
|
||||||
|
printf(" %s, %-25s %s\n", "-l", "--link", "dispaly device type and speed\n");
|
||||||
|
- printf(" %s, %-25s %s\n", "-i", "--info", "dispaly the device detail information\n");
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
@@ -37,19 +36,6 @@ static int sas_dev_link(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
return sas_set_cmd_type(DEV_LINK);
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int sas_dev_info(struct major_cmd_ctrl *self, const char *argv)
|
||||||
|
-{
|
||||||
|
- int ret;
|
||||||
|
-
|
||||||
|
- (void)sas_set_cmd_type(DEV_INFO);
|
||||||
|
- ret = sas_set_dev_id(self, argv);
|
||||||
|
- if (ret || sas_get_dev_id() >= MAX_DEVICE_NUM) {
|
||||||
|
- printf("device id is too large(>=%d)\n", MAX_DEVICE_NUM);
|
||||||
|
- return -EINVAL;
|
||||||
|
- }
|
||||||
|
- return ret;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
static int sas_dev_excute_funs_call(uint32_t cmd_type)
|
||||||
|
{
|
||||||
|
if (cmd_type != SAS_UNKNOW_CMD)
|
||||||
|
@@ -63,11 +49,9 @@ static void sas_dev_execute(struct major_cmd_ctrl *self)
|
||||||
|
int ret, cmd;
|
||||||
|
const char *suc_msg[] = {
|
||||||
|
"sas_dev_link success.",
|
||||||
|
- "sas_dev_info success.",
|
||||||
|
};
|
||||||
|
const char *err_msg[] = {
|
||||||
|
"sas_dev_link error.",
|
||||||
|
- "sas_dev_info error.",
|
||||||
|
"sas_dev failed, unknown type",
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -95,7 +79,6 @@ static void cmd_sas_dev_init(void)
|
||||||
|
cmd_option_register("-d", "--dieid", true, sas_set_die_id);
|
||||||
|
cmd_option_register("-h", "--help", false, sas_dev_help);
|
||||||
|
cmd_option_register("-l", "--link", false, sas_dev_link);
|
||||||
|
- cmd_option_register("-i", "--info", true, sas_dev_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
HIKP_CMD_DECLARE("sas_dev", "sas device information ", cmd_sas_dev_init);
|
||||||
|
diff --git a/sas/user_cmd/cmd_code/sas_tools_include.h b/sas/user_cmd/cmd_code/sas_tools_include.h
|
||||||
|
index a71e614..0aa7703 100644
|
||||||
|
--- a/sas/user_cmd/cmd_code/sas_tools_include.h
|
||||||
|
+++ b/sas/user_cmd/cmd_code/sas_tools_include.h
|
||||||
|
@@ -34,13 +34,11 @@ struct tool_sas_cmd {
|
||||||
|
int sas_set_cmd_type(int cmd_type);
|
||||||
|
int sas_get_cmd_type(void);
|
||||||
|
int sas_get_phy_id(void);
|
||||||
|
-int sas_get_dev_id(void);
|
||||||
|
int sas_get_que_id(void);
|
||||||
|
struct tool_sas_cmd *sas_get_cmd_p(void);
|
||||||
|
int sas_set_chip_id(struct major_cmd_ctrl *self, const char *argv);
|
||||||
|
int sas_set_phy_id(struct major_cmd_ctrl *self, const char *argv);
|
||||||
|
int sas_set_die_id(struct major_cmd_ctrl *self, const char *argv);
|
||||||
|
-int sas_set_dev_id(struct major_cmd_ctrl *self, const char *argv);
|
||||||
|
int sas_set_que_id(struct major_cmd_ctrl *self, const char *argv);
|
||||||
|
int sas_set_dqe_id(struct major_cmd_ctrl *self, const char *argv);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
From 2abbc6020498b1c464775623de8b2db76e684d55 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
Date: Tue, 24 Oct 2023 11:16:49 +0800
|
||||||
|
Subject: hikptool/roce: Use calloc to alloc memory for array instead of malloc
|
||||||
|
|
||||||
|
calloc is more situable for memory allocation for array than malloc,
|
||||||
|
since the allocated memory will be set to 0.
|
||||||
|
|
||||||
|
Fixes: 8b3b68347165 ("hikptool/roce: Add a common frame for hikptool roce register query")
|
||||||
|
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
---
|
||||||
|
net/roce/roce_ext_common/hikp_roce_ext_common.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/net/roce/roce_ext_common/hikp_roce_ext_common.c b/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
index d0fae69..d5ae64a 100644
|
||||||
|
--- a/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
+++ b/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
@@ -115,8 +115,8 @@ static int hikp_roce_ext_get_res(enum roce_cmd_type cmd_type,
|
||||||
|
max_size = res_head->total_block_num * sizeof(uint32_t);
|
||||||
|
|
||||||
|
if (block_id == 0) {
|
||||||
|
- reg->offset = (uint32_t *)malloc(max_size);
|
||||||
|
- reg->data = (uint32_t *)malloc(max_size);
|
||||||
|
+ reg->offset = (uint32_t *)calloc(res_head->total_block_num, sizeof(uint32_t));
|
||||||
|
+ reg->data = (uint32_t *)calloc(res_head->total_block_num, sizeof(uint32_t));
|
||||||
|
if ((reg->offset == NULL) || (reg->data == NULL)) {
|
||||||
|
printf("hikptool roce_%s alloc log memmory 0x%x failed!\n",
|
||||||
|
cmd_name, max_size);
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
127
0049-hikptool-roce-Fix-missing-check-of-reg-num-responsed.patch
Normal file
127
0049-hikptool-roce-Fix-missing-check-of-reg-num-responsed.patch
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
From 679cfd5353da2165dbf5b89769bbd5b69209bc5b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
Date: Tue, 24 Oct 2023 15:12:41 +0800
|
||||||
|
Subject: hikptool/roce: Fix missing check of reg num responsed from FW
|
||||||
|
|
||||||
|
If the reg num responsed from a new-version FW exceeds the array
|
||||||
|
length in the old-version hikptool, an out-of-bounds access error
|
||||||
|
will occur. So add a check to ensure the reg num is not greater
|
||||||
|
than tha array length.
|
||||||
|
|
||||||
|
Fixes: 392c269be165 ("support querying RoCE module information")
|
||||||
|
Fixes: 87f8605c32d3 ("hikptool/roce: Add ext query for roce_qmm cmd")
|
||||||
|
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
---
|
||||||
|
net/roce/roce_caep/hikp_roce_caep.c | 7 +++++++
|
||||||
|
net/roce/roce_pkt/hikp_roce_pkt.c | 7 +++++++
|
||||||
|
net/roce/roce_qmm/hikp_roce_qmm.c | 7 +++++++
|
||||||
|
net/roce/roce_timer/hikp_roce_timer.c | 12 ++++++++++++
|
||||||
|
net/roce/roce_tsp/hikp_roce_tsp.c | 6 ++++++
|
||||||
|
5 files changed, 39 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/net/roce/roce_caep/hikp_roce_caep.c b/net/roce/roce_caep/hikp_roce_caep.c
|
||||||
|
index 6c92ea1..126551a 100644
|
||||||
|
--- a/net/roce/roce_caep/hikp_roce_caep.c
|
||||||
|
+++ b/net/roce/roce_caep/hikp_roce_caep.c
|
||||||
|
@@ -85,7 +85,14 @@ static void hikp_roce_caep_execute_origin(struct major_cmd_ctrl *self)
|
||||||
|
printf("hikptool roce_caep get data failed.\n");
|
||||||
|
goto exec_error;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
roce_caep_res = (struct roce_caep_res_param *)cmd_ret->rsp_data;
|
||||||
|
+ if (roce_caep_res->total_block_num > ROCE_HIKP_CAEP_REG_NUM) {
|
||||||
|
+ printf("version might not match, adjust the reg num to %d.\n",
|
||||||
|
+ ROCE_HIKP_CAEP_REG_NUM);
|
||||||
|
+ roce_caep_res->total_block_num = ROCE_HIKP_CAEP_REG_NUM;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
hikp_roce_caep_print(roce_caep_res->total_block_num,
|
||||||
|
roce_caep_res->reg_data.offset,
|
||||||
|
roce_caep_res->reg_data.data);
|
||||||
|
diff --git a/net/roce/roce_pkt/hikp_roce_pkt.c b/net/roce/roce_pkt/hikp_roce_pkt.c
|
||||||
|
index d3bf885..e710e08 100644
|
||||||
|
--- a/net/roce/roce_pkt/hikp_roce_pkt.c
|
||||||
|
+++ b/net/roce/roce_pkt/hikp_roce_pkt.c
|
||||||
|
@@ -87,7 +87,14 @@ static void hikp_roce_pkt_execute(struct major_cmd_ctrl *self)
|
||||||
|
self->err_no = ret;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
roce_pkt_res = (struct roce_pkt_res_param *)cmd_ret->rsp_data;
|
||||||
|
+ if (roce_pkt_res->total_block_num > ROCE_HIKP_PKT_REG_NUM) {
|
||||||
|
+ printf("version might not match, adjust the reg num to %d.\n",
|
||||||
|
+ ROCE_HIKP_PKT_REG_NUM);
|
||||||
|
+ roce_pkt_res->total_block_num = ROCE_HIKP_PKT_REG_NUM;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
hikp_roce_pkt_print(roce_pkt_res->total_block_num,
|
||||||
|
roce_pkt_res->reg_data.offset, roce_pkt_res->reg_data.data);
|
||||||
|
|
||||||
|
diff --git a/net/roce/roce_qmm/hikp_roce_qmm.c b/net/roce/roce_qmm/hikp_roce_qmm.c
|
||||||
|
index b020c6a..d127264 100644
|
||||||
|
--- a/net/roce/roce_qmm/hikp_roce_qmm.c
|
||||||
|
+++ b/net/roce/roce_qmm/hikp_roce_qmm.c
|
||||||
|
@@ -108,7 +108,14 @@ static void hikp_roce_qmm_execute_origin(struct major_cmd_ctrl *self)
|
||||||
|
printf("hikptool roce_qmm get data failed.\n");
|
||||||
|
goto exec_error;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
roce_qmm_res = (struct roce_qmm_rsp_data *)cmd_ret->rsp_data;
|
||||||
|
+ if (roce_qmm_res->reg_num > ROCE_HIKP_QMM_REG_NUM) {
|
||||||
|
+ printf("version might not match, adjust the reg num to %d.\n",
|
||||||
|
+ ROCE_HIKP_QMM_REG_NUM);
|
||||||
|
+ roce_qmm_res->reg_num = ROCE_HIKP_QMM_REG_NUM;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
hikp_roce_qmm_print(roce_qmm_res);
|
||||||
|
|
||||||
|
exec_error:
|
||||||
|
diff --git a/net/roce/roce_timer/hikp_roce_timer.c b/net/roce/roce_timer/hikp_roce_timer.c
|
||||||
|
index c4e979f..a78d383 100644
|
||||||
|
--- a/net/roce/roce_timer/hikp_roce_timer.c
|
||||||
|
+++ b/net/roce/roce_timer/hikp_roce_timer.c
|
||||||
|
@@ -76,6 +76,12 @@ static int hikp_roce_timer_show_qpc(struct major_cmd_ctrl *self)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
timer_rsp = (struct roce_timer_rsp_data *)(cmd_ret->rsp_data);
|
||||||
|
+ if (timer_rsp->reg_num > ROCE_HIKP_TIMER_REG_NUM) {
|
||||||
|
+ printf("version might not match, adjust the reg num to %d.\n",
|
||||||
|
+ ROCE_HIKP_TIMER_REG_NUM);
|
||||||
|
+ timer_rsp->reg_num = ROCE_HIKP_TIMER_REG_NUM;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
printf("**************QPC TIMER INFO*************\n");
|
||||||
|
hikp_roce_timer_print(timer_rsp);
|
||||||
|
out:
|
||||||
|
@@ -104,6 +110,12 @@ static int hikp_roce_timer_show_cqc(struct major_cmd_ctrl *self)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
timer_rsp = (struct roce_timer_rsp_data *)(cmd_ret->rsp_data);
|
||||||
|
+ if (timer_rsp->reg_num > ROCE_HIKP_TIMER_REG_NUM) {
|
||||||
|
+ printf("version might not match, adjust the reg num to %d.\n",
|
||||||
|
+ ROCE_HIKP_TIMER_REG_NUM);
|
||||||
|
+ timer_rsp->reg_num = ROCE_HIKP_TIMER_REG_NUM;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
printf("**************CQC TIMER INFO*************\n");
|
||||||
|
hikp_roce_timer_print(timer_rsp);
|
||||||
|
out:
|
||||||
|
diff --git a/net/roce/roce_tsp/hikp_roce_tsp.c b/net/roce/roce_tsp/hikp_roce_tsp.c
|
||||||
|
index a036fae..5bb2649 100644
|
||||||
|
--- a/net/roce/roce_tsp/hikp_roce_tsp.c
|
||||||
|
+++ b/net/roce/roce_tsp/hikp_roce_tsp.c
|
||||||
|
@@ -181,6 +181,12 @@ static void hikp_roce_tsp_execute(struct major_cmd_ctrl *self)
|
||||||
|
}
|
||||||
|
|
||||||
|
roce_tsp_res = (struct roce_tsp_res_param *)cmd_ret->rsp_data;
|
||||||
|
+ if (roce_tsp_res->total_block_num > ROCE_HIKP_TSP_REG_NUM) {
|
||||||
|
+ printf("version might not match, adjust the reg num to %d.\n",
|
||||||
|
+ ROCE_HIKP_TSP_REG_NUM);
|
||||||
|
+ roce_tsp_res->total_block_num = ROCE_HIKP_TSP_REG_NUM;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
hikp_roce_tsp_print(roce_tsp_res->total_block_num,
|
||||||
|
roce_tsp_res->reg_data.offset, roce_tsp_res->reg_data.data);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
43
0050-hikptool-Change-the-unic_ppp-directory-to-ub_ppp.patch
Normal file
43
0050-hikptool-Change-the-unic_ppp-directory-to-ub_ppp.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
From bb4201e589f3875351a5a7b1305254701663dc9a Mon Sep 17 00:00:00 2001
|
||||||
|
From: JianQiang Li <lijianqiang16@huawei.com>
|
||||||
|
Date: Wed, 25 Oct 2023 09:14:55 +0800
|
||||||
|
Subject: [PATCH] [hikptool] Change the unic_ppp directory to ub_ppp.
|
||||||
|
|
||||||
|
tool inclusion
|
||||||
|
category:bugfix
|
||||||
|
bugzilla:NA
|
||||||
|
CVE:NA
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
Change the unic_ppp directory to ub_ppp and add a blank line to the end of the hikp_unic_ppp.c file.
|
||||||
|
|
||||||
|
Signed-off-by: Jianqiang Li <lijianqiang16@huawei.com>
|
||||||
|
---
|
||||||
|
net/ub/{ub_unic => ub_ppp}/hikp_unic_ppp.c | 2 +-
|
||||||
|
net/ub/{ub_unic => ub_ppp}/hikp_unic_ppp.h | 0
|
||||||
|
2 files changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
rename net/ub/{ub_unic => ub_ppp}/hikp_unic_ppp.c (99%)
|
||||||
|
rename net/ub/{ub_unic => ub_ppp}/hikp_unic_ppp.h (100%)
|
||||||
|
|
||||||
|
diff --git a/net/ub/ub_unic/hikp_unic_ppp.c b/net/ub/ub_ppp/hikp_unic_ppp.c
|
||||||
|
similarity index 99%
|
||||||
|
rename from net/ub/ub_unic/hikp_unic_ppp.c
|
||||||
|
rename to net/ub/ub_ppp/hikp_unic_ppp.c
|
||||||
|
index 5325b03..ccba4e0 100644
|
||||||
|
--- a/net/ub/ub_unic/hikp_unic_ppp.c
|
||||||
|
+++ b/net/ub/ub_ppp/hikp_unic_ppp.c
|
||||||
|
@@ -465,4 +465,4 @@ static void cmd_unic_get_ppp_init(void)
|
||||||
|
cmd_option_register("-du", "--dump", true, hikp_unic_cmd_ppp_feature_select);
|
||||||
|
}
|
||||||
|
|
||||||
|
-HIKP_CMD_DECLARE("unic_ppp", "dump ppp info of unic!", cmd_unic_get_ppp_init);
|
||||||
|
\ No newline at end of file
|
||||||
|
+HIKP_CMD_DECLARE("unic_ppp", "dump ppp info of unic!", cmd_unic_get_ppp_init);
|
||||||
|
diff --git a/net/ub/ub_unic/hikp_unic_ppp.h b/net/ub/ub_ppp/hikp_unic_ppp.h
|
||||||
|
similarity index 100%
|
||||||
|
rename from net/ub/ub_unic/hikp_unic_ppp.h
|
||||||
|
rename to net/ub/ub_ppp/hikp_unic_ppp.h
|
||||||
|
--
|
||||||
|
2.21.0.windows.1
|
||||||
|
|
||||||
29
0051-hikptool-roce-Fix-the-wrong-maximum-of-gmv-index.patch
Normal file
29
0051-hikptool-roce-Fix-the-wrong-maximum-of-gmv-index.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 48d87bcd204c6aa226b5dbdb8c68ead8d12b1745 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
Date: Tue, 31 Oct 2023 20:51:38 +0800
|
||||||
|
Subject: hikptool/roce: Fix the wrong maximum of gmv index
|
||||||
|
|
||||||
|
The RoCE driver supports up to 256 gmv table entry, the allowed
|
||||||
|
gmv index of hikptool command roce_gmv should cover this range.
|
||||||
|
|
||||||
|
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
---
|
||||||
|
net/roce/roce_gmv/hikp_roce_gmv.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/net/roce/roce_gmv/hikp_roce_gmv.h b/net/roce/roce_gmv/hikp_roce_gmv.h
|
||||||
|
index 1ef5b93..a02b960 100644
|
||||||
|
--- a/net/roce/roce_gmv/hikp_roce_gmv.h
|
||||||
|
+++ b/net/roce/roce_gmv/hikp_roce_gmv.h
|
||||||
|
@@ -18,7 +18,7 @@
|
||||||
|
|
||||||
|
#define ROCE_HIKP_GMV_REG_NUM 7
|
||||||
|
#define ROCE_HIKP_GMV_REG_SWICTH 2
|
||||||
|
-#define ROCE_MAX_HIKPTOOL_GMV 128
|
||||||
|
+#define ROCE_MAX_HIKPTOOL_GMV 256
|
||||||
|
struct cmd_roce_gmv_param {
|
||||||
|
struct tool_target target;
|
||||||
|
uint32_t gmv_index;
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
1390
0052-hikptool-Resolved-some-centralized-code-review-comme.patch
Normal file
1390
0052-hikptool-Resolved-some-centralized-code-review-comme.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,42 @@
|
|||||||
|
From 15e5379c7a1e041d8ea384f55c6cf77698646ac7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
Date: Tue, 7 Nov 2023 15:59:27 +0800
|
||||||
|
Subject: hikptool/roce: Fix the infinite loop due to compatibility issue
|
||||||
|
|
||||||
|
When a new-version hikptool sends a subcmd of caep ext registers to
|
||||||
|
an old-version FW which doesn't support the query of ext registers
|
||||||
|
yet, due to the lack of subcmd check in old-version FW, there will
|
||||||
|
be no error and register data will still be responsed to hikptool.
|
||||||
|
|
||||||
|
In the new-version hikptool, a do-while loop is used to implement a
|
||||||
|
multi-round query, and the loop variable is updated based on the
|
||||||
|
cur_block_num responsed from FW. Since there is no error reported,
|
||||||
|
the new-version hikptool will parse the old-version data based on the
|
||||||
|
new-version data structure. This may cause the parsed cur_block_num
|
||||||
|
remains 0, and the loop becomes infinite.
|
||||||
|
|
||||||
|
To fix this problem, add a check of the responsed cur_block_num.
|
||||||
|
If it's 0, return with an error code.
|
||||||
|
|
||||||
|
Fixes: 8b3b68347165 ("hikptool/roce: Add a common frame for hikptool roce register query")
|
||||||
|
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
|
||||||
|
---
|
||||||
|
net/roce/roce_ext_common/hikp_roce_ext_common.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/net/roce/roce_ext_common/hikp_roce_ext_common.c b/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
index 3a0c1ae..5bc3ce6 100644
|
||||||
|
--- a/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
+++ b/net/roce/roce_ext_common/hikp_roce_ext_common.c
|
||||||
|
@@ -131,7 +131,7 @@ static int hikp_roce_ext_get_res(enum roce_cmd_type cmd_type,
|
||||||
|
}
|
||||||
|
|
||||||
|
cur_size = res_head->cur_block_num * sizeof(uint32_t);
|
||||||
|
- if (cur_size > max_size) {
|
||||||
|
+ if (!cur_size || cur_size > max_size) {
|
||||||
|
printf("hikptool roce_%s log data copy size error, data size: 0x%zx, max size: 0x%zx\n",
|
||||||
|
cmd_name, cur_size, max_size);
|
||||||
|
ret = -EINVAL;
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
||||||
@ -3,7 +3,7 @@
|
|||||||
Name: hikptool
|
Name: hikptool
|
||||||
Summary: A userspace tool for Linux providing problem location on Kunpeng chips
|
Summary: A userspace tool for Linux providing problem location on Kunpeng chips
|
||||||
Version: 1.0.0
|
Version: 1.0.0
|
||||||
Release: 12
|
Release: 13
|
||||||
License: MulanPSL2
|
License: MulanPSL2
|
||||||
Source: %{name}-%{version}.tar.gz
|
Source: %{name}-%{version}.tar.gz
|
||||||
ExclusiveOS: linux
|
ExclusiveOS: linux
|
||||||
@ -54,6 +54,21 @@ Patch0035: 0035-hikptool-support-to-query-pfc-storm-parameters.patch
|
|||||||
Patch0036: 0036-hikptool-add-sub-cmd-nic_torus-support.patch
|
Patch0036: 0036-hikptool-add-sub-cmd-nic_torus-support.patch
|
||||||
Patch0037: 0037-hikptool-optimized-display-the-hot-plug-card-info-in.patch
|
Patch0037: 0037-hikptool-optimized-display-the-hot-plug-card-info-in.patch
|
||||||
Patch0038: 0038-hikptool-Update-the-tool-version-number-to-1.1.0.patch
|
Patch0038: 0038-hikptool-Update-the-tool-version-number-to-1.1.0.patch
|
||||||
|
Patch0039: 0039-hikptool-roce-Add-a-common-frame-for-hikptool-roce-r.patch
|
||||||
|
Patch0040: 0040-hikptool-roce-Add-roce_rst-cmd-for-reset-signal-regi.patch
|
||||||
|
Patch0041: 0041-hikptool-roce-Add-roce_global_cfg-cmd-for-global-con.patch
|
||||||
|
Patch0042: 0042-hikptool-roce-Add-roce_bond-cmd-for-bond-registers-q.patch
|
||||||
|
Patch0043: 0043-hikptool-roce-Add-ext-query-for-roce_caep-cmd.patch
|
||||||
|
Patch0044: 0044-hikptool-roce-Add-ext-query-for-roce_mdb-cmd.patch
|
||||||
|
Patch0045: 0045-hikptool-roce-Add-ext-query-for-roce_qmm-cmd.patch
|
||||||
|
Patch0046: 0046-hikptool-Querying-the-SerDes-Relationship-of-the-PCI.patch
|
||||||
|
Patch0047: 0047-hikptool-Remove-the-function-of-querying-SAS-device-.patch
|
||||||
|
Patch0048: 0048-hikptool-roce-Use-calloc-to-alloc-memory-for-array-i.patch
|
||||||
|
Patch0049: 0049-hikptool-roce-Fix-missing-check-of-reg-num-responsed.patch
|
||||||
|
Patch0050: 0050-hikptool-Change-the-unic_ppp-directory-to-ub_ppp.patch
|
||||||
|
Patch0051: 0051-hikptool-roce-Fix-the-wrong-maximum-of-gmv-index.patch
|
||||||
|
Patch0052: 0052-hikptool-Resolved-some-centralized-code-review-comme.patch
|
||||||
|
Patch0053: 0053-hikptool-roce-Fix-the-infinite-loop-due-to-compatibi.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package contains the hikptool
|
This package contains the hikptool
|
||||||
@ -106,6 +121,9 @@ fi
|
|||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 16 2023 veega2022 <zhuweijia@huawei.com> 1.0.0-13
|
||||||
|
- Synchronize the code and add the DFX of the roce module to resolve some review comments
|
||||||
|
|
||||||
* Fri Oct 20 2023 veega2022 <zhuweijia@huawei.com> 1.0.0-12
|
* Fri Oct 20 2023 veega2022 <zhuweijia@huawei.com> 1.0.0-12
|
||||||
- Added DFX for UB, NIC, MAC modules, fixed some bugs
|
- Added DFX for UB, NIC, MAC modules, fixed some bugs
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user