From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C66DB4334B for ; Fri, 17 Nov 2023 02:02:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A8C1B40275; Fri, 17 Nov 2023 02:02:46 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 47E8640271 for ; Fri, 17 Nov 2023 02:02:45 +0100 (CET) Received: from dggpeml100024.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SWdnK2cpKzNmNP; Fri, 17 Nov 2023 08:58:29 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by dggpeml100024.china.huawei.com (7.185.36.115) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 17 Nov 2023 09:02:42 +0800 Subject: Re: [PATCH 20.11] net/hns3: fix traffic management thread safety To: Luca Boccassi CC: , , , References: <20231116123455.36816-1-fengchengwen@huawei.com> From: fengchengwen Message-ID: Date: Fri, 17 Nov 2023 09:02:42 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml100024.china.huawei.com (7.185.36.115) X-CFilter-Loop: Reflected X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi Luca, On 2023/11/16 23:27, Luca Boccassi wrote: > On Thu, 16 Nov 2023 at 12:37, Chengwen Feng 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 >> Signed-off-by: Dongdong Liu >> --- >> 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? Sorry for this, it was target for 21.11, I wrote the wrong prefix. Thanks Chengwen > > . >