OSDN Git Service

net: hns3: refactor queue map of debugfs
authorHao Chen <chenhao288@hisilicon.com>
Thu, 20 May 2021 02:21:32 +0000 (10:21 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 May 2021 22:01:03 +0000 (15:01 -0700)
commitd2f737cf21b87d4239987da69a3b14730c6a57ad
treecf33affa9c94c396dbf4968ea9780e0a142ac4e3
parent365e860aa7a74afe1ba7157b3bfc547551c5795e
net: hns3: refactor queue map of debugfs

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

The display style is below:
$ cat queue_map
local_queue_id   global_queue_id   vector_id
0                0                 341

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>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.h