[PATCH 20.11] net/hns3: fix traffic management thread safety

Luca Boccassi bluca at debian.org
Thu Nov 16 16:27:41 CET 2023


On Thu, 16 Nov 2023 at 12:37, Chengwen Feng <fengchengwen at huawei.com> wrote:
>
> [ upstream commit 69901040975bff8a38edfc47aee727cadc87d356 ]
>
> The driver-related TM (traffic management) info is implemented through
> the linked list. The following threads are involved in the read and
> write of the TM info:
>
> 1. main thread: invokes the rte_tm_xxx() API family to modify or read.
> 2. interrupt thread: will read TM info in reset recover process.
>
> Currently, thread safety protection of TM info is implemented only in
> the following operations:
> 1. some of the rte_tm_xxx() API's implementation.
> 2. reset recover process.
>
> Thread safety risks may exist in other scenarios, so fix by make sure
> all the rte_tm_xxx() API's implementations protected by hw.lock.
>
> Fixes: c09c7847d892 ("net/hns3: support traffic management")
>
> Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
> Signed-off-by: Dongdong Liu <liudongdong3 at huawei.com>
> ---
>  drivers/net/hns3/hns3_tm.c | 173 ++++++++++++++++++++++++++++++++-----
>  1 file changed, 150 insertions(+), 23 deletions(-)
>

This patch doesn't apply on 20.11, did you mean to target it at 21.11 or 22.11?


More information about the stable mailing list