[dpdk-dev] [PATCH 09/13] eal: replace rte_panic instances in common_memzone

Arnon Warshavsky arnon at qwilt.com
Wed Apr 4 13:27:33 CEST 2018


replace panic calls with log and retrun value.

Signed-off-by: Arnon Warshavsky <arnon at qwilt.com>
---
 lib/librte_eal/common/eal_common_memzone.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c
index 1ab3ade..fa0a407 100644
--- a/lib/librte_eal/common/eal_common_memzone.c
+++ b/lib/librte_eal/common/eal_common_memzone.c
@@ -314,8 +314,9 @@
 	if (addr == NULL)
 		ret = -EINVAL;
 	else if (mcfg->memzone_cnt == 0) {
-		rte_panic("%s(): memzone address not NULL but memzone_cnt is 0!\n",
-				__func__);
+		RTE_LOG(CRIT, EAL, "%s(): memzone address not NULL but memzone_cnt"
+				" is 0!\n", __func__);
+		return -1;
 	} else {
 		memset(&mcfg->memzone[idx], 0, sizeof(mcfg->memzone[idx]));
 		mcfg->memzone_cnt--;
-- 
1.8.3.1



More information about the dev mailing list