aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
diff options
context:
space:
mode:
authorGuangbin Huang <huangguangbin2@huawei.com>2021-05-20 10:21:36 +0800
committerDavid S. Miller <davem@davemloft.net>2021-05-20 15:01:03 -0700
commitcad7c215a4b1bc67920ab0d2673ac08a2cc885f1 (patch)
tree933497ecf5ba6739d500312b066e8adfc15e4c60 /drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
parentnet: hns3: refactor dump tm map of debugfs (diff)
downloadlinux-dev-cad7c215a4b1bc67920ab0d2673ac08a2cc885f1.tar.xz
linux-dev-cad7c215a4b1bc67920ab0d2673ac08a2cc885f1.zip
net: hns3: refactor dump tm of debugfs
Currently, user gets some tm info by implementing debugfs command "echo dump tm > cmd", this command will dump info in dmesg. It's unnecessary and heavy. In addition, the info of this command mixes info of qset, priority, pg and port. Qset and priority have their own command to get info of themself, so can remove info of qset and priority from this command. To optimize it, create two new files "tm_pg", "tm_port" in tm directory and use cat command to separately get info of pg and port. The display style is below: $ cat tm_pg ID PRI_MAP MODE DWRR C_IR_B C_IR_U C_IR_S C_BS_B C_BS_S ... 00 0x1f dwrr 1 75 9 0 31 20 ... $ cat tm_port IR_B IR_U IR_S BS_B BS_S FLAG RATE(Mbps) 75 9 0 31 20 1 200000 Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
index 39a24cc143f6..4061f1f36739 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
@@ -72,6 +72,20 @@ static struct hns3_dbg_cmd_info hns3_dbg_cmd[] = {
.init = hns3_dbg_common_file_init,
},
{
+ .name = "tm_pg",
+ .cmd = HNAE3_DBG_CMD_TM_PG,
+ .dentry = HNS3_DBG_DENTRY_TM,
+ .buf_len = HNS3_DBG_READ_LEN,
+ .init = hns3_dbg_common_file_init,
+ },
+ {
+ .name = "tm_port",
+ .cmd = HNAE3_DBG_CMD_TM_PORT,
+ .dentry = HNS3_DBG_DENTRY_TM,
+ .buf_len = HNS3_DBG_READ_LEN,
+ .init = hns3_dbg_common_file_init,
+ },
+ {
.name = "dev_info",
.cmd = HNAE3_DBG_CMD_DEV_INFO,
.dentry = HNS3_DBG_DENTRY_COMMON,
@@ -725,7 +739,6 @@ static void hns3_dbg_help(struct hnae3_handle *h)
return;
dev_info(&h->pdev->dev, "dump tc\n");
- dev_info(&h->pdev->dev, "dump tm\n");
dev_info(&h->pdev->dev, "dump qos pause cfg\n");
dev_info(&h->pdev->dev, "dump qos pri map\n");
dev_info(&h->pdev->dev, "dump qos buf cfg\n");