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 8BF51A0548; Tue, 31 May 2022 19:40:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C4F940E0F; Tue, 31 May 2022 19:40:23 +0200 (CEST) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id D52AB40A87 for ; Tue, 31 May 2022 19:40:22 +0200 (CEST) Received: by mail-pl1-f178.google.com with SMTP id w3so13449917plp.13 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=5RLYW5A14GZNRi6ps9Cszk7iGNDsdp6hSCHihsqvxCymBXNKRtRJpGxd24NcpG2hRl eXhwplIG4MtsxTzgNQ9cCwDT+JzsVQ6nUpTGSe/ao4doLHbJAddWo8DI2UC3ipyrahwc LTR65lKTHVGxn1RvN1t/7DtHJ3j8N/y083VPYVjzH0y/WTWQJTA7g60oliM01JU3293i UZIezq8Yw4pEPFb2WmIMgKKtF4QWWCW2JMmjeQDaTPS+EiRuqSo/mGUZzVMD0fW0Etdw GFLF44RMTmJ6kWwFQy+JAzomn6RRKzkW4zGF5uRkROMK+spf/EYyI3NUiZHiOPXh7Dl9 7vSQ== X-Gm-Message-State: AOAM5309/M4EGg6SFD1Bp5ujgqxHffbvlckr/nSPxJHDdFbjJGa8vh4/ zvVIwrne+0EFtoLDamXdy8AGvw== 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: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-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.