OSDN Git Service

net: hns3: optimize the filter table entries handling when resetting
authorJian Shen <shenjian15@huawei.com>
Fri, 24 Apr 2020 02:23:13 +0000 (10:23 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 26 Apr 2020 03:29:44 +0000 (20:29 -0700)
commit039ba863e8d71c52b1f5faf26b0f458eec33d5e7
tree24b79f4bcf15f74dc297a96dac74c36ff9fe9c59
parent7d0b345156d0678fbbbf885f991c6d83f23d70f1
net: hns3: optimize the filter table entries handling when resetting

Currently, the PF driver removes all (including its VFs') MAC/VLAN
flow director table entries when resetting, and restores them after
reset completed.

In fact, the hardware will clear all table entries only in IMP
reset and global reset. So driver only needs to restore the table
entries in these cases, and needs do nothing when PF reset, FLR
or other function level reset.

This patch optimizes it by removing unnecessary table entries clear
and restoring handling in the reset flow, and doing the restoring
after reset completed.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c