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

David Marchand david.marchand at redhat.com
Thu Aug 21 14:24:10 CEST 2025


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?

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




-- 
David Marchand



More information about the dev mailing list