[dpdk-dev,RFC,08/23] eal: do not panic on memzone initialization fails
Checks
Commit Message
When memzone initialization fails, report the error to the calling
application rather than panic().
Signed-off-by: Aaron Conole <aconole@redhat.com>
---
lib/librte_eal/linuxapp/eal/eal.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
@@ -828,8 +828,11 @@ rte_eal_init(int argc, char **argv)
/* the directories are locked during eal_hugepage_info_init */
eal_hugedirs_unlock();
- if (rte_eal_memzone_init() < 0)
- rte_panic("Cannot init memzone\n");
+ if (rte_eal_memzone_init() < 0) {
+ RTE_LOG (ERR, EAL, "Cannot init memzone\n");
+ errno = ENODEV;
+ return -1;
+ }
if (rte_eal_tailqs_init() < 0)
rte_panic("Cannot init tail queues for objects\n");