diff options
author | Hao Chen <chenhao288@hisilicon.com> | 2021-05-20 05:21:34 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-05-21 01:01:03 +0300 |
commit | b5a0b70d77b9be91b8e6dfa5dd3b39ea9cf6be4c (patch) | |
tree | 947c9fdce5e5520e1961a1ec8cc52e15be5fb65e /drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h | |
parent | e44c495d95e0dd3a5513f72a830639a72b4c14f1 (diff) | |
download | linux-b5a0b70d77b9be91b8e6dfa5dd3b39ea9cf6be4c.tar.xz |
net: hns3: refactor dump fd tcam of debugfs
Currently, the debugfs command for fd tcam is implemented by
"echo xxxx > cmd", and record the information in dmesg. It's
unnecessary and heavy. To improve it, create a single file
"fd_tcam" for it, and query it by command "cat fd_tcam",
return the result to userspace, rather than record in dmesg.
The display style is below:
$ cat fd_tcam
read result tcam key x(31):
00000000
00000000
00000000
08000000
00000600
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
read result tcam key y(31):
00000000
00000000
00000000
f7ff0000
0000f900
00000000
00000000
00000000
00000000
00000000
00000000
00000000
0000fff8
Signed-off-by: Hao Chen <chenhao288@hisilicon.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/hns3pf/hclge_debugfs.h')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h index 933f157294fd..25b42da471e5 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h @@ -69,6 +69,11 @@ struct hclge_dbg_reg_common_msg { enum hclge_opcode_type cmd; }; +struct hclge_dbg_tcam_msg { + u8 stage; + u32 loc; +}; + #define HCLGE_DBG_MAX_DFX_MSG_LEN 60 struct hclge_dbg_dfx_message { int flag; |