From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A8F96A10DA for ; Fri, 2 Aug 2019 04:52:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 753FC1C20B; Fri, 2 Aug 2019 04:52:12 +0200 (CEST) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by dpdk.org (Postfix) with ESMTP id C118A1C1FB for ; Fri, 2 Aug 2019 04:52:05 +0200 (CEST) Received: by mail-pg1-f193.google.com with SMTP id k189so16228955pgk.13 for ; Thu, 01 Aug 2019 19:52:05 -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 :mime-version:content-transfer-encoding; bh=DyCOaXXLJ5xS3y4c0vquyJVQrHurp2Jx8KDuemTGIYs=; b=jEj3xNbKleKKIQD5y9Sj+/nI6GiiGA8tJmw1nKx5P8FcOATNpH1OxKccGdYJ+cZLhB XtdeqEaHHkKcaUhMtQonBrnc3Z/brIFRat3qbD5TuTjWm7GbboCsPLZ2jdaVWZ9Kv/Ly 0SvP6U9NL394YuqCECNWn+8m3lSa7JTbIifSj9uinlOY+3Iy3BwZHW4C5AGaamM9h0YH YDGHaNuJIBsKCRTOrERpGt7I3ePx4PW1VMK9L7Y75V312SStlEyfiWVbJuxdnwXO8INj QMoD/+O+Mi+7b/1GmAZZxws7pfYyXTneauU6nsUrq4+l6cWcL38WU+xTPffU9iyqJuQV mg7g== 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:mime-version:content-transfer-encoding; bh=DyCOaXXLJ5xS3y4c0vquyJVQrHurp2Jx8KDuemTGIYs=; b=Sj5qUT9070JWDO1a39zRbA2Tu/v5qqhaAB4sI/pFt8dTWaj3KohNWWjETFo7B7CzHv zIQNuN3cCXR3vFSAx5lUV3GsHPeaxcQQYUvu6U7CVJvjNyg19v7L/WikwkcDDgKkfGDV /mynj81CR9xV5S6pEvr1wPNMxR6XdUaSAdc19VfMrLyYhjAEfrLsNGTHfn9YyeGghOEN 1QI53+2ArVBcRcUBBJRBg4wPLPV0z6JNKwIt9kJS4Gtjq2JhmnU8THKJu8iPRUNAegdo CPrjA0pz6IfQRdLN7CHQdHmuyqWl8evPegOPVnWjnlxvPFZbXHDlOimvDN5OSyux8/WM ypfg== X-Gm-Message-State: APjAAAUMG9iKJefX4/4s/ODaol8mVNfU16lINNNpfdIJGObi8MFkDDuh +mEpO/kN2/9YXkedOen1ruP9lrw2 X-Google-Smtp-Source: APXvYqzotU7k5z9x3bpOOSa2u3WdBv+iwHIa4tZozL+3shaTahtU268YbPgtdpebqasiKtdHQ/OCkQ== X-Received: by 2002:a63:5048:: with SMTP id q8mr120488591pgl.446.1564714324490; Thu, 01 Aug 2019 19:52:04 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id s24sm73911995pfh.133.2019.08.01.19.52.03 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 01 Aug 2019 19:52:03 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Thu, 1 Aug 2019 19:51:54 -0700 Message-Id: <20190802025154.328-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190802025154.328-1-stephen@networkplumber.org> References: <20190802025154.328-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 3/3] testpmd: use exit instead of panic 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" rte_panic causes a backtrace (which is uniformative since all these calls are in main). Instead use rte_exit and try and make the messages informative. Signed-off-by: Stephen Hemminger --- app/test-pmd/testpmd.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index d0142cae68d7..a461cef188e3 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -3236,19 +3236,21 @@ main(int argc, char** argv) testpmd_logtype = rte_log_register("testpmd"); if (testpmd_logtype < 0) - rte_panic("Cannot register log type"); + rte_exit(EXIT_FAILURE, "Cannot register log type"); rte_log_set_level(testpmd_logtype, RTE_LOG_DEBUG); diag = rte_eal_init(argc, argv); if (diag < 0) - rte_panic("Cannot init EAL\n"); + rte_exit(EXIT_FAILURE, "Cannot init EAL: %s\n", + rte_strerror(rte_errno)); if (rte_eal_process_type() == RTE_PROC_SECONDARY) - rte_panic("Secondary process type not supported.\n"); + rte_exit(EXIT_FAILURE, + "Secondary process type not supported.\n"); ret = register_eth_event_callback(); if (ret != 0) - rte_panic("Cannot register for ethdev events"); + rte_exit(EXIT_FAILURE, "Cannot register for ethdev events"); #ifdef RTE_LIBRTE_PDUMP /* initialize packet capture framework */ @@ -3269,8 +3271,8 @@ main(int argc, char** argv) set_def_fwd_config(); if (nb_lcores == 0) - rte_panic("Empty set of forwarding logical cores - check the " - "core mask supplied in the command parameters\n"); + rte_exit(EXIT_FAILURE, "No cores defined for forwarding\n" + "Check the core mask argument\n"); /* Bitrate/latency stats disabled by default */ #ifdef RTE_LIBRTE_BITRATE -- 2.20.1