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 9269443346 for ; Thu, 16 Nov 2023 16:27:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B029402B0; Thu, 16 Nov 2023 16:27:56 +0100 (CET) Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181]) by mails.dpdk.org (Postfix) with ESMTP id 053F440150 for ; Thu, 16 Nov 2023 16:27:55 +0100 (CET) Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-5c08c47c055so10138587b3.1 for ; Thu, 16 Nov 2023 07:27:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700148474; x=1700753274; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=h2FAs4I22JBZx3xAnOSyzQvo9S42bwKBctulsoHcU7k=; b=F2/lFGZXfUB/NzbaYDPlEXtoXiBJs3PY3Jik4Izcjkgkj11CnaEtzrvme8Enp1KLfh x4HFVBRWt05AVv7H2YzYOOKV3ETvtcKFi3x5bBzwV5KhCx8JiouKGQTKwUxN9IFqnsX7 J0Lkm5DZvotIORggwaUpCwAnG8zl6eodzNt7KlI51Ln2mLn4Ndws7QXOVKSmeZaQwqzK BmL106Jko70AFvhzjzhkqqzLvULnHQQ8aOXbmsyJI/L/cALUHmYmD5O0QucBGHwZ9Ylm 9wcIxr9B0Yf+XPrmekn/SuXsJNey9Q0+jqikzdDYXHSpLK4ZK3nhMOyzxur3U+3v2SYn 4Emg== X-Gm-Message-State: AOJu0Yz0AkSg6uwQVLEtdmXT8ADJR2ZUf0UMHG+X1LPeggzy3cofUFx8 98RAr5DaTbSrwWetn5BeRTcy+G7Q7dkWAg== X-Google-Smtp-Source: AGHT+IFS+5ukpBIDTUv3FIo5/TJ/wOASD9ytuWzwY7lEhGYY6YLNWnzajdSJSKad9Qop6VyG5Mp96Q== X-Received: by 2002:a81:a709:0:b0:5c4:33d1:1757 with SMTP id e9-20020a81a709000000b005c433d11757mr6743548ywh.13.1700148474100; Thu, 16 Nov 2023 07:27:54 -0800 (PST) Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com. [209.85.219.172]) by smtp.gmail.com with ESMTPSA id l128-20020a819486000000b0059ae483b89dsm1054573ywg.50.2023.11.16.07.27.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Nov 2023 07:27:54 -0800 (PST) Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-da37522a363so909178276.0 for ; Thu, 16 Nov 2023 07:27:53 -0800 (PST) X-Received: by 2002:a25:6853:0:b0:daf:7704:3f60 with SMTP id d80-20020a256853000000b00daf77043f60mr15164927ybc.24.1700148473540; Thu, 16 Nov 2023 07:27:53 -0800 (PST) MIME-Version: 1.0 References: <20231116123455.36816-1-fengchengwen@huawei.com> In-Reply-To: <20231116123455.36816-1-fengchengwen@huawei.com> From: Luca Boccassi Date: Thu, 16 Nov 2023 15:27:41 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 20.11] net/hns3: fix traffic management thread safety To: Chengwen Feng Cc: stable@dpdk.org, ktraynor@redhat.com, lihuisong@huawei.com, haijie1@huawei.com Content-Type: text/plain; charset="UTF-8" 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 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?