From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 7B97B2C23 for ; Tue, 28 Feb 2017 15:48:06 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B3C8CC07F677; Tue, 28 Feb 2017 14:48:06 +0000 (UTC) Received: from dhcp-25-97.bos.redhat.com (unknown [10.18.25.172]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 40DA497D01; Tue, 28 Feb 2017 14:48:06 +0000 (UTC) From: Aaron Conole To: Bruce Richardson Cc: dev@dpdk.org, Stephen Hemminger References: <20170225160309.31270-1-aconole@redhat.com> <20170227161811.12309-1-aconole@redhat.com> <20170227161811.12309-4-aconole@redhat.com> <20170228142504.GA15368@bricha3-MOBL3.ger.corp.intel.com> Date: Tue, 28 Feb 2017 09:48:05 -0500 In-Reply-To: <20170228142504.GA15368@bricha3-MOBL3.ger.corp.intel.com> (Bruce Richardson's message of "Tue, 28 Feb 2017 14:25:04 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 28 Feb 2017 14:48:06 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v5 03/26] eal: No panic on hugepages info init 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: Tue, 28 Feb 2017 14:48:06 -0000 Bruce Richardson writes: > On Mon, Feb 27, 2017 at 11:17:48AM -0500, Aaron Conole wrote: >> When attempting to scan hugepages, signal to the eal.c that an error has >> occurred, rather than performing a panic. >> >> Signed-off-by: Aaron Conole >> --- >> lib/librte_eal/linuxapp/eal/eal_hugepage_info.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c >> index 18858e2..4d47eaf 100644 >> --- a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c >> +++ b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c >> @@ -283,9 +283,11 @@ eal_hugepage_info_init(void) >> struct dirent *dirent; >> >> dir = opendir(sys_dir_path); >> - if (dir == NULL) >> - rte_panic("Cannot open directory %s to read system hugepage " >> + if (dir == NULL) { >> + RTE_LOG(ERR, EAL, "Cannot open directory %s to read system hugepage " >> "info\n", sys_dir_path); >> + return -1; >> + } > > Minor nit. > The error message should go on a line on its own, without any breaks to > make it easy to "grep". This should also eliminate the checkpatch > complaint about it being too long. Yes, will fix it for v6. -Aaron