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 C540CA0A0C; Fri, 2 Jul 2021 16:21:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4250641363; Fri, 2 Jul 2021 16:21:39 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id A9DD841353 for ; Fri, 2 Jul 2021 16:21:37 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Fri, 2 Jul 2021 16:21:35 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35C618D7@smartserver.smartshare.dk> X-MimeOLE: Produced By Microsoft Exchange V6.5 In-Reply-To: <20210702125554.606364-1-bruce.richardson@intel.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [dpdk-dev] [PATCH v2 1/2] eal: create runtime dir even when shared data is not used Thread-Index: AddvQawTWoeH6TSnRA2KgzI7N2/RGAAC86ug References: <20210701093456.43426-1-bruce.richardson@intel.com> <20210702125554.606364-1-bruce.richardson@intel.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Bruce Richardson" , 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" > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > Sent: Friday, 2 July 2021 14.56 > To: dev@dpdk.org >=20 > 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. >=20 > Signed-off-by: Bruce Richardson > --- > V2: add a warning for the no-shconf case, rather than skipping it > silently. >=20 > lib/eal/linux/eal.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) >=20 > 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) > } > } >=20 > - /* create runtime data directory */ > - if (internal_conf->no_shconf =3D=3D 0 && > - eal_create_runtime_dir() < 0) { > - RTE_LOG(ERR, EAL, "Cannot create runtime directory\n"); > - ret =3D -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 =3D=3D 0) { > + RTE_LOG(ERR, EAL, "Cannot create runtime > directory\n"); > + ret =3D -1; > + goto out; > + } else > + RTE_LOG(WARNING, EAL, "No DPDK runtime directory > created\n"); > } >=20 > if (eal_adjust_config(internal_conf) !=3D 0) { > -- > 2.30.2 >=20 Reviewed-by: Morten Br=F8rup