From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Conole Subject: [PATCH v5 16/26] eal: convert timer_init not to call panic Date: Mon, 27 Feb 2017 11:18:01 -0500 Message-ID: <20170227161811.12309-17-aconole@redhat.com> References: <20170225160309.31270-1-aconole@redhat.com> <20170227161811.12309-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 F09F52E81 for ; Mon, 27 Feb 2017 17:18:21 +0100 (CET) In-Reply-To: <20170227161811.12309-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" After code inspection, there is no way for eal_timer_init() to fail. It simply returns 0 in all cases. As such, this test could either go-away or stay here as 'future-proofing'. Signed-off-by: Aaron Conole --- lib/librte_eal/linuxapp/eal/eal.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 23811bf..81085d5 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -875,8 +875,11 @@ rte_eal_init(int argc, char **argv) return -1; } - if (rte_eal_timer_init() < 0) - rte_panic("Cannot init HPET or TSC timers\n"); + if (rte_eal_timer_init() < 0) { + RTE_LOG(ERR, EAL, "Cannot init HPET or TSC timers\n"); + rte_errno = ENOTSUP; + return -1; + } eal_check_mem_on_local_socket(); -- 2.9.3