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 34C65A10DA for ; Fri, 2 Aug 2019 04:52:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C44531C1FD; Fri, 2 Aug 2019 04:52:07 +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 228121C1EF for ; Fri, 2 Aug 2019 04:52:03 +0200 (CEST) Received: by mail-pg1-f193.google.com with SMTP id f5so26455717pgu.5 for ; Thu, 01 Aug 2019 19:52:03 -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=QpFghJ/hgCGlIb7LGubFur6kOWcPQls5dJoD5tFeMlc=; b=t0AB3ceuduRotod1dPbJgFwmw1RGHhO8RS+zhB72LXc35FkB7vxVp/QINxHCTr661X bzxXnUqY57pFGC3B1VO4YCEhjoi3py93PgvpytAeJ+SHnl3doOoPKW3vTlIHaPwGCwxx t5eU6N4rwk7WejpsouRqDSUI8k1odSu6qwDLFRgUs72tLbH6xQcAkn2Y656sK/AJ5tsI bBE8E5HTjtKyPz7WcJupxYjG1hTb0faXjLYTxv51Dzx2ykDq6HBKb262wuZiluz58TuU aZI9fyitxwRLZWQLufHsEl5JIWWXhXd4LfbJneRjSZJMx4nTsjPFtlJm+z/YhCVixTkh NqYg== 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=QpFghJ/hgCGlIb7LGubFur6kOWcPQls5dJoD5tFeMlc=; b=OAe+b6dxwi95mV4gR/+L2xfWNbxiARW4ywY4JEH4F5UQ0Ng4R2LZQbMJqqBlG7ogZ9 lQblZmgDn14QtV9YfxXTRzmfUSOtSBPO50uraijfmWUMXV161zF23dFi/f3ueAtPL35z 2QEVAMQrch9ZuLZuvBkFcNoDZP+eZrNOpgeFQjKooRXNMX6M41XDcspsrFX9D9XprwvV 9V5Ib3xWA+sizG3KCSOjWpcEkOb7M1wSmZoh3fFz6wziXrh3Aja18o5DUJaHqKNxXCLz wXyiKhyfT0LoKXZguTVrG+N7GE4BVs7Ekf0kppccwxnxuzkN22uh3wC7vJ7ZhowYdA8R b9cg== X-Gm-Message-State: APjAAAX0jHahCn2Yi5hX959Pnf705HSZvUEPm/ThN8kyUcD5ebSqMZc3 z6yT1mlehjQcnxbx/Y+rQdObu9qH X-Google-Smtp-Source: APXvYqzIFvJXzxO0rEtDImJPcq/mwefwGR6luNA08Dz0pdjEFa6+l+9QKXww5w6gkfSLNQwilXH56A== X-Received: by 2002:a63:5402:: with SMTP id i2mr95045287pgb.414.1564714321945; Thu, 01 Aug 2019 19:52:01 -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.01 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 01 Aug 2019 19:52:01 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Thu, 1 Aug 2019 19:51:52 -0700 Message-Id: <20190802025154.328-2-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 1/3] testpmd: allow configuring log level on command line 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" Since testpmd registers log type after processing command line arguments, it is not possible to do: # testpmd --log-level='testpmd:info' ... Fix this by initializing logtype first. Signed-off-by: Stephen Hemminger --- app/test-pmd/testpmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 518865a7db25..159c2ef05b6c 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -3234,15 +3234,15 @@ main(int argc, char** argv) signal(SIGINT, signal_handler); signal(SIGTERM, signal_handler); - diag = rte_eal_init(argc, argv); - if (diag < 0) - rte_panic("Cannot init EAL\n"); - testpmd_logtype = rte_log_register("testpmd"); if (testpmd_logtype < 0) rte_panic("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"); + ret = register_eth_event_callback(); if (ret != 0) rte_panic("Cannot register for ethdev events"); -- 2.20.1