[prev in list] [next in list] [prev in thread] [next in thread]
List: dpdk-dev
Subject: [dpdk-dev] [RFC 16/23] eal: convert timer_init not to call panic
From: Aaron Conole <aconole () redhat ! com>
Date: 2016-12-30 15:26:13
Message-ID: 1483111580-5397-17-git-send-email-aconole () redhat ! com
[Download RAW message or body]
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 <aconole@redhat.com>
---
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 ea3d50b..4206bca 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -862,8 +862,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");
+ errno = ENOTSUP;
+ return -1;
+ }
eal_check_mem_on_local_socket();
--
2.7.4
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic