[PATCH 1/3] net/hns3: fix inconsistent lock

huangdengdui huangdengdui at huawei.com
Fri Aug 22 06:00:28 CEST 2025


On 2025/8/21 20:24, David Marchand wrote:
> Hello,
> 
> On Wed, Aug 13, 2025 at 9:33 AM Dengdui Huang <huangdengdui at huawei.com> wrote:
>>
>> The hns3 driver supports configuring RSS through both ops API and
>> rte_flow API. The ops API uses spink lock, while the rte_flow API uses
>> pthread mutex lock. When concurrent calls occur, issues may arise.
>> This patch replaces the lock in the flow API with spink lock.
>>
>> Fixes: 1bdcca8006e4 ("net/hns3: fix flow director lock")
>> Cc: stable at dpdk.org
>>
>> Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
>> ---
>>  drivers/net/hns3/hns3_ethdev.h |  1 -
>>  drivers/net/hns3/hns3_fdir.c   | 13 --------
>>  drivers/net/hns3/hns3_flow.c   | 57 +++++++++++++---------------------
>>  3 files changed, 22 insertions(+), 49 deletions(-)
> 
> With this change, is it possible to enable the lock annotations check?
> 

This is fine. I will enable it in the next version.

> I mean:
> $ git diff
> diff --git a/drivers/net/hns3/meson.build b/drivers/net/hns3/meson.build
> index 53a9dd6f39..36ce93ccde 100644
> --- a/drivers/net/hns3/meson.build
> +++ b/drivers/net/hns3/meson.build
> @@ -35,8 +35,6 @@ sources = files(
> 
>  require_iova_in_mbuf = false
> 
> -annotate_locks = false
> -
>  deps += ['hash']
> 
>  cflags += no_wvla_cflag
> 
> 
> 
> 


More information about the dev mailing list