net: hns3: add support for FD counter in debugfs
authorJian Shen <shenjian15@huawei.com>
Sat, 26 Jun 2021 01:00:16 +0000 (09:00 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jun 2021 20:34:58 +0000 (13:34 -0700)
commit03a92fe8cedb6f619df416d38d0b57fd55070cd7
tree1cda6d40300ce0054c18e96c991faac77ba12e39
parentc948b46a7dcd131e3ac3d4ed48f9cfaaa9103d58
net: hns3: add support for FD counter in debugfs

Previously, the flow director counter is not enabled. To improve the
maintainability for chechking whether flow director hit or not, enable
flow director counter for each function, and add debugfs query inerface
to query the counters for each function.

The debugfs command is below:
cat fd_counter
func_id    hit_times
pf         0
vf0        0
vf1        0

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c