]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix aRFS FD rules leftover after add a user FD rule
authorGuojia Liao <liaoguojia@huawei.com>
Tue, 28 Jul 2020 02:16:51 +0000 (10:16 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Jul 2020 19:54:48 +0000 (12:54 -0700)
commit1e283057937ef0f0a4d4b071370b50e4a7b15a31
tree03ba46cb148b75967bbaee4e32a55dbb0b5f6453
parent1fbb1bea6e0fab64493226aa2531602b2d4da35c
net: hns3: fix aRFS FD rules leftover after add a user FD rule

When user had created a FD rule, all the aRFS rules should be clear up.
HNS3 process flow as below:
1.get spin lock of fd_ruls_list
2.clear up all aRFS rules
3.release lock
4.get spin lock of fd_ruls_list
5.creat a rules
6.release lock;

There is a short period of time between step 3 and step 4, which would
creatting some new aRFS FD rules if driver was receiving packet.
So refactor the fd_rule_lock to fix it.

Fixes: f6f9fc8bc479 ("net: hns3: refine the flow director handle")
Signed-off-by: Guojia Liao <liaoguojia@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c