DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH 1/3] testpmd: allow configuring log level on command line
Date: Thu,  1 Aug 2019 19:51:52 -0700	[thread overview]
Message-ID: <20190802025154.328-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20190802025154.328-1-stephen@networkplumber.org>

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 <stephen@networkplumber.org>
---
 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


  reply	other threads:[~2019-08-02  2:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-02  2:51 [dpdk-dev] [PATCH 0/3] testpmd: fixes for 19.08 Stephen Hemminger
2019-08-02  2:51 ` Stephen Hemminger [this message]
2019-08-02  2:51 ` [dpdk-dev] [PATCH 2/3] testpmd: block secondary process Stephen Hemminger
2019-08-02  2:51 ` [dpdk-dev] [PATCH 3/3] testpmd: use exit instead of panic Stephen Hemminger
2019-08-02 16:08   ` Burakov, Anatoly
2019-08-02 16:13     ` Stephen Hemminger
2019-08-05 13:48 ` [dpdk-dev] [PATCH 0/3] testpmd: fixes for 19.08 Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190802025154.328-2-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).