From patchwork Thu Jul 1 09:34:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 95111 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 97FB5A0A0C; Thu, 1 Jul 2021 11:35:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6294B40141; Thu, 1 Jul 2021 11:35:04 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 61D8040040 for ; Thu, 1 Jul 2021 11:35:02 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10031"; a="188888237" X-IronPort-AV: E=Sophos;i="5.83,313,1616482800"; d="scan'208";a="188888237" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2021 02:35:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,313,1616482800"; d="scan'208";a="644389173" Received: from silpixa00399126.ir.intel.com ([10.237.223.29]) by fmsmga005.fm.intel.com with ESMTP; 01 Jul 2021 02:35:00 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: anatoly.burakov@intel.com, Bruce Richardson Date: Thu, 1 Jul 2021 10:34:56 +0100 Message-Id: <20210701093456.43426-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [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" 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;