• Hao Chen's avatar
    net: hns3: refactor queue info of debugfs · e44c495d
    Hao Chen authored
    Currently, the debugfs command for queue info is implemented by
    "echo xxxx > cmd", and record the information in dmesg. It's
    unnecessary and heavy. To improve it, create two files
    "rx_queue_info" and "tx_queue_info" for it, and query it
    by command "cat rx_queue_info" and "cat tx_queue_info",
    return the result to userspace, rather than record in dmesg.
    
    The display style is below:
    $ cat rx_queue_info
    QUEUE_ID  BD_NUM  BD_LEN  TAIL  HEAD  FBDNUM  PKTNUM   ...
    0           0       0     0     0       0       0      ...
    1           0       0     0     0       0       0      ...
    2           0       0     0     0       0       0      ...
    
    $ cat tx_queue_info
    QUEUE_ID  BD_NUM  TC  TAIL  HEAD  FBDNUM  OFFSET  PKTNUM  ...
    0           0     0     0     0       0       0        0  ...
    1           0     0     0     0       0       0        0  ...
    2           0     0     0     0       0       0        0  ...
    Signed-off-by: default avatarHao Chen <chenhao288@hisilicon.com>
    Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e44c495d
hns3_debugfs.h 1.35 KB