]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net: hns3: refactor dump mac tnl status of debugfs
authorJiaran Zhang <zhangjiaran@huawei.com>
Thu, 20 May 2021 02:21:42 +0000 (10:21 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 May 2021 22:01:04 +0000 (15:01 -0700)
commit7b07ab06e6b00b4421a4dfd732e98b359e0bad91
tree2793dc0f187f7eb516cb098fd817853b0602a6f5
parent484e1ed1b25a6cd02ab25c871e670760f4b627b6
net: hns3: refactor dump mac tnl status of debugfs

Currently, the debugfs command for dump mac tnl status is
implemented by "echo xxxx > cmd", and record the information
in dmesg. It's unnecessary and heavy. To improve it, create
a single file "mac_tnl_status" for it, and query it by command
"cat mac_tnl_status", return the result to userspace, rather
than record in dmesg.

The display style is below:
$ cat mac_tnl_status
Recently generated mac tnl interruption:
[0111204.175437] status = 0x30
[0154120.329912] status = 0x30

Signed-off-by: Jiaran Zhang <zhangjiaran@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c