net: hns3: refactor dump tc of debugfs
Currently, user gets tc schedule info by implementing debugfs command "echo dump tc > cmd", this command will dump info in dmesg. It's unnecessary and heavy. To optimize it, create a single file "tc_sch_info" and use cat command to get info. It will return info to userspace, rather than record in dmesg. The display style is below: $ cat tc_sch_info enabled tc number: 4 weight_offset: 14 TC MODE WEIGHT 0 dwrr 25 1 dwrr 25 2 dwrr 25 3 dwrr 25 4 dwrr 0 5 dwrr 0 6 dwrr 0 7 dwrr 0 Signed-off-by:Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by:
Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- drivers/net/ethernet/hisilicon/hns3/hnae3.h 1 addition, 0 deletionsdrivers/net/ethernet/hisilicon/hns3/hnae3.h
- drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c 7 additions, 1 deletiondrivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c 29 additions, 26 deletionsdrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
Loading
Please register or sign in to comment