[dpdk-dev,RFC,13/23] eal: do not panic on memory init
Checks
Commit Message
This can only happen when access to hugepages (either as primary or
secondary process) fails (and that is usually permissions).
Signed-off-by: Aaron Conole <aconole@redhat.com>
---
lib/librte_eal/linuxapp/eal/eal.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
@@ -833,8 +833,11 @@ rte_eal_init(int argc, char **argv)
}
#endif
- if (rte_eal_memory_init() < 0)
- rte_panic("Cannot init memory\n");
+ if (rte_eal_memory_init() < 0) {
+ RTE_LOG (ERR, EAL, "Cannot init memory\n");
+ errno = EACCES;
+ return -1;
+ }
/* the directories are locked during eal_hugepage_info_init */
eal_hugedirs_unlock();