diff options
author | Huazhong Tan <tanhuazhong@huawei.com> | 2021-05-14 11:25:13 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-05-14 15:07:34 -0700 |
commit | 77e9184869c9fb00a482357ea8eef3bd7ae3d45a (patch) | |
tree | 714d2cb2ae40036ac98bcfaf834be3e41d7db813 /drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | |
parent | net: hns3: refactor dev capability and dev spec of debugfs (diff) | |
download | linux-dev-77e9184869c9fb00a482357ea8eef3bd7ae3d45a.tar.xz linux-dev-77e9184869c9fb00a482357ea8eef3bd7ae3d45a.zip |
net: hns3: refactor dump bd info of debugfs
Currently, the debugfs command for bd info is implemented
by "echo xxxx > cmd", and record the information in dmesg.
It's unnecessary and heavy.
To improve it, add two debugfs directories "tx_bd_info" and
"rx_bd_info", and create a file for each queue under these
two directories, and query the bd info of specific queue by
"cat tx_bd_info/tx_bd_queue*" or "cat rx_bd_info/rx_bd_queue*",
return the result to userspace, rather than record in dmesg.
The display style is below:
$ cat rx_bd_info/rx_bd_queue0
Queue 0 rx bd info:
BD_IDX L234_INFO PKT_LEN SIZE...
0 0x0 60 60...
1 0x0 1512 1512...
$ cat tx_bd_info/tx_bd_queue0
Queue 0 tx bd info:
BD_IDX ADDRESS VLAN_TAG SIZE...
0 0x0 0 0...
1 0x0 0 0...
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/hns3_enet.h')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h index 5c72f41cf57e..79ff2fa61d47 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h @@ -655,4 +655,5 @@ void hns3_dbg_uninit(struct hnae3_handle *handle); void hns3_dbg_register_debugfs(const char *debugfs_dir_name); void hns3_dbg_unregister_debugfs(void); void hns3_shinfo_pack(struct skb_shared_info *shinfo, __u32 *size); +u16 hns3_get_max_available_channels(struct hnae3_handle *h); #endif |