• Guangbin Huang's avatar
    net: hns3: refactor dump qos buf cfg of debugfs · 95b19586
    Guangbin Huang authored
    Currently, user gets qos buffer config by implementing debugfs command
    "echo dump qos buf cfg > cmd", this command will dump info in dmesg.
    It's unnecessary and heavy.
    
    To optimize it, create a single file "qos_buf_cfg" in tm directory
    and use cat command to get info. It will return info to userspace,
    rather than record in dmesg.
    
    The display style is below:
    $ cat qos_buf_cfg
    tx_packet_buf_tc_0: 0x120
    tx_packet_buf_tc_1: 0x120
    tx_packet_buf_tc_2: 0x120
    tx_packet_buf_tc_3: 0x120
    tx_packet_buf_tc_4: 0x0
    tx_packet_buf_tc_5: 0x0
    tx_packet_buf_tc_6: 0x0
    tx_packet_buf_tc_7: 0x0
    ......
    Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
    Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    95b19586
hns3_debugfs.c 30.5 KB