diff options
author | Huazhong Tan <tanhuazhong@huawei.com> | 2021-05-14 06:25:14 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-05-15 01:07:34 +0300 |
commit | 1556ea9120ffcf4faf7ac6b62a6e28216f260a23 (patch) | |
tree | 0a1fb50c684c0483481f7707c8697dabf01e7ce5 /drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h | |
parent | 77e9184869c9fb00a482357ea8eef3bd7ae3d45a (diff) | |
download | linux-1556ea9120ffcf4faf7ac6b62a6e28216f260a23.tar.xz |
net: hns3: refactor dump mac list of debugfs
Currently, the debugfs command for mac list info is implemented
by "echo xxxx > cmd", and record the information in dmesg. It's
unnecessary and heavy. To improve it, create two files "uc" and
"mc" under directory "mac_list" for it, and query mac list info
by "cat mac_list/uc" and "mac_list/mc", return the result to
userspace, rather than record in dmesg.
The display style is below:
$ cat mac_list/uc
UC MAC_LIST:
FUNC_ID MAC_ADDR STATE
pf 00:18:2d:00:00:71 ACTIVE
$ cat mac_list/mc
MC MAC_LIST:
FUNC_ID MAC_ADDR STATE
pf 01:80:c2:00:00:21 ACTIVE
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 | 9 |
1 files changed, 9 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 0c144532e6ad..c5c18afb8b88 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h @@ -728,4 +728,13 @@ static const struct hclge_dbg_dfx_message hclge_dbg_tqp_reg[] = { {true, "RCB_CFG_TX_RING_EBDNUM"}, }; +#define HCLGE_DBG_INFO_LEN 256 +#define HCLGE_DBG_ID_LEN 16 +#define HCLGE_DBG_ITEM_NAME_LEN 32 +#define HCLGE_DBG_DATA_STR_LEN 32 +struct hclge_dbg_item { + char name[HCLGE_DBG_ITEM_NAME_LEN]; + u16 interval; /* blank numbers after the item */ +}; + #endif |