[PATCH v32 04/12] eal: do not log init failure twice

David Marchand david.marchand at redhat.com
Fri Nov 8 09:47:53 CET 2024


From: Stephen Hemminger <stephen at networkplumber.org>

The message already goes through logging, and does not need
to be printed on stderr.
Message level should be ALERT to match function name.

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
---
 lib/eal/freebsd/eal.c | 3 +--
 lib/eal/linux/eal.c   | 3 +--
 lib/eal/windows/eal.c | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
index 16b1c67cca..c84983ac3f 100644
--- a/lib/eal/freebsd/eal.c
+++ b/lib/eal/freebsd/eal.c
@@ -530,8 +530,7 @@ rte_eal_iopl_init(void)
 
 static void rte_eal_init_alert(const char *msg)
 {
-	fprintf(stderr, "EAL: FATAL: %s\n", msg);
-	EAL_LOG(ERR, "%s", msg);
+	EAL_LOG(ALERT, "%s", msg);
 }
 
 /* Launch threads, called at application init(). */
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 49a88cfbd5..3915cdb838 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -831,8 +831,7 @@ rte_eal_iopl_init(void)
 
 static void rte_eal_init_alert(const char *msg)
 {
-	fprintf(stderr, "EAL: FATAL: %s\n", msg);
-	EAL_LOG(ERR, "%s", msg);
+	EAL_LOG(ALERT, "%s", msg);
 }
 
 /*
diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c
index f77053eb7e..a3eb15ce00 100644
--- a/lib/eal/windows/eal.c
+++ b/lib/eal/windows/eal.c
@@ -182,8 +182,7 @@ sync_func(void *arg __rte_unused)
 static void
 rte_eal_init_alert(const char *msg)
 {
-	fprintf(stderr, "EAL: FATAL: %s\n", msg);
-	EAL_LOG(ERR, "%s", msg);
+	EAL_LOG(ALERT, "%s", msg);
 }
 
 /* Stubs to enable EAL trace point compilation
-- 
2.47.0



More information about the dev mailing list