]> git.baikalelectronics.ru Git - 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)
commit6d167e2c2e81f6877f75e47f88198a6b10626b27
tree2793dc0f187f7eb516cb098fd817853b0602a6f5
parent17c93f01d5f1699e384ffc4e035ae36314ceabfe
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