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 8B825A0553 for ; Wed, 1 Jun 2022 03:33:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 802EE41143; Wed, 1 Jun 2022 03:33:15 +0200 (CEST) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id B08BB40150; Wed, 1 Jun 2022 03:33:12 +0200 (CEST) Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4LCWqb6TFRzDqZR; Wed, 1 Jun 2022 09:32:59 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 1 Jun 2022 09:33:10 +0800 Subject: Re: [PATCH] ethdev: fix dev close in secondary process To: Stephen Hemminger , Andrew Rybchenko CC: , , Thomas Monjalon , Ferruh Yigit , Anatoly Burakov , Ajit Khaparde References: <20220527023553.48177-1-humin29@huawei.com> <20220531104017.47e59978@hermes.local> From: "Min Hu (Connor)" Message-ID: Date: Wed, 1 Jun 2022 09:33:09 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20220531104017.47e59978@hermes.local> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500012.china.huawei.com (7.221.188.12) 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,Andrew, Stephen , I fixed the comment, thanks for your comment. ÔÚ 2022/6/1 1:40, Stephen Hemminger дµÀ: > On Tue, 31 May 2022 20:08:55 +0300 > Andrew Rybchenko wrote: > >> On 5/27/22 05:35, Min Hu (Connor) wrote: >>> From: Min Hu >>> >>> Shared memory like port private resources should only be reserved >>> by primary process. Secondary process should not start dev, and >>> the state of 'dev_started' is only meaningful to primary process. >>> While secondary process need to close dev to release process private >>> resources. >>> >>> This patch limited the scope of 'dev_started'. >> >> I agree with the patch since secondary process should not be >> obliged to wait for device stop before closing ethdev. In any >> case closing ethdev in secondary process should do nothing >> harmful to the primary process. >> >> However, the patch description pretends to limit dev_started >> scope for secondary processes in general. It is wrong since >> secondary processes need the information and that's why it is >> stored in shared memory. >> >>> >>> Fixes: febc855b358e ("ethdev: forbid closing started device") >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Min Hu >>> --- > > Also secondary processes are used differently by different application models. > > Some applications only use secondary process for information. > But some have a primary process that only inits DPDK and do everything > in a secondary process. > . >