From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH 3/4] eal: don't crash if alarm set fails Date: Wed, 25 Jul 2018 11:20:18 -0700 Message-ID: <20180725182019.31518-4-stephen@networkplumber.org> References: <20180725182019.31518-1-stephen@networkplumber.org> Cc: Stephen Hemminger , Stephen Hemminger To: dev@dpdk.org Return-path: Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 085A63257 for ; Wed, 25 Jul 2018 20:20:26 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id r1-v6so5832633pgp.11 for ; Wed, 25 Jul 2018 11:20:25 -0700 (PDT) In-Reply-To: <20180725182019.31518-1-stephen@networkplumber.org> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" There is no need to call rte_exit and crash the application here; better to let the application handle the error itself. Remove the gratuitous profanity which would be visible if the rte_exit was still there. Signed-off-by: Stephen Hemminger --- lib/librte_eal/common/eal_common_proc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c index 9fcb9121908d..07b7579c565a 100644 --- a/lib/librte_eal/common/eal_common_proc.c +++ b/lib/librte_eal/common/eal_common_proc.c @@ -841,14 +841,12 @@ mp_request_async(const char *dst, struct rte_mp_msg *req, param->user_reply.nb_sent++; - if (rte_eal_alarm_set(ts->tv_sec * 1000000 + ts->tv_nsec / 1000, - async_reply_handle, pending_req) < 0) { + ret = rte_eal_alarm_set(ts->tv_sec * 1000000 + ts->tv_nsec / 1000, + async_reply_handle, pending_req); + if (ret < 0) RTE_LOG(ERR, EAL, "Fail to set alarm for request %s:%s\n", dst, req->name); - rte_panic("Fix the above shit to properly free all memory\n"); - } - - return 0; + return ret; fail: free(pending_req); free(reply_msg); -- 2.17.1