From mboxrd@z Thu Jan 1 00:00:00 1970 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 2D705C11F68 for ; Fri, 2 Jul 2021 12:56:26 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 984886141C for ; Fri, 2 Jul 2021 12:56:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 984886141C 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 AE7BA41353; Fri, 2 Jul 2021 14:56:24 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 2BC0040686 for ; Fri, 2 Jul 2021 14:56:23 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10032"; a="208680568" X-IronPort-AV: E=Sophos;i="5.83,317,1616482800"; d="scan'208";a="208680568" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2021 05:56:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,317,1616482800"; d="scan'208";a="560046190" Received: from silpixa00399126.ir.intel.com ([10.237.223.29]) by fmsmga001.fm.intel.com with ESMTP; 02 Jul 2021 05:56:14 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: mb@smartsharesystems.com, Bruce Richardson Date: Fri, 2 Jul 2021 13:55:53 +0100 Message-Id: <20210702125554.606364-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210701093456.43426-1-bruce.richardson@intel.com> References: <20210701093456.43426-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [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" 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