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 44AE8A054D for ; Tue, 31 May 2022 19:40:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EFDF427F3; Tue, 31 May 2022 19:40:24 +0200 (CEST) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id D641E40E0F for ; Tue, 31 May 2022 19:40:22 +0200 (CEST) Received: by mail-pj1-f48.google.com with SMTP id 3-20020a17090a174300b001e426a02ac5so356751pjm.2 for ; Tue, 31 May 2022 10:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d4z035WE0K8mpJDQozJq6cu9nHTanNObD/Dso9vQljM=; b=fxebqCArzSftdY3PT92Ckp1csGbnV8Dl+qzLvIw12kB9wCc7ZvF3P9FqY078fbHY+Q OqCvFjLbahkJg/bw/ZGkY+04tkpD8/9UMzq9OBM/vMX+raSJ9FIyoimAj43Wqn/HtU1B r+lOHr/lihwDp0gj5/uEWSJ+f0IEBKxvy4WzFKRpIgVax9uqsNPYQROZaVhYl/f3Yh5m rcfwm6t9gKaf2O4o1X4gMIJ1rymbsG4YUoTX5/mCjoK3x6l6KaxY0AjuBladEyVSZESB 2A8jzGwV8xAk0aQpR2/4aSSrpeUO8pHXHKc0lHVNI+Y3ly/f/OQ5Xsv97zaVDfShgdyF Ihpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d4z035WE0K8mpJDQozJq6cu9nHTanNObD/Dso9vQljM=; b=uKtnaQNoIMvz8lqmEebG5eOBYoxihWnMaND/5mLxkMqIl2LGxHygr9zehT0N0NwtR/ FD6xQppGyxe9sapKMBBTNV2ITiHCir+UTal+uf0cYVQY359iUH1gk8FjNjxxTz8XKNbD 3LXGrTbDOlnJVYc8UJnixM57/n3iy6AvbEQptSu19KX54LgKngXBYNxH+NZ6EU2TkiX4 XIWMFZtJs7Y4Elj+sFXb1b3FjoZcxeFxz0pGRUmBbagvhJt3CtZKW/RgnF8f7BxgcxDH auFk67fqPojBOYkwH/WiQVHz2Ujmiz1MVk+Fg0qEIfSF0ylrUEvXCCMH3copNnLVx/Zp 3KHQ== X-Gm-Message-State: AOAM5332RYpqN2WRpF58gkxbLKJe+q4y7SfYZKEe/JsnXd+9JvG9qE3F hzyHSSei/9G8Q1lQ8/b7bZp+Nw== X-Google-Smtp-Source: ABdhPJyAMrojta7GGrwii5PSJIu2Fi06mc4ytc3nm1dK5TLQ4piX31ilS5BEoHdvE+G+H2buUVFxKw== X-Received: by 2002:a17:902:b205:b0:163:5c5b:e2de with SMTP id t5-20020a170902b20500b001635c5be2demr32047482plr.26.1654018821904; Tue, 31 May 2022 10:40:21 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id cp22-20020a056a00349600b005087c23ad8dsm10880917pfb.0.2022.05.31.10.40.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 10:40:21 -0700 (PDT) Date: Tue, 31 May 2022 10:40:17 -0700 From: Stephen Hemminger To: Andrew Rybchenko Cc: "Min Hu (Connor)" , dev@dpdk.org, stable@dpdk.org, Thomas Monjalon , Ferruh Yigit , Anatoly Burakov , Ajit Khaparde Subject: Re: [PATCH] ethdev: fix dev close in secondary process Message-ID: <20220531104017.47e59978@hermes.local> In-Reply-To: References: <20220527023553.48177-1-humin29@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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.