From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Conole Subject: [PATCH v6 04/26] eal: do not panic on failed hugepage query Date: Tue, 28 Feb 2017 13:52:53 -0500 Message-ID: <20170228185315.12546-5-aconole@redhat.com> References: <20170227161811.12309-1-aconole@redhat.com> <20170228185315.12546-1-aconole@redhat.com> Cc: Stephen Hemminger , Bruce Richardson To: dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 4A4512BB1 for ; Tue, 28 Feb 2017 19:53:20 +0100 (CET) In-Reply-To: <20170228185315.12546-1-aconole@redhat.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" If we fail to acquire hugepage information, simply signal an error to the application. This clears the run_once counter, allowing the user or application to take a corrective action and retry. Signed-off-by: Aaron Conole Acked-by: Bruce Richardson --- lib/librte_eal/linuxapp/eal/eal.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 81692e7..12bd941 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -787,8 +787,12 @@ rte_eal_init(int argc, char **argv) if (internal_config.no_hugetlbfs == 0 && internal_config.process_type != RTE_PROC_SECONDARY && internal_config.xen_dom0_support == 0 && - eal_hugepage_info_init() < 0) - rte_panic("Cannot get hugepage information\n"); + eal_hugepage_info_init() < 0) { + rte_eal_init_alert("Cannot get hugepage information."); + rte_errno = EACCES; + rte_atomic32_clear(&run_once); + return -1; + } if (internal_config.memory == 0 && internal_config.force_sockets == 0) { if (internal_config.no_hugetlbfs) -- 2.9.3