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 20A80A0A0C; Thu, 1 Jul 2021 16:56:39 +0200 (CEST) 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