net/hns3: fix flow director lock
authorChengwen Feng <fengchengwen@huawei.com>
Sat, 17 Apr 2021 09:54:58 +0000 (17:54 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 20 Apr 2021 00:40:43 +0000 (02:40 +0200)
commit1bdcca8006e4c690d017531f7fc6c31b19ad8d1d
treebf59ba3b5cebb554de3c2f788bc3f22c20f07c67
parentffd6b0b18b48d8d1b19d2567c58a0650e8d15df8
net/hns3: fix flow director lock

Currently, the fdir lock was used to protect concurrent access in
multiple processes, it has the following problems:
1) Lack of protection for fdir reset recover.
2) Only part of data is protected, eg. the filterlist is not protected.

We use the following scheme:
1) Del the fdir lock.
2) Add a flow lock and provides rte flow driver ops API-level
   protection.
3) Declare support RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE.

Fixes: fcba820d9b9e ("net/hns3: support flow director")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
drivers/net/hns3/hns3_ethdev.c
drivers/net/hns3/hns3_ethdev.h
drivers/net/hns3/hns3_ethdev_vf.c
drivers/net/hns3/hns3_fdir.c
drivers/net/hns3/hns3_fdir.h
drivers/net/hns3/hns3_flow.c