]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite57183546bd77829e87c60fe8e969bdf2d473a0f
treecf33affa9c94c396dbf4968ea9780e0a142ac4e3
parentd600646eba6439f3fbf3c8e9c5d7b20dc35fe8ef
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