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 E72DAA0A0F; Mon, 5 Jul 2021 16:39:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53DE940040; Mon, 5 Jul 2021 16:39:53 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 42AF54003C for ; Mon, 5 Jul 2021 16:39:51 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10036"; a="294628915" X-IronPort-AV: E=Sophos;i="5.83,325,1616482800"; d="scan'208";a="294628915" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2021 07:39:49 -0700 X-IronPort-AV: E=Sophos;i="5.83,325,1616482800"; d="scan'208";a="456740788" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.23.142]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 05 Jul 2021 07:39:48 -0700 Date: Mon, 5 Jul 2021 15:39:44 +0100 From: Bruce Richardson To: David Marchand Cc: dev , Morten =?iso-8859-1?Q?Br=F8rup?= Message-ID: 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: 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 Mon, Jul 05, 2021 at 04:11:54PM +0200, David Marchand wrote: > On Fri, Jul 2, 2021 at 2:56 PM 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 > > --- > > 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) { > > + 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 > > > > Should this change be applied to FreeBSD too? > > Reviewed-by: David Marchand > Yes it should. :-( For some reason I assumed that this would not be relevant for FreeBSD, but I obviously should have double-checked the code!