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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 2BD93C11F64 for ; Thu, 1 Jul 2021 14:56:41 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 80E0B6141F for ; Thu, 1 Jul 2021 14:56:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80E0B6141F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.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 8EF4440141; Thu, 1 Jul 2021 16:56:38 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 8D6034003E for ; Thu, 1 Jul 2021 16:56:36 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10032"; a="195712176" X-IronPort-AV: E=Sophos;i="5.83,314,1616482800"; d="scan'208";a="195712176" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2021 07:56:35 -0700 X-IronPort-AV: E=Sophos;i="5.83,314,1616482800"; d="scan'208";a="420430451" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.3.218]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 01 Jul 2021 07:56:33 -0700 Date: Thu, 1 Jul 2021 15:56:29 +0100 From: Bruce Richardson To: Morten =?iso-8859-1?Q?Br=F8rup?= Cc: dev@dpdk.org, anatoly.burakov@intel.com Message-ID: References: <20210701093456.43426-1-bruce.richardson@intel.com> <98CBD80474FA8B44BF855DF32C47DC35C618D0@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35C618D0@smartserver.smartshare.dk> Subject: Re: [dpdk-dev] [PATCH] 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 Thu, Jul 01, 2021 at 04:43:48PM +0200, Morten Brørup wrote: > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > > Sent: Thursday, 1 July 2021 11.35 > > > > 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 > > --- > > lib/eal/linux/eal.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c > > index ba19fc6347..1e05ba3847 100644 > > --- a/lib/eal/linux/eal.c > > +++ b/lib/eal/linux/eal.c > > @@ -838,9 +838,8 @@ eal_parse_args(int argc, char **argv) > > } > > } > > > > - /* create runtime data directory */ > > - if (internal_conf->no_shconf == 0 && > > - eal_create_runtime_dir() < 0) { > > + /* create runtime data directory. In no_shconf mode, skip any > > errors */ > > + if (eal_create_runtime_dir() < 0 && internal_conf->no_shconf == > > 0) { > > RTE_LOG(ERR, EAL, "Cannot create runtime directory\n"); > > ret = -1; > > goto out; > > When internal_conf->no_shconf == 1 and eal_create_runtime_dir() fails, DPDK will run without telemetry. Shouldn't it then be logged that telemetry is unavailable (and why it is unavailable)? > There will be an error printed from the telemetry library about the socket creation failing. However, it probably could do with being improved. I'll see about creating a separate patch for that, since EAL should not be required to know about what other libs may need a runtime dir or not. /Bruce