From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id D023D1BAA8 for ; Thu, 20 Dec 2018 12:11:51 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Dec 2018 03:11:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,376,1539673200"; d="scan'208";a="100188312" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga007.jf.intel.com with ESMTP; 20 Dec 2018 03:11:49 -0800 Received: from sivswdev05.ir.intel.com (sivswdev05.ir.intel.com [10.243.17.64]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id wBKBBnYS029348; Thu, 20 Dec 2018 11:11:49 GMT Received: from sivswdev05.ir.intel.com (localhost [127.0.0.1]) by sivswdev05.ir.intel.com with ESMTP id wBKBBncK019100; Thu, 20 Dec 2018 11:11:49 GMT Received: (from aburakov@localhost) by sivswdev05.ir.intel.com with LOCAL id wBKBBmuF019096; Thu, 20 Dec 2018 11:11:48 GMT From: Anatoly Burakov To: dev@dpdk.org Cc: Bruce Richardson Date: Thu, 20 Dec 2018 11:11:48 +0000 Message-Id: X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] eal: fix runtime dir cleanup in noshconf mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2018 11:11:52 -0000 When using --no-shconf or --in-memory modes, there is no runtime directory to be created, so there is no point in attempting to clean it. Fixes: 0a529578f162 ("eal: clean up unused files on initialization") Signed-off-by: Anatoly Burakov --- lib/librte_eal/bsdapp/eal/eal.c | 5 ++++- lib/librte_eal/linuxapp/eal/eal.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 41ddb5a22..20f790a71 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -901,8 +901,11 @@ rte_eal_init(int argc, char **argv) * whether we are primary or secondary process, but we cannot remove * primary process' files because secondary should be able to run even * if primary process is dead. + * + * In no_shconf mode, no runtime directory is created in the first + * place, so no cleanup needed. */ - if (eal_clean_runtime_dir() < 0) { + if (!internal_config.no_shconf && eal_clean_runtime_dir() < 0) { rte_eal_init_alert("Cannot clear runtime directory\n"); return -1; } diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index d252c8591..acac92987 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -1189,8 +1189,11 @@ rte_eal_init(int argc, char **argv) * whether we are primary or secondary process, but we cannot remove * primary process' files because secondary should be able to run even * if primary process is dead. + * + * In no_shconf mode, no runtime directory is created in the first + * place, so no cleanup needed. */ - if (eal_clean_runtime_dir() < 0) { + if (!internal_config.no_shconf && eal_clean_runtime_dir() < 0) { rte_eal_init_alert("Cannot clear runtime directory\n"); return -1; } -- 2.17.1