From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vXByrRyb+hZHrXapovd4DDhWc40AdT9uNuOBrXKQ48w=; b=jkysMPwUoaD0Rgg2qezADtSJKtWNT8u3Fq1guq7EBZMzQgZGhIMYQ0RHeGmvw9hGlo sLO4Ju1ZL6/QygrT0lV8C5eLdcHAlQHORfgu2lQWjer6BXRVnNS6aiov/wNGrYE2+kdZ ip9rj01yyFRV5R5+1PE+RuLlTJ0z2RsJu6dDcJX68LGNIAiUH3Mz2UlBhlii2DPW8NzL Jb3RJwQShrJbZMS6Hcpfj4z8m0yERPt3WHfd75Pu5XyGhtVE5xl/eIexvXNpyPBGz/yP J+Jt8U3joy0uXTNwPbw7a3c8kTyUmYtEUShc6hHGj6VzWPZdAYk2F3C2A63wMf4o2zkq UjpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vXByrRyb+hZHrXapovd4DDhWc40AdT9uNuOBrXKQ48w=; b=Jocucqvk0PeVAyQ7MHqJvSzvlUhnINvYmB/MT7wa7x8Khr97w15m1FCgcU7E+fiDAU J3GJNOrSwSeY0nKIrz5HhwHwKHH9VGwVjVnarVIxOFXr/cnFnIvrJz/xJpd/FSinjkzs /plLKzl+XhgDpPPMu54iEdLwWgAyY8EQmh/kuLkR2TRvLu0W18NDcBjsaXBb4LiT2QWz dJ58qV6GjzckoT4Y03479//bKE5R3jjyly9AiESlXhF5UCw572fN/iHb0SRVmS6vNXrw sa5B5fkRNXOKjdpnKOtyYWfxwXdZO/dROe7jwz2rUwqinKsKFdu3gOyr5YtstQ7VhG7Q B0kQ== X-Gm-Message-State: AOUpUlGJgqATwHq0YyKLwNMZKWsRPzR5xXyWWla5w6tdAhxOrH6dXMcL 1JGiiG4HptjqqBpzfPZeGjGtCziUr2g= X-Google-Smtp-Source: AAOMgpdP+r67Ga4+JdAdAkDMu4VO13L6q4KNQW1VG1a1a49rQoi3DdfdcrEnUTNW4fUHxojxlFlS7A== X-Received: by 2002:a63:4306:: with SMTP id q6-v6mr20769846pga.181.1532542824921; Wed, 25 Jul 2018 11:20:24 -0700 (PDT) Received: from localhost.localdomain ([167.220.62.92]) by smtp.gmail.com with ESMTPSA id l85-v6sm25973854pfk.34.2018.07.25.11.20.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jul 2018 11:20:23 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Stephen Hemminger Date: Wed, 25 Jul 2018 11:20:18 -0700 Message-Id: <20180725182019.31518-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180725182019.31518-1-stephen@networkplumber.org> References: <20180725182019.31518-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 3/4] eal: don't crash if alarm set fails X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2018 18:20:26 -0000 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