From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-24.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 354EFC07E95 for ; Wed, 7 Jul 2021 19:02:34 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id AA72B61C4E for ; Wed, 7 Jul 2021 19:02:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA72B61C4E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 99565413E9; Wed, 7 Jul 2021 21:02:32 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 86782413DB for ; Wed, 7 Jul 2021 21:02:31 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id CCB1F20B7188; Wed, 7 Jul 2021 12:02:30 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CCB1F20B7188 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1625684550; bh=ckInPHHvAD2mDqjQLIB6vgIi7dVYIOYsqi/jBeAuLbs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cKQ1Z7c9CpdnKiKia9WswSOb46V512k0x5zfQLVPZC0mRta24+HkCM+p6ymVUTJkW PCm9K/sxoRsQzvpZiWuPCmqzZHzzVh1UFG80kDdMaYqXIQoKPuEfJsq+oUzTBrC5u1 KM7gQQTXMz8kgBTojEKNU5di47z7XoUMUXDquXzo= Date: Wed, 7 Jul 2021 12:02:30 -0700 From: Tyler Retzlaff To: Bruce Richardson Cc: dev@dpdk.org, mb@smartsharesystems.com Message-ID: <20210707190230.GC21313@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20210701093456.43426-1-bruce.richardson@intel.com> <20210702125554.606364-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210702125554.606364-1-bruce.richardson@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [dpdk-dev] [PATCH v2 1/2] eal: create runtime dir even when shared data is not used 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 Sender: "dev" On Fri, Jul 02, 2021 at 01:55:53PM +0100, Bruce Richardson wrote: > When multi-process is not wanted and DPDK is run with the "no-shconf" > flag, the telemetry library still needs a runtime directory to place the > unix socket for telemetry connections. Therefore, rather than not > creating the directory when this flag is set, we can change the code to > attempt the creation anyway, but not error out if it fails. If it > succeeds, then telemetry will be available, but if it fails, the rest of > DPDK will run without telemetry. This ensures that the "in-memory" flag > will allow DPDK to run even if the whole filesystem is read-only, for > example. > > Signed-off-by: Bruce Richardson > --- Acked-By: Tyler Retzlaff > V2: add a warning for the no-shconf case, rather than skipping it silently. > > lib/eal/linux/eal.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > > diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c > index ba19fc6347..ccb7535619 100644 > --- a/lib/eal/linux/eal.c > +++ b/lib/eal/linux/eal.c > @@ -838,12 +838,14 @@ eal_parse_args(int argc, char **argv) > } > } > > - /* create runtime data directory */ > - if (internal_conf->no_shconf == 0 && > - eal_create_runtime_dir() < 0) { > - RTE_LOG(ERR, EAL, "Cannot create runtime directory\n"); > - ret = -1; > - goto out; > + /* create runtime data directory. In no_shconf mode, skip any errors */ > + if (eal_create_runtime_dir() < 0) { nit: suggest explicit comparison against -1 instead of < 0 > + if (internal_conf->no_shconf == 0) { > + RTE_LOG(ERR, EAL, "Cannot create runtime directory\n"); > + ret = -1; > + goto out; > + } else > + RTE_LOG(WARNING, EAL, "No DPDK runtime directory created\n"); > } > > if (eal_adjust_config(internal_conf) != 0) { > -- > 2.30.2