• Huazhong Tan's avatar
    net: hns3: refactor dump mac list of debugfs · 1556ea91
    Huazhong Tan authored
    Currently, the debugfs command for mac list info is implemented
    by "echo xxxx > cmd", and record the information in dmesg. It's
    unnecessary and heavy. To improve it, create two files "uc" and
    "mc" under directory "mac_list" for it, and query mac list info
    by "cat mac_list/uc" and "mac_list/mc", return the result to
    userspace, rather than record in dmesg.
    
    The display style is below:
    $ cat mac_list/uc
    UC MAC_LIST:
    FUNC_ID  MAC_ADDR            STATE
    pf       00:18:2d:00:00:71   ACTIVE
    
    $ cat mac_list/mc
    MC MAC_LIST:
    FUNC_ID  MAC_ADDR            STATE
    pf       01:80:c2:00:00:21   ACTIVE
    Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1556ea91
hns3_debugfs.h 1.22 KB