diff options
author | Jian Shen <shenjian15@huawei.com> | 2021-05-31 10:38:45 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-05-31 22:53:08 -0700 |
commit | 0ca821da86a5ec24eb2ece24fe87e5bf518c5939 (patch) | |
tree | c9fb5ea9041c1ef2db2d7eac9d63785c6507eeca /drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | |
parent | fa6a262a255003ebb1f514fffd3399f3946d4fc9 (diff) | |
download | lwn-0ca821da86a5ec24eb2ece24fe87e5bf518c5939.tar.gz lwn-0ca821da86a5ec24eb2ece24fe87e5bf518c5939.zip |
net: hns3: add debugfs support for vlan configuration
Add debugfs support for vlan configuraion. create a single file
"vlan_config" for it, and query it by command "cat vlan_config",
return the result to userspace.
The new display style is below:
$ cat vlan_config
I_PORT_VLAN_FILTER: on
E_PORT_VLAN_FILTER: off
FUNC_ID I_VF_VLAN_FILTER E_VF_VLAN_FILTER PORT_VLAN_FILTER_BYPASS
pf off on off
vf0 off on off
FUNC_ID PVID ACCEPT_TAG1 ACCEPT_TAG2 ACCEPT_UNTAG1 ACCEPT_UNTAG2
pf 0 on on on on
vf0 0 on on on on
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c index 3feba43586e0..cf1efd2f4a0f 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c @@ -309,6 +309,13 @@ static struct hns3_dbg_cmd_info hns3_dbg_cmd[] = { .buf_len = HNS3_DBG_READ_LEN, .init = hns3_dbg_common_file_init, }, + { + .name = "vlan_config", + .cmd = HNAE3_DBG_CMD_VLAN_CONFIG, + .dentry = HNS3_DBG_DENTRY_COMMON, + .buf_len = HNS3_DBG_READ_LEN, + .init = hns3_dbg_common_file_init, + }, }; static struct hns3_dbg_cap_info hns3_dbg_cap[] = { |