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>,
	David Hunt <david.hunt@intel.com>,
	Huisong Li <lihuisong@huawei.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>,
	Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Subject: [PATCH v2 2/3] examples/vm_power_manager: do not use EAL logtype
Date: Thu, 15 Feb 2024 19:36:18 -0800	[thread overview]
Message-ID: <20240216033743.150800-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20240216033743.150800-1-stephen@networkplumber.org>

Be consistent for all the error printouts and use fprintf().
The EAL logtype is reserved for internal use by EAL.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Hunt <david.hunt@intel.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
---
 examples/vm_power_manager/main.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index b159291d77ce..c14138202004 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -17,7 +17,6 @@
 #include <rte_common.h>
 #include <rte_eal.h>
 #include <rte_launch.h>
-#include <rte_log.h>
 #include <rte_per_lcore.h>
 #include <rte_lcore.h>
 #include <rte_ethdev.h>
@@ -425,8 +424,7 @@ main(int argc, char **argv)
 
 	lcore_id = rte_get_next_lcore(-1, 1, 0);
 	if (lcore_id == RTE_MAX_LCORE) {
-		RTE_LOG(ERR, EAL, "A minimum of three cores are required to run "
-				"application\n");
+		fprintf(stderr, "A minimum of three cores are required to run application\n");
 		return 0;
 	}
 	printf("Running channel monitor on lcore id %d\n", lcore_id);
@@ -434,16 +432,15 @@ main(int argc, char **argv)
 
 	lcore_id = rte_get_next_lcore(lcore_id, 1, 0);
 	if (lcore_id == RTE_MAX_LCORE) {
-		RTE_LOG(ERR, EAL, "A minimum of three cores are required to run "
-				"application\n");
+		fprintf(stderr, "A minimum of three cores are required to run application\n");
 		return 0;
 	}
 	if (power_manager_init() < 0) {
-		printf("Unable to initialize power manager\n");
+		fprintf(stderr, "Unable to initialize power manager\n");
 		return -1;
 	}
 	if (channel_manager_init(CHANNEL_MGR_DEFAULT_HV_PATH) < 0) {
-		printf("Unable to initialize channel manager\n");
+		fprintf(stderr, "Unable to initialize channel manager\n");
 		return -1;
 	}
 
-- 
2.43.0


  parent reply	other threads:[~2024-02-16  3:38 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11 17:23 [PATCH 0/3] replace use of " Stephen Hemminger
2023-12-11 17:23 ` [PATCH 1/3] testpmd: replace EAL logtype with fprintf Stephen Hemminger
2023-12-12 11:51   ` lihuisong (C)
2023-12-11 17:23 ` [PATCH 2/3] examples/l2fwd-keepalive: don't use EAL logtype Stephen Hemminger
2023-12-12 11:53   ` lihuisong (C)
2023-12-11 17:23 ` [PATCH 3/3] examples/vm_power_manager: do not " Stephen Hemminger
2023-12-12 11:24   ` Hunt, David
2023-12-12 11:53   ` lihuisong (C)
2023-12-11 19:19 ` [PATCH 0/3] replace use of " Tyler Retzlaff
2023-12-11 20:15   ` Stephen Hemminger
2023-12-12  8:01   ` David Marchand
2024-02-16  3:36 ` [PATCH v2 0/3] replace use of EAL logtype in applications Stephen Hemminger
2024-02-16  3:36   ` [PATCH v2 1/3] examples/l2fwd-keepalive: don't use EAL logtype Stephen Hemminger
2024-02-16  8:04     ` Morten Brørup
2024-02-16  3:36   ` Stephen Hemminger [this message]
2024-02-16  3:36   ` [PATCH v2 3/3] testpmd: replace EAL logtype TESTPMD_LOG Stephen Hemminger
2024-03-08 13:35     ` Singh, Aman Deep
2024-03-08 16:26       ` Stephen Hemminger
2024-02-18  3:16   ` [PATCH v2 0/3] replace use of EAL logtype in applications fengchengwen
2024-03-08 18:10 ` [PATCH v3 " Stephen Hemminger
2024-03-08 18:10   ` [PATCH v3 1/3] examples/l2fwd-keepalive: don't use EAL logtype Stephen Hemminger
2024-03-08 18:10   ` [PATCH v3 2/3] examples/vm_power_manager: do not " Stephen Hemminger
2024-03-08 18:10   ` [PATCH v3 3/3] testpmd: replace EAL logtype TESTPMD_LOG Stephen Hemminger
2024-03-08 22:33 ` [PATCH v4 0/3] replace use of EAL logtype in applications Stephen Hemminger
2024-03-08 22:33   ` [PATCH v4 1/3] examples/l2fwd-keepalive: don't use EAL logtype Stephen Hemminger
2024-03-08 22:33   ` [PATCH v4 2/3] examples/vm_power_manager: do not " Stephen Hemminger
2024-03-08 22:33   ` [PATCH v4 3/3] testpmd: replace EAL logtype TESTPMD_LOG Stephen Hemminger
2024-03-11 10:24     ` Singh, Aman Deep
2024-07-03 16:28 ` [PATCH v5 0/3] replace use of EAL logtype in examples and testpmd Stephen Hemminger
2024-07-03 16:28   ` [PATCH v5 1/3] examples/l2fwd-keepalive: don't use EAL logtype Stephen Hemminger
2024-07-03 16:28   ` [PATCH v5 2/3] examples/vm_power_manager: do not " Stephen Hemminger
2024-07-03 16:28   ` [PATCH v5 3/3] testpmd: replace EAL logtype TESTPMD_LOG Stephen Hemminger
2024-07-09 12:20   ` [PATCH v5 0/3] replace use of EAL logtype in examples and testpmd David Marchand

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=20240216033743.150800-3-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=anatoly.burakov@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=lihuisong@huawei.com \
    --cc=sivaprasad.tummala@amd.com \
    /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).